How do I jump several older change locations at once in Vim instead of repeating g;?
5g;
Most users know g; moves backward through the changelist, but fewer people use a count with it.
5g;
Most users know g; moves backward through the changelist, but fewer people use a count with it.
:set isfname+=@-@
gf is fast until it stops exactly at characters common in modern import paths, especially @ in scoped package names (@org/pkg/file).
:djump /MY_MACRO/
:djump searches for matches using Vim's definition search rules and jumps to the selected hit.
:ijump /MySymbol/
:ijump is an include-aware jump command that searches the current file plus files discovered through your include and path settings, then jumps directly to a se
]m / [m
When you're reviewing or refactoring C-style code, jumping by words or paragraphs is too coarse, and search can become noisy.
navigation #navigation #motions #code-navigation #normal-mode
:ptjump /{pattern}
When a symbol name is ambiguous, jumping directly with :tag can bounce you around the codebase and disrupt your working context.
navigation #navigation #tags #windows #code-navigation #command-line
d/END/e<CR>
When you need to remove text up to a known marker, a plain search motion is often almost right but stops at the start of the match.
5<C-o>
Most Vim users know jumps backward in the jumplist, but fewer use a count with it.
<C-o>zvzz
Jumping backward with is fast, but in folded or dense files it can land you in a collapsed section or near the edge of the screen, forcing extra cleanup keystro
:keepjumps normal! /\Vtarget\<CR>
Repeated navigational searches can pollute the jump list, especially when you are doing targeted inspections before returning to your main edit location.
navigation #navigation #search #jumplist #normal-mode #workflow
g;zvzz
Jumping through the changelist with g; is useful, but in real files the destination can land inside a closed fold or off-center on screen, which slows review.
:keepmarks {command}
Many batch edits in Vim update special marks like '[ and '], which can disrupt follow-up motions or tooling that depends on those positions.
navigation #navigation #marks #command-line #refactoring #editing
,
After using f, t, F, or T for single-character motion on a line, Vim lets you repeat that character search without retyping the target.
]`
Most users jump to marks directly ('a, ` a `), but when a file has many lowercase marks, stepping through them in order is faster than remembering each name.
:keepjumps normal! gg
Sometimes you need to make a quick structural move (for example, jump to top, inspect context, then return) without polluting jump navigation history.
nzzzv
When you are stepping through many matches, plain n often lands with poor context and can hide the match inside a closed fold.
''
When you jump around a file, Vim tracks prior locations.
navigation #navigation #motions #marks #jumplist #normal-mode
gm
The gm command moves the cursor horizontally to the middle of the current screen width on the current line.
`0
Vim automatically saves your cursor position when you exit, storing it as the 0 mark in the viminfo file (or shada file in Neovim).
:find {filename}
:find searches for a file in all directories listed in the path option and opens it in the current window.