| Movement Commands |
| Character Movement |
| h or <left arrow> or Ctrl-H |
| l or <right arrow> or <Space> |
| k or <up arrow> or Ctrl-P |
| j or <down arrow> or Ctrl-N or Ctrl-J |
|
| one character to the left |
| one character to the right |
| one character up |
| one character down |
|
| Text |
| b, w |
| B, W |
| e, E |
| ( , ) |
| { , } |
|
| backward, forward one regular word |
| backword, forward one blank delimited word |
| forward to end of regular/blank delimited word |
| beginning of previous, next sentence |
| beginning of previous, next paragraph |
|
| Lines |
| 0, $ |
| ^ |
| -, + |
| | |
| n| |
| H, M, L |
| nH |
| nL |
| G |
| nG |
| :n<Enter> |
|
| first, last position of current line |
| first nonblank character of current line |
| first character of previous, next line |
| move to column 1 of current line |
| move to column n of current line |
| top, middle, bottom line of screen |
| n lines after top line |
| n lines before bottom line |
| move to last line in file |
| move to line n |
| move to line n |
|
| Screens |
| Ctrl-B, Ctrl-F |
| Ctrl-U, Ctrl-D |
| Ctrl-Y, Ctrl-E |
| z <Enter> |
| z. |
| z- |
|
| Scroll backward, forward one screen |
| Scroll up, down one half screen |
| Show one more line at top, bottom of screen |
| Reposition line with cursor to top of screen |
| Reposition line with cursor to middle of screen |
| Reposition line with cursor to bottom of screen |
|
| Marking Position |
| mx |
| 'x |
| `x |
| '' (two single quotes) |
| `` |
|
| Mark current position as x |
| Move to first character of line with mark x |
| Move to character at mark x |
| Move to previous position |
| Move to beginning of line with previous position |
|
| Searches |
| fx |
| Fx |
| tx |
| Tx |
| ; |
| , |
| /pattern <Enter> |
| ?pattern <Enter> |
| n, N |
| /, ? |
|
| Search forward in current line for character x |
| Search backward in current line for character x |
| Search forward in current line for character before character x |
| Search backward in current line for character after character x |
| Repeat last f, F, t, T in same direction |
| Repeat last f, F, t, T in opposite direction |
| Search forward for pattern |
| Search backward for pattern |
| Repeat last search in same, opposite direction |
| Repeat last search in forward, backward direction |
|
| Moving to Matching Delimiter |
|
|
| Move to matching (, ), [, ], {, }
| |