< tab > in mapping visual mode to switch cursor between split windows?

  question, vim

This requirement is inspired by vifm, and I use about 2 split-window mostly in my current use.

I wonder why it must be under Visual Mode. Is there any special reason?

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

nnoremap <TAB> <C-w>w

In this way, you can switch in any number of sub-windows. So the same is true for Visual Mode:

vnoremap <TAB> <C-w>w

However, there is a pending point here, that is, whether to keep the Visual Mode selection part of another window after switching? If so, perhaps it should be addedgv

vnoremap <TAB> <C-w>wgv