How do I see all search matches highlighted as I type the pattern?
:set incsearch hlsearch
The combination of incsearch and hlsearch gives you live, interactive search highlighting.
181 results for "n N"
:set incsearch hlsearch
The combination of incsearch and hlsearch gives you live, interactive search highlighting.
:resize N / :vertical resize N
The :resize and :vertical resize commands set a window to an exact number of lines or columns.
:[range]normal @q
The :[range]normal @q command replays the macro in register q on every line within a given range.
:set mouse=a
How it works The :set mouse=a command enables mouse support in all Vim modes.
:sort
The :sort command sorts lines in the current buffer or a specified range alphabetically.
qaqqa{actions}@aq@a
A recursive macro is a macro that calls itself at the end of its recording.
{count}|
The command moves the cursor to a specific screen column on the current line.
L
The L command moves the cursor to the last line visible in the current window.
:nnoremap key command
The :nnoremap command creates a non-recursive normal mode mapping.
gt and gT
The gt command moves to the next tab page and gT moves to the previous one.
:copen / :cnext / :cprev
The quickfix list is Vim's built-in mechanism for navigating a list of file locations — compiler errors, grep results, search matches, or any structured outpu
navigation #navigation #quickfix #ex-commands #productivity #workflow
ce
The ce command changes from the cursor position to the end of the current word.
/foo\_.*bar
Vim's default .
/pattern\_s\+next
Vim's regular expressions support multi-line matching through underscore-prefixed atoms.
:{range}command
Every Ex command in Vim can be preceded by a range that specifies which lines it should operate on.
command-line #command-line #ex-commands #ranges #editing #productivity
<C-o> and <C-i>
Vim maintains a jump list of positions you have visited.
:sort u
The :sort u command sorts all lines in the buffer (or a selected range) alphabetically and removes duplicate lines in a single pass.
>>
The >> command shifts the current line one shiftwidth to the right, adding indentation.
g- / g+
Vim doesn't have a simple linear undo stack — it maintains a full undo tree with branches.
editing #editing #undo-redo #normal-mode #advanced #productivity
:verbose nmap <leader>
The :verbose prefix on mapping commands shows not just the mapping definition but also the file and line number where it was defined.