How do I jump several older change locations at once in Vim instead of repeating g;?
Answer
5g;
Explanation
Most users know g; moves backward through the changelist, but fewer people use a count with it. Adding a count lets you skip multiple change entries in one motion, which is faster when you're auditing an older edit chain or bisecting where a regression was introduced.
How it works
g;jumps to an older position in the changelist- A leading count repeats the motion internally
5g;means "go back five changelist entries" in one command
5g;
This is often cleaner than pressing g; repeatedly because the jump is deterministic and easier to reason about when you are moving through a long sequence of edits.
Example
Suppose your recent edits were at lines 220, 198, 176, 154, and 131. If you are currently at the newest location and want to inspect the oldest one in that run:
Current location: line 220
Changelist history: 198 -> 176 -> 154 -> 131
Run 4g; and Vim lands directly on line 131.
Tips
Use g, with a count to move forward again through the same history. If your target is inside folds, append zv (4g;zv) to reopen the folded region immediately after the jump.