I feel like this should pretty easy to do, but, as the title says, how do you run a registered command from a package you have installed in init.coffee? The situation is I have vim-mode installed, and want to make alt-o map to the command “vim-mode:insert-below-with-newline”, and then do “vim-mode:reset-command-mode”. How would I create a command to do this? Right now I have the following:
atom.commands.add 'atom-text-editor', 'custom:newline-no-insert': (event) -> atom.commands.dispatch(atom.views.getView(atom.workspace), 'vim-mode:insert-below-with-newline') atom.commands.dispatch(atom.views.getView(atom.workspace), 'vim-mode:reset-command-mode')
P.S. Pardon my inexperience, I couldn’t find anything on this in the API and I’m (obviously) pretty new to the Atom customization game.