Basic Editing in Vim
From the Vim cheat sheet · Editing · verified Jul 2026
Basic Editing
Essential editing commands
text
x - Delete character under cursor
X - Delete character before cursor
dw - Delete word
dd - Delete line
D - Delete from cursor to end of line
cc - Change (delete and enter insert mode) entire line
C - Change from cursor to end of line
cw - Change word
s - Substitute character (delete and enter insert)
S - Substitute line
yy - Yank (copy) line
yw - Yank word
p - Paste after cursor
P - Paste before cursor
u - Undo
Ctrl+r - Redo
. - Repeat last command💡 d is delete, c is change (delete + insert), y is yank (copy)
⚡ Use . to repeat the last edit command
📌 dd deletes line, yy copies line, p pastes
🟢 Remember: d cuts, y copies, p pastes
editingdeletecopy