No |
Command Type |
Command |
Meaning |
1 |
Entering vi |
vi file.ext |
edits the file named file.ext |
2 |
Entering vi |
vi + number file.ext |
edit the file beginning at the specified line number. |
3 |
Entering vi |
vi + file.ext |
edit the file beginning at the last line. |
4 |
Entering vi |
vi -t tag |
starts with a tag to be searched for |
5 |
Entering vi |
vi -r |
lists save files |
6 |
Entering vi |
vi -r file |
edit a file recovered when the system crashes. |
7 |
Entering vi |
vi + / string file.ext |
edit the file beginning with a search for string. |
8 |
Entering vi |
vi file1 file2 |
edit files consecutively (via : n) |
9 |
Cursor movements |
k, ctrl-p, uparrow |
move cursor to character above the cursor. |
10 |
Cursor movements |
l, right-arrow, spacebar |
advance the cursor one position to right. |
11 |
Cursor movements |
h, left-arrow |
backspace the cursor one position to left. |
12 |
Cursor movements |
j, ctrl-n, down-arrow |
move cursor to character below the cursor. |
13 |
Cursor movements |
+, enter-key |
move cursor to 1st position of new line. |
14 |
Cursor movements |
- |
move cursor to 1st position of previous line. |
15 |
Cursor movements |
w |
move cursor to beginning of the next word after the cursor. |
16 |
Cursor movements |
W |
move cursor to beginning of next whitespace delimited word. |
17 |
Cursor movements |
b |
move cursor to beginning of word before the curseor. |
18 |
Cursor movements |
B |
move cursor to beginning of previous word, ignoring punctuation. |
19 |
Cursor movements |
e |
move cursor to end of current word |
20 |
Cursor movements |
E |
move cursor to end of previous word |
21 |
Cursor movements |
) |
move cursor to beginning of next sentence after the cursor. |
22 |
Cursor movements |
( |
move cursor to beginning of sentence before the cursor. |
23 |
Cursor movements |
} |
move cursor to beginning of next paragraph after the cursor. |
24 |
Cursor movements |
{ |
move cursor to beginning of paragraph before the cursor. |
25 |
Cursor movements |
]] |
move cursor to beginning of next section or function. |
26 |
Cursor movements |
[[ |
move cursor to beginning of previous section or function. |
27 |
Cursor movements |
ctrl-D |
scroll down one-half screen. |
28 |
Cursor movements |
number ctrl-D |
scroll down number/2 screenfulls. |
29 |
Cursor movements |
ctrl-U |
scroll up one-half screen. |
30 |
Cursor movements |
number ctrl-U |
scroll up number/2 screenfulls. |
31 |
Cursor movements |
ctrl-E |
expose one more line onto bottom of the screen. |
32 |
Cursor movements |
ctrl-Y |
expose one more line onto the top of the screen. |
33 |
Cursor movements |
ctrl-F |
move forward one page. |
34 |
Cursor movements |
ctrl-B or |
move back one page. |
35 |
Cursor movements |
H |
home cursor to top of current screen. |
36 |
Cursor movements |
number H |
move cursor to the numbered line of the current screen. |
37 |
Cursor movements |
M |
move cursor to middle line of current screen. |
38 |
Cursor movements |
L |
move cursor to bottom line of the current screen. |
39 |
Cursor movements |
number L |
move cursor to the specified line from bottom of screen. |
40 |
Cursor movements |
" |
move cursor back to where you were prior to last command. |
41 |
Cursor movements |
^ |
move cursor to 1st non-blank positon on the line. |
42 |
Cursor movements |
$ |
move cursor to the end of the current line. |
43 |
Cursor movements |
z |
make current line top of screen. |
44 |
Cursor movements |
z <.> |
make current linke center of screen. |
45 |
Cursor movements |
z number |
redraw screen with current line in center of number line window. |
46 |
Cursor movements |
f char |
move cursor forward to the next specified character in the line. |
47 |
Cursor movements |
F char |
move cursor backward to the previous specified character. |
48 |
Cursor movements |
t char |
move up the character forward. |
49 |
Cursor movements |
T char |
move back up to character. |
50 |
Cursor movements |
; |
repeat previous f, F, t, or T command. |