How do I search with vimgrep only in specific file types?
:vimgrep /pattern/ **/*.py
By specifying a file glob pattern with :vimgrep, you can restrict the search to specific file types.
414 results for "G"
: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
:<line-number>
When you know the exact line number you want to navigate to, the colon command is the quickest way to get there.
: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
:set incsearch
The incsearch option enables incremental search, which highlights matches in real time as you type the search pattern.
: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
:%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.
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.
``
The double backtick jumps to the exact position before the last jump.
Use :let i=1 with macro
By combining a Vimscript variable with a macro, you can create sequences with incrementing numbers.
qaYp<C-a>q99@a
By recording a macro that duplicates a line and increments its number, you can generate a numbered list of any length with a single replay command.
macros #macros #editing #normal-mode #automation #productivity
:'<,'>normal @q
The :'normal @q command runs macro q on every line of the visual selection.
/pattern\_s\+next
Vim's regular expressions support multi-line matching through underscore-prefixed atoms.
:Git
The vim-fugitive plugin by Tim Pope provides an interactive Git status window that lets you stage, unstage, diff, and commit files entirely from within Vim.
autocmd FileType {lang} setlocal {options}
Vim's autocmd FileType lets you apply settings that only take effect when editing a specific file type.