146
65
In gnome-terminal, I can just press Alt + (1, 2, 3, etc.) to switch to specific tabs. I can also use Ctrl + (PgUp / PgDn) to cycle through tabs (admittedly less convenient, but it can be remapped).
If I want to use vim tabs instead of gnome-terminal tabs, typing :tabn
and :tabp
is quite cumbersome. I could map them to keyboard shortcuts, but that is still a lot less convenient than jumping directly to tab 4 with Alt + 4.
Is there a faster way to switch between tabs in vim?
2I found it very convenient to use '<' and '>' – Igor Stoppa – 2016-02-22T16:14:13.757
Scroll down for a better answer.. – The Vivandiere – 2016-09-09T18:09:30.167
1I know that I could type
nnn
g
t
, but I want to do it quickly, i.e.Alt + nnn
orCtrl + nnn
. ButAlt + n
is already taken by gnome-terminal, and binding toCtrl + n
doesn't seem to have any effect. – Matthew – 2012-04-11T02:46:29.4878What about mapping function keys to
nnn
g
t
? E.g.,:map <F2> 2gt
. There is the problem that<F1>
is often mapped by GNOME to its help facility. Or you could choose some key you don't use often in normal mode, say the comma, and map it like this::map , gt
. Then1,
will take you to tab 1,2,
to tab 2, and so on. – garyjohn – 2012-04-11T05:00:18.363