Skip to content

Delete

delete word

dw  -> delete until the start of next word
de  -> delete after the end of current word
db  -> delete to beginning of current word
d2w -> delete until start of 2ed word

delete line

d0  -> delete to line front
d$  -> delete to line end
dd  -> delete current line
2dd -> delete 2 lines

delete file

:%d -> delete the whole file
dgg -> delete to the beginning of the file
dG  -> delete to the end of the file

change

ce  -> delete to word end and insert
c2w -> delete to 3rd word front and insert
c3e
c0
c$