tags:

views:

456

answers:

4

Hi,

I've just started using the NERDTree vim plugin for my project.

I can't find the documentation for switching between opened tabs. Can anyone tell me the shortcut key[s] ?

Thanks...

+2  A: 

A quick check in :h tabs reveals it's CTRL-Page Down to cycle between tabs. You can also use the :tabnext command (:tabn for short).

Michael Madsen
+2  A: 

An additional option (and my personal choice)beyond the ones listed by Michael Madsen:

gt = next tab

gT = previous tab

Chad Birch
+1  A: 

I like to bind my vim navigation keys to switching between tabs. Here are the lines from my .vimrc file:

map  <C-l> :tabn<CR>
map  <C-h> :tabp<CR>
map  <C-n> :tabnew<CR>

That way, I can switch between tabs using the left and right buttons just like I normally would move the cursor, except I just hold the Control key as well.

  • Control+l moves to the next tab
  • Control+h moves to the previous tab
  • Control+n creates a new tab
Brian Riehman
interesting. this will certainly com in handy. is it possible to change the mapping for VIM navigation commands like the difficult to hit SHIFT+$ ?
J3M 7OR3
Are you referring to moving to the end of the line? If so, a simple command can do this 'map <C-l> $' or something similar.
Brian Riehman
A: 

hey, when open new tab, it spreads full screen, so how can i see other opening tabs?

ndgiang84