z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Moving the cursor on the line

z/OS UNIX System Services User's Guide
SA23-2279-00

You can also move the cursor by whole word boundaries, using word-motion commands. Make sure that you are in Command Mode (press <Esc>). 0 and $ let you move back and forth on a line quickly.
Command
Moves the cursor:
^or 0
To the beginning of the current line (to the first nonblank space). The command 0 is short for 0|, which moves the cursor to column number 0.
$
To the end of the current line
$ stands for the end of the line in a number of vi commands.

Go to the beginning of a line, and press w. The cursor jumps forward to the beginning of the next word on the line. w stands for word and it moves the cursor forward one word. If you keep pressing w, the cursor keeps jumping forward. When you jump forward from the last word in the line, you go to the first word in the next line. If you precede w with a number (as in 5w), the cursor jumps forward that many words.

Typing b is like typing w, except that you go back a word instead of forward. If you go back from the first word on a line, you get to the last word on the previous line. If you precede b with a number (as in 3b), the cursor jumps backward that many words.

If the cursor is in the middle of a word, typing e moves the cursor to the end of the word. For example, if the cursor is in the middle of the word slithy, typing e moves the cursor to the last letter in the word. If the cursor is already on the last letter of a word, typing e moves the cursor to the end of the next word.

To move the cursor between words including punctuation (that is, punctuation is considered to be a word), use the following commands:
Command
Moves the cursor:
e
To the end of the current word
w
To the beginning of the next word
b
To the beginning of the previous word
To move the cursor between words ignoring punctuation (that is, punctuation is skipped), use the following commands:
Command
Moves the cursor:
E
To the end of the current word
W
To the beginning of the next word
B
To the beginning of the previous word

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014