x nx |
delete forward one or n chars starting at current cursor pos |
X nX |
delete backward one or n chars starting with the char immediately |
| preceding the current cursor pos | |
D or d$ |
delete all chars from current cursor pos to EOL |
d0 or d| |
delete all preceding chars from first left col to char preceding |
| current cursor pos | |
dd ndd |
delete current or n lines beginning at current line |
dG |
delete all lines starting with current line to EOF |
d1G |
delete all lines starting with current line to BOF |
dnG |
delete all lines starting with current line to line n |
| (forward or backward depending on pos of line n relative to | |
| current line) | |
d- nd- |
delete current and preceding line or n lines |
d+ nd+ |
delete current and following line or n lines |
dw ndw |
delete word forward; i.e. from cursor pos to end of |
| current word or n words | |
db ndb |
delete word backward; i.e. from nearest preceding beg of |
| word or n words to char before current cursor pos |
If one or more words beyond the end of current line are deleted, the following line is appended to current line during deletion.