Published: 01-01-2007 | Author: Remy van Elst | Text only version of this article
❗ This post is over fifteen years old. It may no longer be up to date. Opinions may have changed.
Note: Not finished yet!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
:sp - split horizontal
:vsp - split vertical
^W + l - move left
^W + k - move split up
^W + j - move split down
^W + h - move split left
gg - go to beginning of a file
G - go to the end of the file
3G - go to the 3rd line
w - go to beginning of next word
e - go to end of word
b - go to beginning of word.
3w - go to the 3rd word.
% - go to matching parentheses
^/0 - go to beginning of line
$ - go to end of line
o - insert new line below current one
O - insert new line above current one
A - start typing at the end of this line.
- - find next occurence of word under the cursor
# - find previous occurence of word under the cursor.
:s/foo/bar/g - replace foo with bar on this line.
:%s/foo/bar/g - replace all foo's with bar's
/foo - find 'foo'.
n/N - go to next match/go to previous match.