shabashj
8/24/2015 - 1:27 PM

Vim rules

Vim rules

i   //insert mode
Esc //exit mode


//--------------------------------------------------------
// Navigation
//--------------------------------------------------------
w //jump by word

f + [char] //finds char in current line

) // go to start of next sentence
( // go to start of prev sentence

} // go to next paragraph
{ // go to prev paragraph

gg // go to begining of the file
G  // go to end of file

[num]+G // go to line number [num] (40G)

Ctrl+f //page down
Ctrl+b //page up

H //go to first line of current window (high)
L //go to last line of current window (low)
M //go to first line of current window (middle)

[num] + H //go to [num] line from beginnig of current window
[num] + L //go to [num] line from end of current window

//--------------------------------------------------------
// Commands
//--------------------------------------------------------
:q //exit
:w //save
:wq //save and exit

:set number //show line numbers

:h //go left
:l //go right
:k //go up
:j //go down