⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rluser.texi

📁 android-w.song.android.widget
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@var{TAB}.@item @w{"@var{keyseq}": @var{function-name} or @var{macro}}@var{keyseq} differs from @var{keyname} above in that stringsdenoting an entire key sequence can be specified, by placingthe key sequence in double quotes.  Some @sc{gnu} Emacs style keyescapes can be used, as in the following example, but thespecial character names are not recognized.@example"\C-u": universal-argument"\C-x\C-r": re-read-init-file"\e[11~": "Function Key 1"@end exampleIn the above example, @kbd{C-u} is again bound to the function@code{universal-argument} (just as it was in the first example),@samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file},and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insertthe text @samp{Function Key 1}.@end tableThe following @sc{gnu} Emacs style escape sequences are available whenspecifying key sequences:@table @code@item @kbd{\C-}control prefix@item @kbd{\M-}meta prefix@item @kbd{\e}an escape character@item @kbd{\\}backslash@item @kbd{\"}@key{"}, a double quotation mark@item @kbd{\'}@key{'}, a single quote or apostrophe@end tableIn addition to the @sc{gnu} Emacs style escape sequences, a secondset of backslash escapes is available:@table @code@item \aalert (bell)@item \bbackspace@item \ddelete@item \fform feed@item \nnewline@item \rcarriage return@item \thorizontal tab@item \vvertical tab@item \@var{nnn}the eight-bit character whose value is the octal value @var{nnn}(one to three digits)@item \x@var{HH}the eight-bit character whose value is the hexadecimal value @var{HH}(one or two hex digits)@end tableWhen entering the text of a macro, single or double quotes mustbe used to indicate a macro definition.Unquoted text is assumed to be a function name.In the macro body, the backslash escapes described above are expanded.Backslash will quote any other character in the macro text,including @samp{"} and @samp{'}.For example, the following binding will make @samp{@kbd{C-x} \}insert a single @samp{\} into the line:@example"\C-x\\": "\\"@end example@end table@node Conditional Init Constructs@subsection Conditional Init ConstructsReadline implements a facility similar in spirit to the conditionalcompilation features of the C preprocessor which allows keybindings and variable settings to be performed as the resultof tests.  There are four parser directives used.@table @code@item $ifThe @code{$if} construct allows bindings to be made based on theediting mode, the terminal being used, or the application usingReadline.  The text of the test extends to the end of the line;no characters are required to isolate it.@table @code@item modeThe @code{mode=} form of the @code{$if} directive is used to testwhether Readline is in @code{emacs} or @code{vi} mode.This may be used in conjunctionwith the @samp{set keymap} command, for instance, to set bindings inthe @code{emacs-standard} and @code{emacs-ctlx} keymaps only ifReadline is starting out in @code{emacs} mode.@item termThe @code{term=} form may be used to include terminal-specifickey bindings, perhaps to bind the key sequences output by theterminal's function keys.  The word on the right side of the@samp{=} is tested against both the full name of the terminal andthe portion of the terminal name before the first @samp{-}.  Thisallows @code{sun} to match both @code{sun} and @code{sun-cmd},for instance.@item applicationThe @var{application} construct is used to includeapplication-specific settings.  Each program using the Readlinelibrary sets the @var{application name}, and you can test fora particular value. This could be used to bind key sequences to functions useful fora specific program.  For instance, the following command adds akey sequence that quotes the current or previous word in Bash:@example$if Bash# Quote the current or previous word"\C-xq": "\eb\"\ef\""$endif@end example@end table@item $endifThis command, as seen in the previous example, terminates an@code{$if} command.@item $elseCommands in this branch of the @code{$if} directive are executed ifthe test fails.@item $includeThis directive takes a single filename as an argument and reads commandsand bindings from that file.For example, the following directive reads from @file{/etc/inputrc}:@example$include /etc/inputrc@end example@end table@node Sample Init File@subsection Sample Init FileHere is an example of an @var{inputrc} file.  This illustrates keybinding, variable assignment, and conditional syntax.@example@page# This file controls the behaviour of line input editing for# programs that use the GNU Readline library.  Existing# programs include FTP, Bash, and GDB.## You can re-read the inputrc file with C-x C-r.# Lines beginning with '#' are comments.## First, include any systemwide bindings and variable# assignments from /etc/Inputrc$include /etc/Inputrc## Set various bindings for emacs mode.set editing-mode emacs $if mode=emacsMeta-Control-h:	backward-kill-word	Text after the function name is ignored## Arrow keys in keypad mode##"\M-OD":        backward-char#"\M-OC":        forward-char#"\M-OA":        previous-history#"\M-OB":        next-history## Arrow keys in ANSI mode#"\M-[D":        backward-char"\M-[C":        forward-char"\M-[A":        previous-history"\M-[B":        next-history## Arrow keys in 8 bit keypad mode##"\M-\C-OD":       backward-char#"\M-\C-OC":       forward-char#"\M-\C-OA":       previous-history#"\M-\C-OB":       next-history## Arrow keys in 8 bit ANSI mode##"\M-\C-[D":       backward-char#"\M-\C-[C":       forward-char#"\M-\C-[A":       previous-history#"\M-\C-[B":       next-historyC-q: quoted-insert$endif# An old-style binding.  This happens to be the default.TAB: complete# Macros that are convenient for shell interaction$if Bash# edit the path"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f"# prepare to type a quoted word --# insert open and close double quotes# and move to just after the open quote"\C-x\"": "\"\"\C-b"# insert a backslash (testing backslash escapes# in sequences and macros)"\C-x\\": "\\"# Quote the current or previous word"\C-xq": "\eb\"\ef\""# Add a binding to refresh the line, which is unbound"\C-xr": redraw-current-line# Edit variable on current line."\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="$endif# use a visible bell if one is availableset bell-style visible# don't strip characters to 7 bits when readingset input-meta on# allow iso-latin1 characters to be inserted rather# than converted to prefix-meta sequencesset convert-meta off# display characters with the eighth bit set directly# rather than as meta-prefixed charactersset output-meta on# if there are more than 150 possible completions for# a word, ask the user if he wants to see all of themset completion-query-items 150# For FTP$if Ftp"\C-xg": "get \M-?""\C-xt": "put \M-?""\M-.": yank-last-arg$endif@end example@node Bindable Readline Commands@section Bindable Readline Commands@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.* Keyboard Macros::		Saving and re-executing typed characters* Miscellaneous Commands::	Other miscellaneous commands.@end menuThis section describes Readline commands that may be bound to keysequences.@ifset BashFeaturesYou can list your key bindings by executing@w{@code{bind -P}} or, for a more terse format, suitable for an@var{inputrc} file, @w{@code{bind -p}}.  (@xref{Bash Builtins}.)@end ifsetCommand names without an accompanying key sequence are unbound by default.In the following descriptions, @dfn{point} refers to the current cursorposition, and @dfn{mark} refers to a cursor position saved by the@code{set-mark} command.The text between the point and mark is referred to as the @dfn{region}.@node Commands For Moving@subsection Commands For Moving@ftable @code@item beginning-of-line (C-a)Move to the start of the current line.@item end-of-line (C-e)Move to the end of the line.@item forward-char (C-f)Move forward a character.@item backward-char (C-b)Move back a character.@item forward-word (M-f)Move forward to the end of the next word.Words are composed of letters and digits.@item backward-word (M-b)Move back to the start of the current or previous word.Words are composed of letters and digits.@ifset BashFeatures@item shell-forward-word ()Move forward to the end of the next word.Words are delimited by non-quoted shell metacharacters.@item shell-backward-word ()Move back to the start of the current or previous word.Words are delimited by non-quoted shell metacharacters.@end ifset@item clear-screen (C-l)Clear the screen and redraw the current line,leaving the current line at the top of the screen.@item redraw-current-line ()Refresh the current line.  By default, this is unbound.@end ftable@node Commands For History@subsection Commands For Manipulating The History@ftable @code@item accept-line (Newline or Return)@ifset BashFeaturesAccept the line regardless of where the cursor is.If this line isnon-empty, add it to the history list according to the setting ofthe @env{HISTCONTROL} and @env{HISTIGNORE} variables.If this line is a modified history line, then restore the history lineto its original state.@end ifset@ifclear BashFeaturesAccept the line regardless of where the cursor is.If this line isnon-empty, it may be added to the history list for future recall with@code{add_history()}.If this line is a modified history line, the history line is restoredto its original state.@end ifclear@item previous-history (C-p)Move `back' through the history list, fetching the previous command.@item next-history (C-n)Move `forward' through the history list, fetching the next command.@item beginning-of-history (M-<)Move to the first line in the history.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -