Vim

From Tuxmint Wiki
Jump to navigation Jump to search

Vim cheat sheet [1]

Vim Cheat Sheet
Command Description
u undo
Ctrl+r redo
12Ctrl+r redo to 12 steps before
v mark regulary
Ctrl+v mark in a block style
i insert at this character
I insert at the beginning of the line
dd delete line
yy yank (copy) current line
y$ yank (copy) from current character to the end of the line
c$ cut from current character to the end of the line
d$ delete from current character to the end of the line
:w write (save and stay)
:wq write (save) and quit
:x same as :wq
:wq! force write (save) and quit
:q quit
:q! force quit (close without saving)
. redo last action
Useful Combinations
Command Description
Ctrl+v & I & make changes & Esc mark in a block style, insert