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


#1

This is my Init Script:

path = require 'path'

atom.workspaceView.command 'custom:semicolonize', ->
  editor = atom.workspace.getActiveEditor()
  editor.moveToEndOfLine()
  editor.insertText(";\n")

This is what I get

Thanks for any help


#2

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.