Basic Commands in VI Editor

by Nirmala 2009-11-07 17:27:14

Basic Commands:
h - move to the left
j - `jump' down a line
k - move up a line
l - move to the right
- - same as k
+ - same as j
e - move to the end of a word
w - move forward to the beginning of a word
b - move backward to the beginning of a word
$ - move to the end of the line
0 - move to the beginning of the line
^ - move to the beginning of the line
G - move to the end of the file
H - move to the top of the display
M - move to the middle of the display
L - move to the bottom of the display
B - move back to previous blank space
E - move ahead to next blank space
B - move back to previous blank space
CR - same as j
CTRL-G - print current location in the file
CTRL-L - clear and redraw
CTRL-f - change display forward a page
CTRL-b - change display back a page
CTRL-d - change display down half a page
CTRL-u - change display up half a page
CTRL-y - shift display down on screen
CTRL-e - shift display up on screen
z- - recenter display so cursor is at top
z. - recenter display around cursor
z+ - recenter display aso cursor is at bottom
zCR - recenter display so cursor is at top
'm - move to the beginning of the line of mark m
`m - move to the location of mark m
) - move forward 1 sentence
( - move back 1 sentence
} - move forward 1 paragraph
{ - move back 1 paragraph
20| - go to 20th character in the line
:22 - move to line 22
6w - move forward 6 words
6b - move backward 6 words
8+ - move down 8 lines

Tagged in:

1097
like
1
dislike
0
mail
flag

You must LOGIN to add comments