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.
- /target<CR> Line 20 · search jump
- <C-o> Line 1 · previous jump
- <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
- Jump elsewhere with a search or G.
- Press Ctrl-o to return to an older position.
- Press Ctrl-i to move forward again; use :jumps to inspect the list.