Open himat opened 1 year ago
@dbalatero
Also want this feature or config
I see that I can press
jk
to enter normal mode. But it seems like only pressingi
can let me go into insert mode - normally that's fine in vim, but I feel like when using vimmode.spoon I actually want the opposite.Or at least, I'd like to be able to press Escape to leave the vimmode.spoon normal mode and go back to the regular OS. Is there a config I can use for that?
this is my config snippet in init.lua
-- Enter normal mode by typing a key sequence
-- vim:enterWithSequence('jk')
vim:bindHotKeys({ enter = { {}, 'escape' } })
works for me
I think that the function should also have an exit property so something like:
vim:bindHotKeys({ enter = { { "ctrl" }, ";" }, exit = { "escape" })
But besides that, if you go into <your hammerspoon config directory>/Spoons/VimMode.spoon/lib/modal.lua
and you find -- Normal mode
which is at around line 266
, add :bind({}, <your key here>, function() vim:exitAsync() end)
under :bind({}, 'i', function() vim:exitAsync() end)
and it should work.
I see that I can press
jk
to enter normal mode. But it seems like only pressingi
can let me go into insert mode - normally that's fine in vim, but I feel like when using vimmode.spoon I actually want the opposite.Or at least, I'd like to be able to press Escape to leave the vimmode.spoon normal mode and go back to the regular OS. Is there a config I can use for that?