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 documentfoo
withbar
but ask everytime the user
file ops
:edit
or:e
plus file name - open file for editing
scren splitting
:split
or:sp
- split screen horizontal:vsplit
or:vsp
- split screen vertical[Ctrl] + w [arrow keys]
- jump between split screens