KEYS:
0 - beginning of line.
^ - 1st character on line
$ - end of line
g_ - last character on line
H - 1st line of screen
M - middle of screen.
L - last line of screen.
ctrl+f - forward one screen.
ctrl+b - backs one screen
ctrl+d - down a half screen
ctrl+u - up a half screen
N% - Go to the Nth percentage line of the file.
NG - Go to the Nth line of the file.
G - Go to the end of the file.
`" - Go to the position where you were in NORMAL MODE while last closing the file.
`^ - Go to the position where you were in INSERT MODE while last closing the file.
g - Go to the beginning of the file.
e - go to the end of the current word.
E - go to the end of the current WORD.
b - go to the previous (before) word.
B - go to the previous (before) WORD.
w - go to the next word. # granular - separated by punction or other non-blank values
W - go to the next WORD. # entire block
Paragraph Navigation
{ - Go to the beginning of the current paragraph.
By pressing { again and again move to the previous paragraph beginnings.
} - Go to the end of the current paragraph.
By pressing } again and again move to the next paragraph end, and again.
Search Navigation
/i - Search for a pattern which will you take you to the next occurrence of it.
?i - Search for a pattern which will you take you to the previous occurrence of it.
* - Go to the next occurrence of the current word under the cursor.
# - Go to the previous occurrence of the current word under the cursor.
Navigation from Command Line
vi +N filename: Go to the Nth line of the file after opening it.
e.g. vi +10 /etc/passwd
vi +/ filename
Go to the particular pattern's line inside the file, first occurrence from first.
e.g. vi +/install README
vi ?/ filename
Go to the particular pattern's line inside the file, last occurrence.
e.g. vi +?bug README
|