from gdb.texinfo on 11 July 1994 -->
Go to the previous, next section.
There are only four constructs allowed in the `~/.inputrc' file:
set
command within the init file. Here is how you
would specify that you wish to use Vi line editing commands:
set editing-mode vi
Right now, there are only a few variables which can be set; so few in fact, that we just iterate them here:
editing-mode
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
.
horizontal-scroll-mode
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
.
mark-modified-lines
On
, says to display an asterisk
(`*') at the starts of history lines which have been modified.
This variable is off by default.
prefer-visible-bell
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
.
Once you know the name of the command, simply place the name of the key you wish to bind the command to, a colon, and then the name of the command on a line in the `~/.inputrc' file. The name of the key can be expressed in different ways, depending on which is most comfortable for you.
Control-u: universal-argument Meta-Rubout: backward-kill-word Control-o: ">&output"
In the above example, C-u is bound to the function
universal-argument
, and C-o is bound to run the macro
expressed on the right hand side (that is, to insert the text
`>&output' into the line).
"\C-u": universal-argument "\C-x\C-r": re-read-init-file "\e[11~": "Function Key 1"
In the above example, C-u is bound to the function
universal-argument
(just as it was in the first example),
C-x C-r is bound to the function re-read-init-file
, and
ESC [ 1 1 ~ is bound to insert the text `Function Key 1'.
Go to the previous, next section.