Summary

Table 10.2 summarizes the basic vi commands you learned in this hour.

Table 10.2. Basic vi Commands
Command Meaning
0 Move to the beginning of the line.
$ Move to the end of the line.
a Append text—enter into insert mode after the current character.
^b Back up one screen of text.
B Back up one space-delimited word.
b Back up one word.
Backspace Move left one character.
^d Move down half a page.
D Delete through the end of the line.
d Delete—dw = delete word, dd = delete line.
Escape Leave insert mode and return to command mode.
^f Move forward one screen of text.
G Go to the last line of the file.
nG Go to the nth line of the file.
h Move left one character.
i Insert text—enter into insert mode before the current character.
j Move down one line.
k Move up one line.
l Move right one character.
n Repeat last search.
O Open new line for inserting text above the current line.
o Open new line for inserting text below the current line.
Return Move to the beginning of the next line.
^u Move up half a page.
U Undo—restore current line if changed.
u Undo the last change made to the file.
W Move forward one space-delimited word.
w Move forward one word.
X Delete a single character.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset