How do I move the cursor just after each search match instead of at match start?
/pattern/e+1<CR>
Most Vim searches place the cursor at the start of the match.
2277 results for "@a"
/pattern/e+1<CR>
Most Vim searches place the cursor at the start of the match.
<C-r><C-r>"
In Insert mode, plain {register} inserts register content but may reindent or auto-format depending on context.
registers #registers #insert-mode #editing #indentation #text
:set belloff=all
The belloff=all option disables all error bells and visual bells in Vim.
:%s/\v^([^,]+),([^,]+),/\2,\1,/<CR>
When CSV-like data has two columns in the wrong order, manually fixing each line is slow and error-prone.
z{height}<CR>
The z{height} command simultaneously resizes the current window to exactly {height} lines, scrolls so the current line sits at the top of the window, and moves
buffers-windows #buffers-windows #windows #resize #navigation
:set matchpairs+=<:>
By default, the % command jumps between (), {}, and [] pairs.
config #navigation #config #matchpairs #editing #normal-mode
[[ and ]]
[[ and ]] navigate between section boundaries — typically the start of the previous or next top-level block.
:'[,']normal! =
When you need to run a command on exactly the text you just changed, yanked, or pasted, Vim's automatic marks are faster and safer than reselecting manually.
command-line #command-line #marks #indentation #ex-commands #normal-mode
:sort
The :sort command sorts lines in the current buffer or a specified range alphabetically.
:vimgrepadd /pattern/j **/*<CR>
When you are investigating code, you often need to collect several related patterns before deciding what to edit.
:set timeoutlen=300 ttimeoutlen=10
If key mappings feel laggy, many users reduce timeoutlen and stop there.
config #config #mappings #terminal #performance #insert-mode
:%s/pattern/replacement/gn
When you are about to run a broad substitution, it is often safer to measure impact first.
command-line #command-line #ex-commands #substitution #search
"+y
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
U (in visual mode)
In visual mode, pressing U converts all selected text to uppercase.
:set conceallevel=2
The conceallevel option controls how Vim displays characters that have the "conceal" syntax attribute.
:keepjumps normal! gg=G
Bulk formatting commands are common in cleanup sessions, but they often leave side effects in your navigation history.
:Gitsigns preview_hunk
gitsigns.
<C-w>
Pressing in insert mode deletes the word before the cursor instantly, without requiring you to switch to normal mode.
:ALEFix
ALE (Asynchronous Lint Engine) is a popular Vim plugin that runs linters and formatters asynchronously in the background, showing errors and warnings in the gut
:2match Todo /FIXME/
Vim provides three independent match slots — :match, :2match, and :3match — each of which highlights a pattern using a specified highlight group.