HostOnNet Blog

vi commands

Vi Commands

:wSave file
:wqSave and exit
:q!exit with out saving.
:set numberShow line number. To hide, use :set nunumber

Move Commands

CTRL + EScroll the window down
CTRL + YScroll the window up
CTRL + FScroll one page down
CTRL + BScroll one page up
Hmove cursor to top of the window
Mmove cursor to middle of the window
Lmove cursor to bottom of the window
gggo to start of the file
Ggo to end of the file

Posted in Linux