HostOnNet Blog

vi commands

Looking for Linux Server Admin or WordPress Expert? We can help.

Vi Commands

:w Save file
:wq Save and exit
:q! exit with out saving.
:set number Show line number. To hide, use :set nunumber

Move Commands

CTRL + E Scroll the window down
CTRL + Y Scroll the window up
CTRL + F Scroll one page down
CTRL + B Scroll one page up
H move cursor to top of the window
M move cursor to middle of the window
L move cursor to bottom of the window
gg go to start of the file
G go to end of the file

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.