kana / vim-submode

Vim plugin: Create your own submodes
http://www.vim.org/scripts/script.php?script_id=2467
217 stars 24 forks source link

How to exit the submode within the rhs mapping?? #24

Open hatelove85911 opened 8 years ago

hatelove85911 commented 8 years ago

Hi,

I really like this vim plugin, I think this will be the most favorite vim plugin on my list :)

one thing I can't figure out is that I want to exit the submode in the rhs mapping(without typing explicity), I think it should be possible, maybe I just don't know how to achieve that.

call submode#map('ctrl_window', 'n', '', 'v', ':vs<CR><Esc>')
call submode#map('ctrl_window', 'n', '', 's', ':sp<CR><Esc>')

In the above mapping, assume I'm already in the ctrl_window submode, when I type v, I hope that it will create a vertical split and exit to normal mode. that's why I put in the rhs. But it doesn't seem to be working like this, why???

Swoorup commented 8 years ago

You need the 'x' in the options parameter