zhuang@linux:~/reading/practical-vim/09-navigate-bwtween-files-with-jumps/$ less

Practical Vim / chapter 09

Navigate Between Files with Jumps

$ grep tags 09-navigate-bwtween-files-with-jumps.md

This post extracts some knowledge from Chapter 9 – Navigate Between Files with Jumps.

Each separate window has its own jump list.

C-o and u

we press g;, that places the cursor back on the line and column where it ended up after the previous edit. The result is the same as if we had pressed u, except that we don’t make any transitory changes to the document. g, is the reverse direction.

The `. mark always references the position of the last change, while the `^ mark tracks the position of the cursor the last time that Insert mode was stopped.

Use gf to go to the filename under the cursor.

vim
:set path?
:set suffixesadd?

The m{letter} command allows us to create a mark at the current cursor position. Lowercase letters create marks that are local to a buffer, whereas uppercase letters create global marks. Having set a mark, we can snap our cursor back to it with the `{letter} command.

zhuang@linux:~/reading/practical-vim/09-navigate-bwtween-files-with-jumps/$ comments