📄 rluser.texinfo
字号:
This variable when set to @code{On}, says to display an asterisk(@samp{*}) at the starts of history lines which have been modified.This variable is off by default.@item prefer-visible-bell@vindex prefer-visible-bellIf this variable is set to @code{On} it means to use a visible bell ifone is available, rather than simply ringing the terminal bell. Bydefault, the value is @code{Off}.@end table@item Key BindingsThe syntax for controlling keybindings in the @file{~/.inputrc} file issimple. First you have to know the @i{name} of the command that youwant to change. The following pages contain tables of the command name,the default keybinding, and a short description of what the commanddoes.Once you know the name of the command, simply place the name of the keyyou wish to bind the command to, a colon, and then the name of thecommand on a line in the @file{~/.inputrc} file. The name of the keycan be expressed in different ways, depending on which is mostcomfortable for you.@table @asis@item @w{@var{keyname}: @var{function-name} or @var{macro}}@var{keyname} is the name of a key spelled out in English. For example:@exampleControl-u: universal-argumentMeta-Rubout: backward-kill-wordControl-o: ">&output"@end exampleIn the above example, @key{C-u} is bound to the function@code{universal-argument}, and @key{C-o} is bound to run the macroexpressed on the right hand side (that is, to insert the text@samp{>&output} into the line).@item @w{"@var{keyseq}": @var{function-name} or @var{macro}}@var{keyseq} differs from @var{keyname} above in that strings denotingan entire key sequence can be specified. Simply place the key sequencein double quotes. GNU Emacs style key escapes can be used, as in thefollowing example:@example"\C-u": universal-argument"\C-x\C-r": re-read-init-file"\e[11~": "Function Key 1"@end exampleIn the above example, @key{C-u} is bound to the function@code{universal-argument} (just as it was in the first example),@key{C-x C-r} is bound to the function @code{re-read-init-file}, and@key{ESC [ 1 1 ~} is bound to insert the text @samp{Function Key 1}.@end table@end table@menu* Commands For Moving:: Moving about the line.* Commands For History:: Getting at previous lines.* Commands For Text:: Commands for changing text.* Commands For Killing:: Commands for killing and yanking.* Numeric Arguments:: Specifying numeric arguments, repeat counts.* Commands For Completion:: Getting Readline to do the typing for you.* Miscellaneous Commands:: Other miscillaneous commands.@end menu@node Commands For Moving@subsubsection Commands For Moving@ftable @code@item beginning-of-line (@key{C-a})Move to the start of the current line.@item end-of-line (@key{C-e})Move to the end of the line.@item forward-char (@key{C-f})Move forward a character.@item backward-char (@key{C-b})Move back a character.@item forward-word (@key{M-f})Move forward to the end of the next word.@item backward-word (@key{M-b})Move back to the start of this, or the previous, word.@item clear-screen (@key{C-l})Clear the screen leaving the current line at the top of the screen.@end ftable@node Commands For History@subsubsection Commands For Manipulating The History@ftable @code@item accept-line (Newline, Return)Accept the line regardless of where the cursor is. If this line isnon-empty, add it to the history list. If this line was a historyline, then restore the history line to its original state.@item previous-history (@key{C-p})Move `up' through the history list.@item next-history (@key{C-n})Move `down' through the history list.@item beginning-of-history (@key{M-<})Move to the first line in the history.@item end-of-history (@key{M->})Move to the end of the input history, i.e., the line you are entering!@item reverse-search-history (@key{C-r})Search backward starting at the current line and moving `up' throughthe history as necessary. This is an incremental search.@item forward-search-history (@key{C-s})Search forward starting at the current line and moving `down' throughthe the history as neccessary.@end ftable@node Commands For Text@subsubsection Commands For Changing Text@ftable @code@item delete-char (@key{C-d})Delete the character under the cursor. If the cursor is at thebeginning of the line, and there are no characters in the line, andthe last character typed was not @key{C-d}, then return EOF.@item backward-delete-char (Rubout)Delete the character behind the cursor. A numeric arg says to killthe characters instead of deleting them.@item quoted-insert (@key{C-q}, @key{C-v})Add the next character that you type to the line verbatim. This ishow to insert things like @key{C-q} for example.@item tab-insert (@key{M-TAB})Insert a tab character.@item self-insert (a, b, A, 1, !, ...)Insert yourself.@item transpose-chars (@key{C-t})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, thentranspose the two characters before point. Negative args don't work.@item transpose-words (@key{M-t})Drag the word behind the cursor past the word in front of the cursormoving the cursor over that word as well.@item upcase-word (@key{M-u})Uppercase the current (or following) word. With a negative argument,do the previous word, but do not move point.@item downcase-word (@key{M-l})Lowercase the current (or following) word. With a negative argument,do the previous word, but do not move point.@item capitalize-word (@key{M-c})Uppercase the current (or following) word. With a negative argument,do the previous word, but do not move point.@end ftable@node Commands For Killing@subsubsection Killing And Yanking@ftable @code@item kill-line (@key{C-k})Kill the text from the current cursor position to the end of the line.@item backward-kill-line ()Kill backward to the beginning of the line. This is normally unbound.@item kill-word (@key{M-d})Kill from the cursor to the end of the current word, or if betweenwords, to the end of the next word.@item backward-kill-word (@key{M-DEL})Kill the word behind the cursor.@item unix-line-discard (@key{C-u})Do what @key{C-u} used to do in Unix line input. We save the killed text onthe kill-ring, though.@item unix-word-rubout (@key{C-w})Do what @key{C-w} used to do in Unix line input. The killed text is savedon the kill-ring. This is different than backward-kill-word becausethe word boundaries differ.@item yank (@key{C-y})Yank the top of the kill ring into the buffer at point.@item yank-pop (@key{M-y})Rotate the kill-ring, and yank the new top. You can only do this ifthe prior command is yank or yank-pop.@end ftable@node Numeric Arguments@subsubsection Specifying Numeric Arguments@ftable @code@item digit-argument (@key{M-0}, @key{M-1}, ... @key{M--})Add this digit to the argument already accumulating, or start a newargument. @key{M--} starts a negative argument.@item universal-argument ()Do what @key{C-u} does in emacs. By default, this is not bound.@end ftable@node Commands For Completion@subsubsection Letting Readline Type For You@ftable @code@item complete (TAB)Attempt to do completion on the text before point. This isimplementation defined. Generally, if you are typing a filenameargument, you can do filename completion; if you are typing a command,you can do command completion, if you are typing in a symbol to GDB, youcan do symbol name completion, if you are typing in a variable to Bash,you can do variable name completion...@item possible-completions (M-?)List the possible completions of the text before point.@end ftable@node Miscellaneous Commands@subsubsection Some Miscellaneous Commands@ftable @code@item re-read-init-file (@key{C-x} @key{C-r})Read in the contents of your @file{~/.inputrc} file, and incorporateany bindings found there.@item abort (@key{C-g})Ding! Stops things.@item do-uppercase-version (@key{M-a}, @key{M-b}, ...)Run the command that is bound to your uppercase brother.@item prefix-meta (ESC)Make the next character that you type be metafied. This is for peoplewithout a meta key. Typing @key{ESC f} is equivalent to typing@key{M-f}.@item undo (@key{C-_})Incremental undo, separately remembered for each line.@item revert-line (@key{M-r})Undo all changes made to this line. This is like typing the `undo'command enough times to get back to the beginning.@end ftable@node Readline Vi Mode@subsection Readline Vi ModeWhile the Readline library does not have a full set of Vi editingfunctions, it does contain enough to allow simple editing of the line.In order to switch interactively between Emacs and Vi editing modes, usethe command @key{M-C-j} (toggle-editing-mode).When you enter a line in Vi mode, you are already placed in `insertion'mode, as if you had typed an `i'. Pressing @key{ESC} switches you into`edit' mode, where you can edit the text of the line with the standardVi movement keys, move to previous history lines with `k', and followinglines with `j', and so forth.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -