Learning the vi Editor/Appendix/Navigation
Appearance
Command | Description | Notes |
h or ← or <backspace> | left | moves the cursor one step to the left |
j or ↓ | down | moves the cursor down to the next line |
k or ↑ | up | moves the cursor down to the previous line |
l or → or <space> | right | moves the cursor one step to the right |
w | next word | moves the cursor to the beginning of the next word |
W | next word (ignor punctuation) | same as w but only uses space as delimiter |
b | beginning of the word | if the cursor is already in the beginning of a word it moves to the beginning of the previous word |
B | beginning of the word (ignor punctuation) | same as b but only uses space as delimiter |
e | end of the word | if the cursor is already in the end of a word it moves to the end of the next word |
E | move to end of current word (ignor punctuation) | same as e but only uses space as delimiter |
( | previous sentence | moves the cursor backward to the previous sentence |
) | next sentnce | moves the cursor forword to the next sentence |
- | previous line | moves the cursor up to the beginning of the previous line |
+ | next line | moves the cursor down to the beginning of the next line |
0 | beginning of line | moves the cursor to the beginning of the line |
$ | end of line | moves the cursor to the end of the line |
^U | scroll up | |
^D | scroll down | |
^B or <page up> | page up | in comparison to scrolling, paging leaves more lines from the previous page |
^F or <page down> | page down | in comparison to scrolling, paging leaves more lines from the previous page |
H or gg | home | moves the cursor to the beginning of the first line |
L or G | last line | moves the cursor to the beginning of the last line |