GAP allows you to edit the current input line with a number of editing
commands. Those commands are accessible either as control keys or as
escape keys. You enter a control key by pressing the ctr key, and,
while still holding the ctr key down, hitting another key key. You
enter an escape key by hitting esc and then hitting another key key.
Below we denote control keys by ctr-key and escape keys by
esc-key. The case of key does not matter, i.e., ctr-
a are equivalent.
Characters not mentioned below always insert themselves at the current cursor position.
The first few commands allow you to move the cursor on the current line.
A move the cursor to the beginning of the line.
B move the cursor to the beginning of the previous word.
B move the cursor backward one character.
F move the cursor forward one character.
F move the cursor to the end of the next word.
E move the cursor to the end of the line.
The next commands delete or kill text. The last killed text can be reinserted, possibly at a different position with the yank command.
H or del delete the character left of the cursor.
D delete the character under the cursor.
K kill up to the end of the line.
D kill forward to the end of the next word.
esc-del kill backward to the beginning of the last word.
X kill entire input line, and discard all pending input.
Y insert (yank) a just killed text.
The next commands allow you to change the input.
T exchange (twiddle) current and previous character.
U uppercase next word.
L lowercase next word.
C capitalize next word.
The tab character, which is in fact the control key ctr-
I, looks at
the characters before the cursor, interprets them as the beginning of an
identifier and tries to complete this identifier. If there is more than
one possible completion, it completes to the longest common prefix of all
those completions. If the characters to the left of the cursor are
already the longest common prefix of all completions hitting tab a
second time will display all possible completions.
tab complete the identifier before the cursor.
The next commands allow you to fetch previous lines, e.g., to correct typos, etc. This history is limited to about 8000 characters.
L insert last input line before current character.
P redisplay the last input line, another ctr-
redisplay the line before that, etc. If the cursor is
not in the first column only the lines starting with the
string to the left of the cursor are taken.
N Like ctr-
P but goes the other way round through the
< goes to the beginning of the history.
goes to the end of the history.
O accepts this line and perform a ctr-
Finally there are a few miscellaneous commands.
V enter next character literally, i.e., enter it even if it
is one of the control keys.
U execute the next command 4 times.
esc-num execute the next command num times.
L repaint input line.
Previous Up Top Next