Delete selected lines or delete from the block edge to line ends
D
Example
Visual line 0 / 1Normal 1 / 1 one
two
keepCursor on line 2, column 1 · Line selectionkeepCursor on line 1, column 1Delete selected lines or delete from the block edge to line ends.
Vim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 1Delete register 1- Characterwise
Empty
Deleted the two selected lines.
Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break · Uses Delete register 1
··one↵ ····two↵ 1Delete register 1 Changed- Linewise · ↵ marks a line break
··one↵ ····two↵
Before & after
one
two
keepCursor on line 2, column 1 · Line selectionVim registers
"Unnamed register- Characterwise · Uses Yank register 0
saved 1Delete register 1- Characterwise
Empty
keepCursor on line 1, column 1Vim registers
"Unnamed register Changed- Linewise · ↵ marks a line break · Uses Delete register 1
··one↵ ····two↵ 1Delete register 1 Changed- Linewise · ↵ marks a line break
··one↵ ····two↵
Start in Visual line mode. The highlighted area is observed in Vim. Any displayed register boxes show the exact copied or deleted contents.
Details & Vim help
Example replayed in Vim
Delete selected lines or delete from the block edge to line ends. Use in Visual mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative. In characterwise or linewise Visual mode, delete whole selected lines. In blockwise Visual mode, delete from the block's left edge through each selected line's end instead.