vim - Mapping <tab> in visual mode to implement cursor switching between split windows?
phpcn_u1582
phpcn_u1582 2017-05-16 16:40:38
0
1
989

This requirement was inspired by vifm. In my current use, I mostly use two split-windows.

phpcn_u1582
phpcn_u1582

reply all(1)
迷茫

I’m wondering, why does it have to be in Visual Mode? Is there any particular reason?

If it is Normal Mode, it is easier to understand, and the mapping method is not difficult:

nnoremap <TAB> <C-w>w

This way you can switch between any number of separate windows. Then the same is true for Visual Mode:

vnoremap <TAB> <C-w>w

But there is an undecided point here, that is, should I keep the Visual Mode selection part in another window after switching? If so, maybe you should add gv:

vnoremap <TAB> <C-w>wgv
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template