How do I navigate between errors and results in the quickfix list?
:cnext
The quickfix list is Vim's built-in way to collect a list of positions — typically compiler errors, grep results, or linter warnings — and jump between them
181 results for "n N"
:cnext
The quickfix list is Vim's built-in way to collect a list of positions — typically compiler errors, grep results, or linter warnings — and jump between them
//
In Vim, pressing // (two forward slashes) in Normal mode repeats the last search pattern.
:let @a = substitute(@a, 'old', 'new', 'g')
After recording a macro or yanking text into a named register, you may need to tweak it — fix a typo in a recorded macro, change a variable name in yanked tex
:keeppattern {cmd}
Many Ex commands silently overwrite the search register (@/), which changes your hlsearch highlighting and n/N behavior.
/pattern\zs.*\ze/
Vim's \zs (start of match) and \ze (end of match) atoms let you define a search pattern but only highlight or operate on a portion of it.
:let @a = "value"
The :let @{reg} = expr command lets you assign any string or expression directly into a named register without entering insert mode or performing a yank.
:'<,'>norm @q
When you visually select lines and then type a : command, Vim automatically inserts ' (the visual range marks) into the command line.
:b N
How it works Every buffer in Vim is assigned a unique number when it is opened.
/pattern1/;/pattern2/
Vim's search offsets allow chaining two patterns together with a semicolon.
:call setreg('a', @a . 'text', 'l')
How it works Vim provides two functions for advanced register manipulation: setreg() and getreg().
:t.
The :t (short for :copy) command copies lines from one location to another.
:ls!
:ls (or :buffers) shows Vim's buffer list, but it hides unlisted buffers — help files, directory listings (netrw), terminal buffers, and scratch buffers marke
"/p
Vim stores the last search pattern in the search register "/.
:bprev
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
:keeppatterns
Normally, any command that uses a pattern — including :substitute, :global, and :vimgrep — replaces the current search register @/ with the new pattern.
<C-x><C-f>
The command triggers filename completion in insert mode.
editing #editing #insert-mode #completion #file-management #productivity
<C-y>,
The emmet-vim plugin brings the full power of Emmet (formerly Zen Coding) to Vim, letting you type a short CSS-like abbreviation and expand it into a complete H
\v
Vim's default regex mode ("magic") requires backslashes before many special characters: \(, \ , \+, \{.
* then :%s//new/g
Pressing searches for the word under the cursor, which also loads it into the search register.
<C-w>^
Vim tracks the alternate buffer — the last file you were editing before the current one.