Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move forward in VIM Tag Searching and Navigation?

Ctrl + ] is to jump to the definition. Ctrl + T is to go back. What's the opposite of Ctrl + T?

like image 474
Srikanth Avatar asked May 25 '10 07:05

Srikanth


People also ask

How do I navigate faster in Vim?

TL;DR: Use for small navigation. Use with relative line numbers. h , j , k and l are the basic movement keys in Vim. They should be used instead of the usual arrow keys on the keyboard to, as discussed above, keep your fingers on the home row as much as possible.

How do I jump to the next word in Vim?

Press w (“word”) to move the cursor to the right one word at a time. Press b (“back”) to move the cursor to the left one word at a time. Press W or B to move the cursor past the adjacent punctuation to the next or previous blank space. Press e (“end”) to move the cursor to the last character of the current word.


1 Answers

:help tag-stack


:[count]po[p][!]        Jump to [count] older entry in tag stack (default 1). 
                        See |tag-!| for [!].  {not in Vi}                     

:[count]ta[g][!]        Jump to [count] newer entry in tag stack (default 1). 
                        See |tag-!| for [!].  {not in Vi}                     

You can also use ctrl + i and ctrl + o to move forwards and backwards respectively through the jump list. This works with tag commands since they count as jump movements.

So: jump to a tag ctrl + ]

jump back: ctr + o

jump to tag again ctrl + i

:help jump-motions

like image 146
bc17 Avatar answered Sep 28 '22 00:09

bc17