I recently installed VsVim.
It's great, but I find myself constantly reaching for the mouse in order to switch between files.
Is there a built in solution? I cannot find a list of VsVim shortcuts anywhere.
Found the answer here: Tab/Window group movement: (Ctrl-W)(Ctrl-L), etc
Use gt or gT to go back and forth between tabs.
Also note that Ctrl+Tab works for cycling through tabs.
It seems to be implemented as a MRU-to-LRU tab stack, meaning that hitting Ctrl+Tab once will take you to the most recently used prior tab, and hitting Ctrl+Tab again will take you right back where you were.
There's a pop-up that displays the available tabs as long as Ctrl is held down, allowing you to choose a tab from the list.
Basically this is similar to classic MDI window tabbing.
I don't think this is part of VsVim, but rather a pass-through to Visual Studio.
Also as an addition to these ways of swapping windows I also use
ALT W then you can use the number keys to select a tab. this is kept in most recently used order, so selecting 2 will always go to the previous tab you were in.
The other thing you can use is marks. m<capital letter>
will set a mark that jumps across files ( lowercase marks work within a file ). To jump to a mark use `< mark letter >
First if you are talking about tabs gt
and gT
work for Going to next/prev Tab.
This question is pretty old, so the <C-w>
shortcuts might not have been implemented yet, but even in Vim I never did like those shortcuts. As I substitute I added some leader bindings using the standard hjkl
navigation keys. My leader is mapped to spacebar, so these are really easy to use. I also rebind tab navigation to [b
and ]b
, which are buffer navigation bindings in one of Tim Pope's Vim addons:
let mapleader="\<Space>"
" Window control/navigation leader mappings
nmap <leader>h <C-w>h
nmap <leader>j <C-w>j
nmap <leader>k <C-w>k
nmap <leader>l <C-w>l
nmap <leader>c <C-w>c
" Tab cycling
nmap [b gT
nmap ]b gt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With