How do I choose between multiple tag definitions when jumping to a symbol in Vim?
g<C-]>
When a symbol (function, class, variable) is defined in multiple places, CTRL-] blindly jumps to the first match.
g<C-]>
When a symbol (function, class, variable) is defined in multiple places, CTRL-] blindly jumps to the first match.
g]
g] is the disambiguation-aware alternative to .
:ptag function_name
The :ptag command opens a tag definition in a small preview window at the top of the screen, letting you read the definition without losing your place in the cu
buffers-windows #buffers #windows #tags #preview #navigation
:pop or <C-t>
When you jump to a tag definition with , Vim pushes your location onto a tag stack.
vit
Press vit to select the inner content of the nearest HTML/XML tag.
<C-]> / <C-t>
The command jumps to the definition of the keyword under the cursor using a tags file, and jumps back.
ysiw<em>
The vim-surround plugin makes wrapping text in HTML or XML tags effortless.
cit
The cit command deletes everything between the nearest pair of HTML/XML tags and drops you into insert mode, ready to type the replacement.