How do I write a Vim macro that automatically repeats until it fails?
qa{actions}@aq
A recursive macro is one that calls itself as its final action, causing it to repeat indefinitely until any command in the body fails (e.
795 results for "G"
qa{actions}@aq
A recursive macro is one that calls itself as its final action, causing it to repeat indefinitely until any command in the body fails (e.
:vimgrep /pattern/ **/*.ext | copen
The :vimgrep command searches for a regex pattern across multiple files and populates the quickfix list with every match.
search #search #quickfix #ex-commands #navigation #productivity #grep
Plug 'sheerun/vim-polyglot'
vim-polyglot is a collection of language packs for Vim.
:set shortmess-=S
The shortmess option controls which messages are shortened.
:command Name action
The :command command defines a new user Ex command.
{count}|
The command moves the cursor to a specific screen column on the current line.
<C-f> (from command-line)
When you are already in the middle of typing a command (after pressing :) and realize you need to compose something complex — a long substitution, a multi-pip
:vimgrep /pattern/ **/*.py
By specifying a file glob pattern with :vimgrep, you can restrict the search to specific file types.
<C-a>
The command increments the number under or after the cursor by 1.
:vimgrep /pattern/ **/*.ext
The :vimgrep command searches for a pattern across multiple files and populates the quickfix list with the results.
vim-gitgutter plugin
vim-gitgutter shows git diff markers in the sign column next to line numbers.
qaI"<Esc>A": "",<Esc>jq
This macro transforms a plain word into a JSON key-value pair format, useful for converting lists of field names into JSON structure.
:10,20t30
The :t command (short for :copy) duplicates lines from one location to another without touching any registers.
command-line #editing #ex-commands #lines #productivity #ranges
:args **/*.js | argdo %s/old/new/ge | update
The argument list (arglist) is Vim's mechanism for loading a set of files and running commands across all of them.
command-line #command-line #ex-commands #arglist #productivity #batch #editing
:<line-number>
When you know the exact line number you want to navigate to, the colon command is the quickest way to get there.
: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
:set incsearch
The incsearch option enables incremental search, which highlights matches in real time as you type the search pattern.
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.
:%normal command
The :normal command executes normal mode commands programmatically on a range of lines.
<C-r>{reg} in command line
While on the : command line, pressing followed by a register name inserts that register's contents.