How do I restrict a substitute command to only the text within my last visual selection using the percent-V atom?
The \%V atom in Vim's regex engine matches only within the area of the last visual selection.
category:
search
tags:
#search
#visual-mode
#substitute
#advanced
#ex-commands
How do I adjust the width of a visual block selection without restarting it?
In visual block mode (), pressing O (uppercase) moves your cursor to the other end of the current line — letting you expand or contract the block's horizontal
category:
visual-mode
tags:
#visual-mode
#visual-block
#selection
#editing
How do I open a terminal inside Vim?
The :terminal command opens an interactive terminal emulator directly inside a Vim window.
category:
command-line
tags:
#command-line
#ex-commands
#buffers-windows
How do I find and open a file by name without knowing its full path?
The :find command searches for a file by name across all directories in your path setting and opens it.
category:
buffers-windows
tags:
#buffers
#file-management
#navigation
#workflow
How do I change the case of matched text in a substitute replacement using \u, \U, \l, or \L modifiers?
Vim's substitute command supports case-change modifiers in the replacement string that let you capitalize, uppercase, or lowercase matched text as part of the s
category:
search
tags:
#search
#ex-commands
#substitute
#editing
How do I insert the output of a shell command into my file?
The :r !command command executes a shell command and inserts its output directly into the current buffer below the cursor line.
category:
command-line
tags:
#command-line
#ex-commands
#editing
How do I move the cursor to the end of a line?
The $ command moves the cursor to the last character of the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I center or right-align text within a specific column width in Vim?
Vim has three built-in Ex commands for aligning text without any plugins: :left, :center, and :right.
category:
editing
tags:
#editing
#formatting
#ex-commands
#visual-mode
How do I search for and highlight text that exceeds a specific column width like 80 or 120?
The pattern /\%>80v.
category:
search
tags:
#search
#navigation
#normal-mode
How do I set a Vim option for only the current buffer or window without affecting others?
:setlocal {option}={value}
:setlocal sets an option only for the current buffer or window, leaving all other buffers and windows unaffected.
category:
config
tags:
#config
#ex-commands
How do I permanently add a word to my personal spell file so Vim stops marking it as misspelled?
When Vim's spell checker flags a technical term, proper noun, or project-specific identifier as misspelled, you can permanently silence it with zg ("mark as goo
category:
config
tags:
#config
#editing
#search
How do I control which number formats Vim uses when incrementing and decrementing with Ctrl-A and Ctrl-X?
The nrformats option tells Vim how to interpret numbers when you press (increment) or (decrement).
category:
config
tags:
#config
#editing
#increment
#numbers
#normal-mode
How do I append multiple yanks into one named register and paste them as one block?
Named registers are much more powerful when you treat them as accumulators instead of one-shot clipboards.
category:
registers
tags:
#registers
#named-registers
#yank
#paste
How do I pipe a visual selection through an external shell command and replace it with the output?
After making a visual selection and entering the command line with :, Vim automatically inserts the range ' for the selection.
category:
visual-mode
tags:
#visual-mode
#ex-commands
#editing
#shell
How do I manually add the current position to the jump list before making a large movement?
Vim's jump list automatically records your position whenever you make large motions (like G, /pattern, or ).
category:
navigation
tags:
#navigation
#marks
#normal-mode
How do I turn custom command output like file:line:col:message into a navigable quickfix list?
:setlocal errorformat=%f:%l:%c:%m | cexpr system('tool %') | copen
Not every linter or internal script speaks Vim quickfix format out of the box.
category:
command-line
tags:
#command-line
#quickfix
#errorformat
#linting
#workflow
How do I step through the files in my argument list one at a time?
When Vim is opened with multiple files (e.
category:
command-line
tags:
#buffers-windows
#ex-commands
#navigation
#editing
How do I set up blink.cmp as a faster, Rust-powered completion engine in Neovim?
blink.
category:
plugins
tags:
#completion
#plugins
#lsp
#insert-mode
How do I paste a register's content in Insert mode without Vim adjusting the indentation?
The standard {reg} pastes register contents in Insert mode, but Vim may auto-indent multi-line text to match the current indentation level — sometimes manglin
category:
registers
tags:
#registers
#insert-mode
#editing
How do I run a command on lines near each match, not just the matching line itself?
The :g (global) command normally operates on lines that match a pattern.
category:
command-line
tags:
#ex-commands
#editing
#search
#global