How do I keep each search match centered and unfolded as I jump with n?
nzzzv
When you are stepping through many matches, plain n often lands with poor context and can hide the match inside a closed fold.
415 results for "n N"
nzzzv
When you are stepping through many matches, plain n often lands with poor context and can hide the match inside a closed fold.
set foldlevelstart=N
When Vim opens a file with folds enabled, it uses the foldlevelstart option to decide how many fold levels to open automatically.
5:
Typing a count before : in normal mode automatically fills in a line range in the command line.
command-line #command-line #ex-commands #ranges #normal-mode
<C-n> / <C-p>
Vim has a powerful built-in completion system that requires zero plugins.
{N}%
The {N}% command jumps the cursor to the line that is N percent of the way through the file.
/pattern/e+2
Vim's search command supports an offset suffix that controls where the cursor lands after a match.
set complete=.,w,b,u,t
The complete option controls which sources Vim scans when you press or for generic keyword completion.
:earlier {time}
Vim's :earlier and :later commands let you travel through undo history using real-world time intervals instead of individual change counts.
<C-n>
The vim-visual-multi plugin (formerly vim-multiple-cursors) brings VS Code-style multiple cursor editing to Vim.
plugins #plugins #visual-multi #editing #multiple-cursors #refactoring
{count}r{char}
The {count}r{char} command replaces a precise number of characters starting at the cursor position with a single repeated character.
/pattern\{3}
Vim supports counted quantifiers that let you specify exactly how many times a pattern should repeat.
:earlier 1h
Vim's undo history is annotated with timestamps, allowing you to travel back to any point in time using :earlier and forward using :later.
:keeppatterns %s/old/new/g
The :keeppatterns modifier runs any Ex command without modifying Vim's last search pattern (stored in @/).
command-line #search #ex-commands #command-line #substitute #registers
:earlier
Vim's undo history is not just a linear list of changes — it records timestamps too.
/pattern/+3
Vim's search command accepts an offset after the pattern that shifts where the cursor lands relative to the match.
nzz
Typing nzz chains two normal-mode commands: n jumps to the next match of the last search, and zz immediately redraws the screen so the cursor line is vertically
gd / gr / <leader>rn with nvim-lspconfig
The Language Server Protocol (LSP) brings IDE-level intelligence to Neovim — go-to-definition, find references, rename symbol, and more.
/\%>5l\%<10l pattern
Vim's \%>{lnum}l and \%5l — matches only at positions after line 5 (i.
:set shada
Neovim's ShaDa (Shared Data) file replaces Vim's viminfo and persists session state across restarts — marks, registers, command history, search history, jump
:%s/,/\r/g
In Vim's substitute command, \r in the replacement string inserts a newline.