Vim cursor stacks

From wikinotes

There are two stacks in vim that keep track of your position.

  • The tagstack keeps track of your position between <C-]> tag jumps
  • The jumpstack keeps track of all of your cursor positions (through files)

Tag Stack

Jump-Searching with tagstack

" tag:  lookup, jump to definition
" ================================
:tag  keyword
<C-]>
g-<lmb>


" tagselect: lookup, choose from definitions
" ==========================================
:ts  keyword
<g-]>

" next/prev definition
:tn
:tp

Manipulating the tagstack

:tags          " list tagstack
:po            " jump prev 1 stackframe
:[num]ta       " jump to stackframe at number 'num'

Jump Stack