Vim Recall繁體中文

Force operator to work blockwise

{operator}Ctrl-v{motion}

Example

Normal 0 / 2
one
two
three
Cursor on line 1, column 2

Force operator to work blockwise.

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
1 Delete register 1
CharacterwiseEmpty
· space ⇥ tab ↵ line break
Before & after
Before
one
two
three
Cursor on line 1, column 2

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
1 Delete register 1
CharacterwiseEmpty
· space ⇥ tab ↵ line break
After
oe
to
three
Cursor on line 1, column 2

Vim registers

" Unnamed register Changed
Blockwise · 1 · Uses Delete register 1n↵ w
1 Delete register 1 Changed
Blockwise · 1n↵ w
· space ⇥ tab ↵ line break

Start in Normal mode. Use d as {operator} and j as {motion}; the modifier changes the operator's shape, not the starting mode.

Details & Vim help

Example replayed in Vim

Force operator to work blockwise. This key changes the motion type while an operator is pending; it is not the standalone Normal-mode Visual command. Supply an operator first and a motion afterward. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.