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

📄 readline.html

📁 在非GUI环境下
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<H3> 1.4.2 Commands For Manipulating The History </H3><!--docid::SEC15::--><P><DL COMPACT><A NAME="IDX43"></A><DT><CODE>accept-line (Newline or Return)</CODE><DD><A NAME="IDX44"></A>Accept 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()</CODE>.If this line is a modified history line, the history line is restoredto its original state.<P><A NAME="IDX45"></A><DT><CODE>previous-history (C-p)</CODE><DD><A NAME="IDX46"></A>Move `back' through the history list, fetching the previous command.<P><A NAME="IDX47"></A><DT><CODE>next-history (C-n)</CODE><DD><A NAME="IDX48"></A>Move `forward' through the history list, fetching the next command.<P><A NAME="IDX49"></A><DT><CODE>beginning-of-history (M-&#60;)</CODE><DD><A NAME="IDX50"></A>Move to the first line in the history.<P><A NAME="IDX51"></A><DT><CODE>end-of-history (M-&#62;)</CODE><DD><A NAME="IDX52"></A>Move to the end of the input history, i.e., the line currentlybeing entered.<P><A NAME="IDX53"></A><DT><CODE>reverse-search-history (C-r)</CODE><DD><A NAME="IDX54"></A>Search backward starting at the current line and moving `up' throughthe history as necessary.  This is an incremental search.<P><A NAME="IDX55"></A><DT><CODE>forward-search-history (C-s)</CODE><DD><A NAME="IDX56"></A>Search forward starting at the current line and moving `down' throughthe the history as necessary.  This is an incremental search.<P><A NAME="IDX57"></A><DT><CODE>non-incremental-reverse-search-history (M-p)</CODE><DD><A NAME="IDX58"></A>Search backward starting at the current line and moving `up'through the history as necessary using a non-incremental searchfor a string supplied by the user.<P><A NAME="IDX59"></A><DT><CODE>non-incremental-forward-search-history (M-n)</CODE><DD><A NAME="IDX60"></A>Search forward starting at the current line and moving `down'through the the history as necessary using a non-incremental searchfor a string supplied by the user.<P><A NAME="IDX61"></A><DT><CODE>history-search-forward ()</CODE><DD><A NAME="IDX62"></A>Search forward through the history for the string of charactersbetween the start of the current line and the point.This is a non-incremental search.By default, this command is unbound.<P><A NAME="IDX63"></A><DT><CODE>history-search-backward ()</CODE><DD><A NAME="IDX64"></A>Search backward through the history for the string of charactersbetween the start of the current line and the point.  Thisis a non-incremental search.  By default, this command is unbound.<P><A NAME="IDX65"></A><DT><CODE>yank-nth-arg (M-C-y)</CODE><DD><A NAME="IDX66"></A>Insert the first argument to the previous command (usuallythe second word on the previous line) at point.With an argument <VAR>n</VAR>,insert the <VAR>n</VAR>th word from the previous command (the wordsin the previous command begin with word 0).  A negative argumentinserts the <VAR>n</VAR>th word from the end of the previous command.<P><A NAME="IDX67"></A><DT><CODE>yank-last-arg (M-. or M-_)</CODE><DD><A NAME="IDX68"></A>Insert last argument to the previous command (the last word of theprevious history entry).  With anargument, behave exactly like <CODE>yank-nth-arg</CODE>.Successive calls to <CODE>yank-last-arg</CODE> move back through the historylist, inserting the last argument of each line in turn.<P></DL><P><A NAME="Commands For Text"></A><HR SIZE="6"><A NAME="SEC16"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC15"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC17"> &lt;&lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD></TR></TABLE><H3> 1.4.3 Commands For Changing Text </H3><!--docid::SEC16::--><P><DL COMPACT><A NAME="IDX69"></A><DT><CODE>delete-char (C-d)</CODE><DD><A NAME="IDX70"></A>Delete the character at point.  If point is at thebeginning of the line, there are no characters in the line, andthe last character typed was not bound to <CODE>delete-char</CODE>, thenreturn EOF.<P><A NAME="IDX71"></A><DT><CODE>backward-delete-char (Rubout)</CODE><DD><A NAME="IDX72"></A>Delete the character behind the cursor.  A numeric argument meansto kill the characters instead of deleting them.<P><A NAME="IDX73"></A><DT><CODE>forward-backward-delete-char ()</CODE><DD><A NAME="IDX74"></A>Delete the character under the cursor, unless the cursor is at theend of the line, in which case the character behind the cursor isdeleted.  By default, this is not bound to a key.<P><A NAME="IDX75"></A><DT><CODE>quoted-insert (C-q or C-v)</CODE><DD><A NAME="IDX76"></A>Add the next character typed to the line verbatim.  This ishow to insert key sequences like <KBD>C-q</KBD>, for example.<P><A NAME="IDX77"></A><DT><CODE>tab-insert (M-<KBD>TAB</KBD>)</CODE><DD><A NAME="IDX78"></A>Insert a tab character.<P><A NAME="IDX79"></A><DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE><DD><A NAME="IDX80"></A>Insert yourself.<P><A NAME="IDX81"></A><DT><CODE>transpose-chars (C-t)</CODE><DD><A NAME="IDX82"></A>Drag the character before the cursor forward overthe character at the cursor, moving thecursor forward as well.  If the insertion pointis at the end of the line, then thistransposes the last two characters of the line.Negative arguments have no effect.<P><A NAME="IDX83"></A><DT><CODE>transpose-words (M-t)</CODE><DD><A NAME="IDX84"></A>Drag the word before point past the word after point,moving point past that word as well.If the insertion point is at the end of the line, this transposesthe last two words on the line.<P><A NAME="IDX85"></A><DT><CODE>upcase-word (M-u)</CODE><DD><A NAME="IDX86"></A>Uppercase the current (or following) word.  With a negative argument,uppercase the previous word, but do not move the cursor.<P><A NAME="IDX87"></A><DT><CODE>downcase-word (M-l)</CODE><DD><A NAME="IDX88"></A>Lowercase the current (or following) word.  With a negative argument,lowercase the previous word, but do not move the cursor.<P><A NAME="IDX89"></A><DT><CODE>capitalize-word (M-c)</CODE><DD><A NAME="IDX90"></A>Capitalize the current (or following) word.  With a negative argument,capitalize the previous word, but do not move the cursor.<P><A NAME="IDX91"></A><DT><CODE>overwrite-mode ()</CODE><DD><A NAME="IDX92"></A>Toggle overwrite mode.  With an explicit positive numeric argument,switches to overwrite mode.  With an explicit non-positive numericargument, switches to insert mode.  This command affects only<CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.Each call to <CODE>readline()</CODE> starts in insert mode.<P>In overwrite mode, characters bound to <CODE>self-insert</CODE> replacethe text at point rather than pushing the text to the right.Characters bound to <CODE>backward-delete-char</CODE> replace the characterbefore point with a space.</P><P>By default, this command is unbound.</P><P></DL><P><A NAME="Commands For Killing"></A><HR SIZE="6"><A NAME="SEC17"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC16"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC18"> &lt;&lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC13"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC22"> &gt;&gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC52">Index</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="readline.html#SEC_About"> ? </A>]</TD></TR></TABLE><H3> 1.4.4 Killing And Yanking </H3><!--docid::SEC17::--><P><DL COMPACT><A NAME="IDX93"></A><DT><CODE>kill-line (C-k)</CODE><DD><A NAME="IDX94"></A>Kill the text from point to the end of the line.<P><A NAME="IDX95"></A><DT><CODE>backward-kill-line (C-x Rubout)</CODE><DD><A NAME="IDX96"></A>Kill backward to the beginning of the line.<P><A NAME="IDX97"></A><DT><CODE>unix-line-discard (C-u)</CODE><DD><A NAME="IDX98"></A>Kill backward from the cursor to the beginning of the current line.<P><A NAME="IDX99"></A><DT><CODE>kill-whole-line ()</CODE><DD><A NAME="IDX100"></A>Kill all characters on the current line, no matter where point is.By default, this is unbound.<P><A NAME="IDX101"></A><DT><CODE>kill-word (M-d)</CODE><DD><A NAME="IDX102"></A>Kill from point to the end of the current word, or if betweenwords, to the end of the next word.Word boundaries are the same as <CODE>forward-word</CODE>.<P><A NAME="IDX103"></A><DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE><DD><A NAME="IDX104"></A>Kill the word behind point.Word boundaries are the same as <CODE>backward-word</CODE>.<P><A NAME="IDX105"></A><DT><CODE>unix-word-rubout (C-w)</CODE><DD><A NAME="IDX106"></A>Kill the word behind point, using white space as a word boundary.The killed text is saved on the kill-ring.<P><A NAME="IDX107"></A><DT><CODE>unix-filename-rubout ()</CODE><DD><A NAME="IDX108"></A>Kill the word behind point, using white space and the s

⌨️ 快捷键说明

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