How to quickly create one-off shortcuts


In Vim, I often create one-off shortcuts for the task at hand, using the leader key, something like:

set nnoremap <leader>r :sh script/do-a-cool-thing<CR>

Is there a way to do this kind of quick ephemeral remapping in Atom?


Did you check the VIM package readme? I think you would need to post a feature request on the vim package github repo.


I don’t necessarily want it to be a Vim-related thing, I just used Vim to explain the concept: creating temporary shortcuts that go away once the editor closes. Doesn’t have to be related to the leader concept, it could be any key


I believe it can be done, but I think it’ll be tricky. Shortcuts are bound to scopes (and selectors priority) so if you want to override a binding you’ll have to provide a more specific scope than the one that is triggered normally. I don’t have a solution at the moment but I’ll try to a look at that later.


So, what you’re saying is, this is a good opportunity for me to try my hand at writing Atom plugins :smile: