
ksh(1) | ksh(1) |
The editing modes enable the user to look through a window at the current line. The default window width is 80, unless the value of COLUMNS is de®ned. If the line is longer than the window width minus two, a mark displayed at the end of the window noti®es the user. The mark is a >, <, or * if the line extends respectively on the right, left, or both side(s) of the window. As the cursor moves and reaches the window boundaries, the window is centered about the cursor.
The search commands in each edit mode provide access to the history ®le. Only strings are matched, not patterns, although a leading à in the string restricts the match to begin at the ®rst character in the line.
Emacs Editing Mode
This mode is invoked by either the emacs or gmacs option. Their sole difference is their handling of ÃT. To edit, the user moves the cursor to the point needing correction and inserts or deletes characters or words. All editing commands are control characters or escape sequences. The notation for control characters is circum¯ex (Ã) followed by the character. For example, ÃF is the notation for
The notation for escape sequences is M- followed by a character. For example,
All edit commands operate from any place on the line (not only at the beginning). Neither the Return nor the Line Feed key is entered after edit commands, except when noted.
ÃF | Move cursor forward (right) one character. |
| |
Move cursor forward one word. (The editor's idea of a word is a string of characters consist- | |||
| ing of only letters, digits and underscores.) |
| |
ÃB | Move cursor backward (left) one character. |
| |
Move cursor backward one word. |
| ||
ÃA | Move cursor to start of line. |
|
|
ÃE | Move cursor to end of line. |
|
|
Ã]char | Move cursor forward to character char on current line. |
| |
Move cursor backward to character char on current line. |
| ||
ÃXÃX | Interchange the cursor and mark. |
| |
erase | (User de®ned erase character as de®ned by the stty(1) command, usually ÃH or #.) Delete | ||
| previous character. |
|
|
ÃD | Delete current character. |
|
|
eof | |||
Delete current word. |
|
| |
| |||
Delete previous word. |
|
| |
| mand does not work). |
|
|
ÃT | Transpose current character with next character in emacs mode. Transpose two previous | ||
| characters in gmacs mode. |
|
|
ÃC | Capitalize current character. |
|
|
Capitalize current word. |
|
| |
Change the current word to lowercase. |
| ||
ÃK | Delete from the cursor to the end of the line. If preceded by a numerical parameter whose | ||
| value is less that the current cursor position, delete from the given position up to the cur- | ||
| sor. If preceded by a numerical parameter whose value is greater than the current cursor | ||
| position, from the cursor up to the given position. |
| |
ÃW | Kill from the cursor to the mark. |
| |
Push the region from the cursor to the mark on the stack. |
| ||
kill | ÃG or @.) Kill the | ||
| entire current line. If two kill characters are entered in succession, all subsequent consecu- | ||
| tive kill characters cause a line feed (useful when using paper terminals). | ||
ÃY | Restore last item removed from line (yank item back to the line). |
| |
ÃL | Line feed and print current line. |
|
|
Ã@ | (Null character) Set mark. |
|
|
(Meta space) Set mark. |
|
| |
ÃJ | (New line) Execute the current line. |
| |
ÃM | (Return) Execute the current line. |
| |
− 18 − | Section 1−413 | ||
k