How do I access text from small deletes like dw or x?
"-p
The small delete register ("-) captures text from delete operations that are less than one line — like dw, x, dt.
25 results for "dw"
"-p
The small delete register ("-) captures text from delete operations that are less than one line — like dw, x, dt.
<C-r>-
In insert mode, - pastes the contents of the small delete register ("-).
qa0dwjq
Record a macro that goes to the start of line with 0, deletes the first word with dw, and moves down with j.
"_d{motion}
Vim's black hole register (") acts as a write-only sink: anything sent to it is discarded without affecting any other register, including the unnamed register (
<C-o> (insert mode)
Pressing while in insert mode lets you execute exactly one normal mode command and then automatically returns you to insert mode.
:let @q .= "keys"
The string concatenation assignment :let @q .
:%normal command
The :normal command executes normal mode commands programmatically on a range of lines.
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
p
The p command pastes (puts) the contents of the default register after the cursor.
w vs W, b vs B, e vs E
Vim distinguishes between "words" (sequences of keyword characters) and "WORDS" (sequences of non-blank characters).
de
The de command deletes from the cursor position to the end of the current word.
:'<,'>norm! A;
The :normal Ex command lets you execute any Normal mode keystrokes on a range of lines simultaneously, turning a single-line operation into a multi-line batch e
editing #editing #normal-mode #ex-commands #visual-mode #text-manipulation
qa0f:dwj0q
How it works When recording a macro that you plan to repeat across multiple lines, the key technique is to end the macro positioned on the next line, ready for
w
The w command moves the cursor forward to the beginning of the next word.
qQ (or any uppercase register letter)
When recording a macro with qq, you can append additional keystrokes to the existing macro by recording into the uppercase version of the same register.
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
W, B, and E
How it works Vim distinguishes between two types of word objects: A word (lowercase w, b, e) is a sequence of letters, digits, and underscores, or a sequence of
:help registers
Vim has 10 types of registers, each serving a specific purpose.
"1p
Vim automatically stores your deletion history in numbered registers "1 through "9.
:registers
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.