f78
Readline Init Syntax
Variable Settings
Key Bindings
Once you know the name of the command, simply place the name of the key you
wish to bind
ffb
the command to, a colon, and then the name of the command on a line
in the
GNU Emacs style key escapes can be used, as in the following example:
You can change the state of a few variables in Readline. You do this by using
the
The editing-mode variable controls which editing mode you are using. By default, GNU Readline starts up in Emacs editing mode, where the keystrokes are most
similar to Emacs. This variable can either be set to emacs or vi.
This variable can either be set to On or Off. Setting it to On means that the text of the lines that you edit will scroll horizontally on a
single screen line when they are larger than the width of the screen, instead
of wrapping onto a new screen line. By default, this variable is set to Off.
This variable when set to On, says to display an asterisk, *, at the starts of history lines which have been modified. This variable is
off by default.
If this variable is set to On it means to use a visible bell if one is available, rather than simply
ringing the terminal bell. By default, the value is Off.
The syntax for controlling keybindings in the
keyname is the name of a key spelled out in English. For example:
Meta-Rubout: backward-kill-word
Control-o: ">&output"
keyseq differs from keyname in that strings denoting an entire key sequence can be specified. Simply
place the key sequence in double quotes.
\C-x\C-r: re-read-init-file
\e[11: Function Key 1
Move to the start of the current line.
Move to the end of the line.
Move forward a character.
Move back a character.
Move forward to the end of the next word.
Move back to the start of this, or the previous, word.
Clear the screen leaving the current line at the top of the screen.
Commands For Manipulating The History
Accept the line regardless of where the cursor is. If this line is non-empty,
add it to the history list. If this line was a history line, then restore the
history line to its original state.
Move up through the history list.
Move down through the history list.
Move to the first line in the history.
Move to the end of the input history, i.e., the line you are entering.
Search backward starting at the current line and moving up through the
history as necessary. This is an incremental search.
Search forward starting at the current line and moving down through the the
history as necessary.
Commands For Changing Text
Delete the character under the cursor. If the cursor is at the beginning of
the line, and there are no characters in the line, and the last character typed
was not C-D, then return EOF.
Delete the character behind the cursor. A numeric argument says to kill the
characters instead of deleting them.
Add the next character that you type to the line verbatim. This is how to
insert things like C-Q for example.
Insert a tab character.
Insert yourself.
Drag the character before point forward over the character at point. Point
moves forward as well. If point is at the end of the line, then transpose the two
characters before point. Negative arguments dont work.
Drag the word behind the cursor past the word in front of the cursor moving
the cursor over that word as well.
Uppercase all letters in the current (or following) word. With a negative
argument, do the previous word, but do not move point.
Lowercase all letters in the current (or following) word. With a negative
argument, do the previous word, but do not move point.
Uppercase the first letter in the current (or following) word. With a negative
argument, do the previous word, but do not move point.
Killing And Yanking
Kill the text from the current cursor position to the end of the line.
Kill backward to the beginning of the line. This is normally unbound.
Kill from the cursor to the end of the current word, or if between words, to
the end of the next word.
Kill the word behind the cursor.
Kill the whole line the way C-U used to in Unix line input. The killed text is saved on the kill-ring.
Kill the word the way C-W used to in Unix line input. The killed text is saved on the kill-ring. This
is different than backward-kill-word because the word boundaries differ.
Yank the top of the kill ring into the buffer at point.
Rotate the kill-ring, and yank the new top. You can only do this if the prior
command is yank or yank-pop.
Specifying Numeric Arguments
Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.
Do what C-U does in GNU Emacs. By default, this is not bound.