vim-sical shortcuts
Background
I just can’t remember those darn vim shortcuts…
there you go…
file nav
gg- jump to start of fileShift G- jump to end of file
line nav
$- jump to end of line0- jump to start of line
editing
:[range]s/{pattern}/{string}/[flags] [count]- Search and Replace, general form, default range is the current line. Userful range%for whole file, useful flagsg(global) for all occurences,c(confirm) to ask the user for each replace:%s/foo/bar/gc- Search and Replace in the whole documentfoowithbarbut ask everytime the user
file ops
:editor:eplus file name - open file for editing
scren splitting
:splitor:sp- split screen horizontal:vsplitor:vsp- split screen vertical[Ctrl] + w [arrow keys]- jump between split screens