Vim - Random

Search and replace asking for confirmation:

%s/foo/bar/gc

Copy current line:

yy

Copy new two lines:

2yy

Delete (Cut) current line:

dd

Paste lines:

p

Undo:

u

Redo:

Ctrl + r

Move beginning of line:

^

Move end of line:

$

Change default editor:

export VISUAL=vim