Vim: Browsing with Tags Cheat Sheet

When editing programs, there is often a need to jump to another location. Vim uses a tags file that lists each word and location. The tags file has to be created by a utility able to handle the syntax of your files, and has to be updated after significant editing has occurred.

CTRL-]LMB-on-tag+CTRLg LMB-on-tagJump to tagPostion the cursor over a tag name, visually select text, use the left-mouse-button (LMB). Pushes current location to tag stack for later return.
CTRL+tReturn after jumpPops location to jump to from tag stack.
:tagsShow tag stackList of return locations, used by CTRL+t.

Leave a Reply

Your email address will not be published. Required fields are marked *