How do I make Vim highlight matching brackets when typing?
:set showmatch
How it works The :set showmatch option makes Vim briefly jump the cursor to the matching opening bracket when you type a closing bracket.
399 results for "it at"
:set showmatch
How it works The :set showmatch option makes Vim briefly jump the cursor to the matching opening bracket when you type a closing bracket.
:changes
How it works Vim maintains a change list that records the position of every change you make to a buffer.
/<C-r>0
How it works After yanking text, you can use it directly as a search pattern by inserting the yank register contents into the search prompt.
<C-o>
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
<C-v>jj"ay then "ap
How it works Vim registers remember not just the text content but also the type of selection that was used to yank it: characterwise, linewise, or blockwise.
:set backupdir=~/.vim/backup// directory=~/.vim/swap//
How it works By default, Vim creates backup files (ending in ~) and swap files (ending in .
g; / g,
The g; and g, commands let you navigate Vim's changelist — a per-buffer history of every position where you made a change.
navigation #navigation #changelist #editing #normal-mode #marks
100@a
When you give a large count to a macro — such as 100@a — Vim automatically stops replaying the macro as soon as any step inside it fails.
/\%Vpattern
The \%V atom restricts a search pattern to only match inside the most recent visual selection.
Use :s/pat/rep/e flag or :silent! prefix
By default, Vim macros abort on the first error — a failed search, a substitute with no matches, or a movement that can't be performed.
zj and zk
How it works When working with folded code in Vim, you often want to skip from one fold to another without unfolding anything.
let g:netrw_liststyle=3 and let g:netrw_banner=0
How it works Vim ships with a built-in file explorer called netrw that you can access with :Explore (or :Ex).
:'<,'>normal @a
The :'normal @a command executes the macro stored in register a on every line within the current visual selection.
:m+1 / :m-2
The :m (move) command relocates lines to a new position in the file without using registers.
editing #editing #ex-commands #lines #productivity #mappings
"%p
The % register in Vim always contains the name of the current file.
registers #registers #editing #insert-mode #productivity #filename
:%s/\(pattern1\)\(pattern2\)/\2\1/g
Vim's substitute command supports capture groups that let you match parts of text, remember them, and rearrange or reuse them in the replacement.
:let i=1 then use <C-r>=i<CR> in macro
By combining a Vimscript variable with the expression register inside a macro, you can create a counter that increments on each replay.
:r !command
The :r !command command executes a shell command and inserts its output directly into the current buffer below the cursor line.
`.
The ` .
"ap, edit, "ayy
Vim stores macros in registers, which means you can paste a macro's contents into a buffer, edit it as regular text, and yank it back into the register.