Vim Recall繁體中文

Retrace searches and large jumps

<C-o> or <C-i>

Example

Normal mode on line 1. The next match for target is on line 20.

Before
Start: line 1 A search for target jumps to line 20.

  1. /target<CR> Line 20 · search jump
  2. <C-o> Line 1 · previous jump
  3. <C-i> Line 20 · forward again

After
After Ctrl-o: line 1 After Ctrl-i: line 20

Details & Vim help

Visit older or newer positions in the window’s jump list.

Return from a search result or a distant section.

The jump list differs from the change list and does not record every cursor move. Ctrl-i may be indistinguishable from Tab in some terminals.

The jump list tracks searches and other jumps. It differs from the change list used by g; and g,.

Try it in Vim

  1. Jump elsewhere with a search or G.
  2. Press Ctrl-o to return to an older position.
  3. Press Ctrl-i to move forward again; use :jumps to inspect the list.