12

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.

FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
Runcible
  • 7,006
  • 12
  • 42
  • 62
  • 1
    A note for when trying to find out VsVim behaviors in the future. You are probably better off searching for a way to do something in Vim, and then see if it exists in VsVim, because Vim is so much older, more heavily documented and widely used, and VsVim after all 99% is just attempting to be a copycat. :) – Keith Pinson Oct 29 '14 at 16:29

4 Answers4

11

Found the answer here: Tab/Window group movement: (Ctrl-W)(Ctrl-L), etc

Use gt or gT to go back and forth between tabs.

Community
  • 1
  • 1
Runcible
  • 7,006
  • 12
  • 42
  • 62
6

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.

Garry H
  • 111
  • 4
2

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 >

Keith Nicholas
  • 43,549
  • 15
  • 93
  • 156
1

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
kitsu.eb
  • 2,996
  • 1
  • 26
  • 28