PracticalVim Tip55 - yszheda/wiki GitHub Wiki

Tip 55: Traverse the Jump List

Return to the top: <>

  • `:jumps`: inspect the contents of the jump list
  • ``: jump forward
  • ``: jump backward
  • ``/`` cannot be used in Visual mode or Operator-Pending mode.
  • Each separate window has its own jump list → `` and `` commands will always be scoped to the jump list of the active window.
| Command | Effect | | `[count]G` | Jump to line number | | `//pattern`/`?pattern`/`n`/`N` | Jump to next/previous occurrence of pattern | | `%` | Jump to matching parentheses | | `(`/`)` | Jump to start of previous/next sentence | | `{`/`}` | Jump to start of previous/next paragraph | | `H`/`M`/`L` | Jump to top/middle/bottom of screen | | `gf` | Jump to file name under the cursor | | `` | Jump to definition of keyword under the cursor | | '{mark}/`{mark} | Jump to a mark |

Beware of Mapping the Tab Key

  • In Insert mode: `` is equivalent to ``.
  • If you map the `` key to something else, it will overwrite the default behavior of the `` command.
⚠️ **GitHub.com Fallback** ⚠️