Coming from non-modal editors, I still get confused with e, w, b in Vim.
One feature I like about non-modal editors is jumping words by simply combining Ctrl with ←→ arrow. So I thought I just create a Vim equivalent using Ctrl+h instead of b and Ctrl+l instead of e. Both in visual and normal mode. It looks like there are no other shortcuts interfering by default.
Does anyone know how to change .vimrc
to map the keys accordingly?
nnoremap
andvnoremap
and have a look at vi.stackexchange.com/a/7723/1821 and vi.stackexchange.com/a/2004/1821 – nobe4 Jul 22 '16 at 10:22source ~/.vimrc
after making changes? you can close and open vim as well for changes to take effect – Sundeep Jul 22 '16 at 10:23source ~/.vimrc
. When I hitctrl+h
orctrl+l
nothing happens, the cursor stays where it is. I just checked:map
and it shows me this:<C-H> <C-W>h
and<C-L> <C-W>l
and more stuff. @spasic No, I don't need the arrow keys.. – Rotareti Jul 22 '16 at 10:32:nmap <C-h> b
from within vim and see if it works? I suspect you'll have to debug using links given by @nobe4 – Sundeep Jul 22 '16 at 10:37