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:
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:
This way you can switch between any number of separate windows. Then the same is true for Visual Mode:
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
: