A quick reference of the vi commands

vi (visual editor) is the default command for the UNIX operating system.

Basic commands

CommandDescription
hmove cursor left one character
jmove cursor down one line
kmove cursor up one line
lmove cursor right one character
$move cursor to the end of current line
wmove cursor to the beginning of the next word
bmove cursor back to the beginning of preceding word
1Gmove cursor to the frist line in the file
nGmove cursor to line n
Gmove cursor to the line n
:uundo
:qquite
:wqsave and quite
:q!quite without saving
iinsert text before the cursor
IInsert text at the beginning of the current line
aappend text after the cursor
Aappend text to the end of the current line
oopen and put text in a new line
Oopen and put text in a new line above current line
トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS