This repository has been archived by the owner on Apr 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 250
This repository has been archived by the owner on Apr 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 250
hotkey to enable/disable package #966
Labels
Comments
This is something you can add yourself:
atom.commands.add 'atom-workspace', 'vim-mode:toggle-enabled', ->
disabledPackages = atom.config.get('core.disabledPackages')
disabledPackageIndex = disabledPackages.indexOf('vim-mode')
if disabledPackageIndex is -1
disabledPackages.push('vim-mode')
else
disabledPackages.splice(disabledPackageIndex, 1)
atom.config.set('core.disabledPackages', disabledPackages) |
https://atom.io/docs/v1.5.2/hacking-atom-the-init-file /*
~/.atom/keymap.cson
*/
'atom-workspace':
'ctrl-alt-v': 'vim-mode:toggle-enabled' |
Hi @morenoh149 and @maxbrunsfeld, I added those two snippets to the respective files and restarted atom but it doesn't seem to work. 'ctrl-alt-v' does nothing. I also tried a different key combination 'ctrl-shift-F12' and that didn't work either. I'm new to atom, any ideas what I'm missing or how to debug it? |
no clue. I tried to be as clear as possible. |
No worries, I got the following to work fine. # init.coffee
atom.commands.add 'atom-text-editor',
'user:toggle-vim-mode': (event) ->
if atom.packages.isPackageDisabled("vim-mode")
atom.packages.enablePackage("vim-mode")
else
atom.packages.disablePackage("vim-mode")
# keymap.cson
'atom-workspace':
'ctrl-shift-f12': 'user:toggle-vim-mode' |
for those who wind up here and now use # init.coffee
atom.commands.add 'atom-text-editor',
'user:toggle-vim-mode-plus': (event) ->
if atom.packages.isPackageDisabled("vim-mode-plus")
atom.packages.enablePackage("vim-mode-plus")
else
atom.packages.disablePackage("vim-mode-plus")
# keymap.cson
'atom-workspace':
'ctrl-shift-f12': 'user:toggle-vim-mode-plus' (hint: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I work with colleagues that do not always know vim. There should be a hotkey to turn this mode on and off.
The text was updated successfully, but these errors were encountered: