Keep having "command of undefined", just want a keybind to semicolon+newline


This is my Init Script:

path = require 'path'

atom.workspaceView.command 'custom:semicolonize', ->
  editor = atom.workspace.getActiveEditor()

This is what I get

Thanks for any help


Old API. This has changed recently.
Check here.

WorkspaceView has been deprecated. Everything you could do on the view, you can now do on the Workspace model.