Vim Practical Reference
Vim Practical Reference
Basic Navigation
Navigating efficiently in Vim is crucial for editing speed and effectiveness. This section covers the basic navigation commands that every Vim user should know.
Cursor Movement
- Left, Down, Up, Right: Use Arrow Keys or
h
,j
,k
,l
respectively. - Start of Line: Press
0
. - End of Line: Press
$
. - Top of File: Press
gg
. - Bottom of File: Press
G
.
Page Navigation
- Screen Down: Press
Ctrl + f
. - Screen Up: Press
Ctrl + b
. - Half Screen Down: Press
Ctrl + d
. - Half Screen Up: Press
Ctrl + u
.
Word Navigation
- Next Word: Press
w
. - Previous Word: Press
b
. - End of Word: Press
e
.
Line Navigation
- Go to Line Number: Type
:[line number]
then Enter. Example::15
. - Go to Middle of Screen: Press
M
. - Go to Top of Screen: Press
H
. - Go to Bottom of Screen: Press
L
.
You can also customize these keys in .vimrc
file for personalized navigation.