How do I select, change, or delete function arguments as text objects?
cia (with targets.vim) or daa
While Vim doesn't have a built-in argument text object, the targets.
2125 results for "i' a'"
cia (with targets.vim) or daa
While Vim doesn't have a built-in argument text object, the targets.
:highlight MyGroup guifg=#ff0000 guibg=NONE gui=bold
The :highlight command lets you define custom colors for syntax elements, UI components, and your own highlight groups.
:autocmd WinResized * wincmd =
When you resize your terminal window, Vim's split layout can become unbalanced.
D
The D command deletes everything from the cursor position to the end of the current line.
:echo @/
The / register holds the most recent search pattern.
:lua require('conform').format()
conform.
:echo @%
Vim provides special read-only registers that hold the current and alternate filenames.
:helptags ALL
Plugin help can break after manual installs, local plugin development, or branch switches that add/remove docs.
/foo\@<!bar
Vim regex supports zero-width assertions, so you can match text based on context without consuming the context itself.
]]
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
ci{
The ci{ command deletes everything inside the nearest pair of curly braces {} and places you in insert mode to type a replacement.
cit
The cit command deletes everything between the nearest pair of HTML/XML tags and drops you into insert mode, ready to type the replacement.
:wviminfo / :rviminfo
Vim can persist register contents (including macros) across sessions using viminfo (Vim) or shada (Neovim).
:windo setlocal scrollbind
When reviewing related files side by side, manually keeping splits aligned wastes attention.
:set grepformat=%f:%l:%c:%m
When :grep output does not land cleanly in quickfix, the parser format is usually the missing piece.
vitU
When editing markup-heavy files, you often need to transform only the tag contents while preserving the surrounding structure.
''
When you jump around a file, Vim tracks prior locations.
navigation #navigation #motions #marks #jumplist #normal-mode
:windo setlocal scrollbind cursorbind
When reviewing related files side by side, alignment drifts quickly if each window scrolls independently.
buffers-windows #buffers-windows #windows #scrolling #comparison
xp
The xp command swaps the character under the cursor with the character to its right.
:cfirst and :clast
:cfirst and :clast jump directly to the first or last entry in the quickfix list, skipping all intermediate results.