How do I access previous deletions from the numbered registers?
"1p through "9p
Registers 1-9 contain the last 9 deletions or changes that are at least one line long.
1024 results for "i" a""
"1p through "9p
Registers 1-9 contain the last 9 deletions or changes that are at least one line long.
:execute 'normal! ' . count . 'j'
The :execute command evaluates a string as an Ex command, enabling dynamic command construction.
vat
The vat command visually selects the nearest enclosing HTML or XML tag and all of its contents, including the opening and closing tags themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
v_o
When you start a visual selection, the cursor is at one end and the anchor is at the other.
:call matchadd('Search', 'pattern')
The matchadd() function lets you add persistent highlights to patterns without affecting the search register.
/\vfoo\zsbar\ze/
Vim's \zs (start of match) and \ze (end of match) atoms let you control which portion of a pattern is treated as the actual match.
dd
The dd command deletes the entire current line, regardless of where the cursor is positioned on that line.
cia (with targets.vim) or daa
While Vim doesn't have a built-in argument text object, the targets.
f{char}
The f{char} command moves the cursor forward to the next occurrence of {char} on the current line.
<C-k>{char1}{char2}
Vim has a built-in digraph system that lets you insert hundreds of special characters by typing two-character mnemonics.
editing #editing #insert-mode #special-characters #unicode #productivity
v / V / <C-v> (while in visual mode)
When you are already in visual mode and realize you need a different selection type, you do not have to exit and re-enter.
: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.
<C-w>+ and <C-w>-
The + and - commands increase or decrease the height of the current split window by one line.
: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
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.
"+p
The "+p command pastes the contents of the system clipboard into Vim.
"1p then u. to cycle through delete history
Vim silently maintains a rolling history of your last 9 deletions in numbered registers "1 through "9.