Action |
|
---|---|
h, j, k, l |
Left, down, up, right (←, ↓, ↑, →) |
Spacebar |
Right |
Backspace |
Left |
Ctrl-H |
Left |
Long lines in a file may show up on the screen as multiple lines. While most commands work on the lines as defined in the file, a few commands work on lines as they appear on the screen.
Command |
Action |
---|---|
0, $ |
First, last position of current line. |
^, _ |
First nonblank character of current line. |
+, - |
First character of next, previous line. |
Return |
First nonblank character of next line. |
n| |
Column n of current line. |
g0, g$ |
First, last position of screen line. {vim} |
g^ |
First nonblank character of screen line. {vim} |
gm |
Middle of screen line. {vim} |
gk, gj |
Move up, down one screen line. {vim} |
H |
Top line of screen. |
M |
Middle line of screen. |
L |
Last line of screen. |
nH |
n lines after top line of screen. |
nL |
n lines before last line of screen. |
Action |
|
---|---|
Ctrl-G |
Display current filename and line number. |
gg |
Move to first line in file. {vim} |
nG |
Move to line number n. |
G |
Move to last line in file. |
:n |
Move to line number n. |
Copyright © 2003 O'Reilly & Associates. All rights reserved.