2

If I have opened 4 to 5 tabs in the same window.what is the shortcut to switch from tab1 to tab5/4.Pressing gt successively can get the work done. Is there any other easy way?

Clifford
  • 88,407
  • 13
  • 85
  • 165
ddpd
  • 603
  • 1
  • 10
  • 25

1 Answers1

4

Have a closer look at :h gt, it can be prepended with a {count}, so to go to tab5, you could hit 5gt and to go to tab4 you could hit 4gt.

Also, you can use gT to go to the previous tab (in the reverse direction), so from tab1 if you'd like to go to the last tab, it's faster to do gT than {count}gt

Dhruva Sagar
  • 7,089
  • 1
  • 25
  • 34
  • To facilitate using the count, it helps to put the tab number right in the tabline: http://vim.wikia.com/wiki/Show_tab_number_in_your_tab_line – Ben Apr 05 '14 at 17:41
  • @Ben that's right, and for terminal vim (what I use), you could use this https://gist.github.com/dhruvasagar/9995388 – Dhruva Sagar Apr 05 '14 at 17:50