How do I delete text without overwriting my yank register?
"_d
The "d command deletes text using the black hole register ("), which discards the deleted content instead of storing it.
216 results for "= motion"
"_d
The "d command deletes text using the black hole register ("), which discards the deleted content instead of storing it.
<C-f> (from command-line mode)
When you are partway through typing a long or complex Ex command on the : prompt, you can press to open the command-line window.
:silent! %normal @q
Combining :silent!, the % range, and :normal @q gives you a powerful pattern for applying a macro across an entire file while gracefully skipping lines that don
onoremap ih :<C-u>execute "normal! ?^==\+$\r:noh\rkvg_"<CR>
Vim lets you define custom text objects using operator-pending mode mappings (onoremap) and visual mode mappings (vnoremap).
@q (inside macro recording)
A recursive macro calls itself as its last action, causing it to repeat indefinitely until it hits an error (like reaching end of file or failing a search).
g$
The g$ command moves the cursor to the last character of the current screen line, not the end of the logical line.
di(
The di( command deletes everything inside the nearest pair of parentheses without removing the parentheses themselves.
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.
@q
A recursive macro is a macro that calls itself as its last step, causing it to loop automatically until an operation fails (such as reaching the end of the file
:set formatexpr=MyFormat()
The formatexpr option lets you replace Vim's built-in line-breaking logic for the gq operator with your own Vimscript expression or function.
:lua require('flash').jump()
flash.
qaqqa...@aq
A recursive macro calls itself at the end of its recording, creating a loop that repeats until a motion or command fails (like reaching the end of the file or f
; / ,
After using f, t, F, or T to jump to a character on the current line, pressing ; repeats the same search in the same direction, and , repeats it in the opposite
navigation #navigation #motions #normal-mode #editing #productivity
cw vs ciw
The cw and ciw commands both change a word, but they behave differently depending on cursor position.
editing #editing #text-objects #motions #normal-mode #productivity
zf / zo / zc / za
Vim's folding system lets you collapse blocks of code into a single line, hiding the details so you can focus on the structure.
editing #editing #folding #navigation #normal-mode #productivity
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.