How do I call one macro from inside another macro in Vim?
When recording a macro, you can execute another macro inside it by pressing @b (or any register) during the recording.
870 results for "it at"
When recording a macro, you can execute another macro inside it by pressing @b (or any register) during the recording.
:%sort u
The :sort u command sorts all lines in the file and removes duplicate lines in one operation.
command-line #command-line #ex-commands #editing #text-manipulation #sort
{count}r{char}
The {count}r{char} command replaces a precise number of characters starting at the cursor position with a single repeated character.
:cdo keeppatterns s/\<foo\>/bar/gec | update
When quickfix already contains precise targets, :cdo gives you a safer multi-file replace loop than broad project substitutions.
command-line #command-line #quickfix #substitute #refactoring
:ls +
The :ls command (or :buffers) supports filter flags that narrow the buffer list to specific states.
:'<,'>sort n /\d\+/
Plain :sort n is useful, but it only works when the numeric key starts at the beginning of each line.
visual-mode #visual-mode #sorting #ex-commands #text-processing
:set list listchars=tab:>-,trail:~,eol:$
Enabling list mode makes Vim render normally invisible characters using configurable symbols defined in listchars.
:bufdo keeppatterns %s/\s\+$//e | update
If you keep many files open during a refactor, cleaning trailing whitespace one buffer at a time is slow and error-prone.
:'<,'>s/\%V\s\+$//
Sometimes you need to clean alignment artifacts in a rectangular region without touching the rest of each line.
visual-mode #visual-mode #substitution #regex #formatting #editing
crs / crc / crm / cru
The vim-abolish plugin adds coercion operators that instantly convert the word under the cursor between common naming conventions.
plugins #editing #text-objects #plugins #normal-mode #formatting
qaq
How it works To clear a macro register, you simply start recording into that register and immediately stop.
:history
:history displays a numbered list of your recently entered Ex commands, giving you a full audit of what you have run in the current session (and across sessions
:set {option}^=value
Vim's :set option^=value operator prepends a value to the front of a list-style option, giving it the highest priority.
:keepjumps keeppatterns %s/\s\+$//e<CR>
Bulk whitespace cleanup is common, but a plain substitution can leave side effects: your last search pattern changes and jump navigation gets noisy.
:reg {name}
The :reg {name} command displays the current contents of one or more named registers in a formatted listing.
/\Cpattern
Vim's ignorecase and smartcase settings change how all searches behave globally.
<C-x><C-k>
Vim's insert-mode completion system includes dictionary lookup via .
:set shortmess+=I
The shortmess option is a string of single-character flags that tell Vim which messages to suppress or abbreviate.
:ce
Vim has three built-in ex commands for text alignment that most users never discover: :ce (center), :ri (right-justify), and :le (left-justify).
set colorcolumn=+1
The colorcolumn option highlights one or more vertical columns to help keep lines within a length limit.