How do I list all possible completions for the current command-line entry in Vim?
Pressing in Vim's command line displays the full list of matching completions below the command prompt, without cycling through them one at a time.
category:
command-line
tags:
#command-line
#completion
#ex-commands
#navigation
How do I append yanked text to an existing register without overwriting it in Vim?
Using an uppercase register letter with any operator appends to the register instead of replacing it.
category:
registers
tags:
#registers
#yank
#delete
#editing
#normal-mode
How do I scroll the view horizontally by half a screen width in Vim?
zH and zL scroll the viewport horizontally by half a screen width, letting you navigate wide content efficiently when wrap is disabled.
category:
navigation
tags:
#navigation
#scrolling
#horizontal
#nowrap
#motions
How do I make Vim show error messages that are silently swallowed inside :silent! or :try blocks?
When troubleshooting mappings or scripts that use :silent!, errors disappear without a trace.
category:
config
tags:
#config
#macros
#ex-commands
How do I execute Ctrl-W window commands from a Vimscript mapping or function without using :normal?
:wincmd is the Ex command equivalent of any keystroke.
category:
buffers-windows
tags:
#buffers-windows
#windows
#ex-commands
How do I reduce the jarring jump when the cursor reaches the screen edge by making Vim scroll multiple lines at once?
When scrolloff is 0 and the cursor moves just past the screen boundary, Vim scrolls by exactly one line, which can feel abrupt during rapid navigation.
category:
config
tags:
#config
#navigation
How do I use zero-width lookbehind assertions in Vim search patterns to match text only when preceded (or not preceded) by a pattern?
Vim's \@<= and \@<! atoms let you write zero-width lookbehind assertions — they check what comes before the match position without consuming characters.
category:
search
tags:
#search
#regex
#patterns
#advanced
How do I quickly resize the current window to exactly N lines tall in Vim?
The z{N} command sets the current window's height to exactly N lines and simultaneously positions the current line at the top of the window.
category:
buffers-windows
tags:
#buffers-windows
#windows
#navigation
What is the difference between zt and z-Enter when scrolling the current line to the top of the screen?
Both zt and z scroll the view so that the current line lands at the top of the screen, but they differ in one small but important way: z also moves the cursor t
category:
navigation
tags:
#navigation
#normal-mode
How do I get a brief visual flash to confirm what text was just yanked in Neovim?
After yanking text in Vim it can be hard to tell exactly what was captured, especially with larger motions or text objects.
category:
config
tags:
#registers
#config
#normal-mode
What is the difference between \n and \r in Vim substitution patterns and replacements?
One of the most confusing asymmetries in Vim's substitution syntax: \n and \r mean different things depending on whether they appear in the pattern or the repla
category:
search
tags:
#search
#ex-commands
#editing
How do I navigate Vim's undo tree branches to access states that u and Ctrl-R can't reach?
Vim's undo history is a tree, not a linear stack.
category:
editing
tags:
#undo-redo
#normal-mode
#editing
How do I undo or redo all changes made within a specific time window in Vim?
:earlier {N}m and :later {N}m
Vim's :earlier and :later commands let you travel through your edit history by wall-clock time rather than by individual undo steps.
category:
command-line
tags:
#undo-redo
#ex-commands
#editing
How do I highlight the entire column under the cursor to help with aligning data?
:set cursorcolumn (or the short form set cuc) highlights the entire vertical column where the cursor sits, painting a visible strip from top to bottom of the wi
category:
config
tags:
#config
#navigation
#editing
#normal-mode
How do I jump to the next search match and keep it centered on the screen?
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
category:
navigation
tags:
#navigation
#search
#normal-mode
How do I convert a horizontal split into a vertical split or move a window to the far side of the screen?
After opening a split you can dynamically reposition windows using H, J, K, and L.
category:
buffers-windows
tags:
#windows
#buffers-windows
#navigation
#normal-mode
How do I make substitutions replace every match on a line by default without typing the g flag?
By default, :s/old/new/ only replaces the first occurrence of a pattern on each line.
category:
config
tags:
#config
#search
#substitute
#ex-commands
How do I open or close a fold and all its nested folds at once?
zO and zC are the recursive counterparts to zo and zc.
category:
editing
tags:
#folding
#navigation
#editing
#normal-mode
How do I make Vim automatically reformat paragraphs as I type so lines stay within the textwidth?
Vim's formatoptions setting controls how automatic text formatting works.
category:
config
tags:
#config
#formatting
#ex-commands
#insert-mode
How do I open or edit a file in the same directory as the file I am currently editing?
Vim expands % to the current file's path in Ex commands, and the :h modifier strips the last filename component to give you just the directory.
category:
command-line
tags:
#ex-commands
#buffers
#navigation
#editing