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

📄 vi.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<ol><li><p>The text region shall include the starting line and the next <i>count</i> - 1 lines.</p></li><li><p>Any text copied to a buffer shall be in line mode.</p></li></ol><p>If not used as a motion command:</p><p><i>Current line</i>: Set to <i>current line</i>+ <i>count</i>.</p><p><i>Current column</i>: Set to non- &lt;blank&gt; for the &lt;carriage-return&gt;, &lt;control&gt;-M, and <b>+</b> commands;otherwise, unchanged.</p><h5><a name="tag_04_167_13_10"></a>Clear and Redisplay</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>&lt;control&gt;-L</tt></pre></dd></dl><p>If in open mode, clear the screen and redisplay the current line. Otherwise, clear and redisplay the screen.</p><p><i>Current line</i>: Unchanged.</p><p><i>Current column</i>: Unchanged.</p><h5><a name="tag_04_167_13_11"></a>Move Up</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>&lt;control&gt;-P<br></tt><b>[</b><i>count</i><b>]</b> <tt>k<br></tt><b>[</b><i>count</i><b>]</b> <tt>-</tt></pre></dd></dl><p>If there are less than <i>count</i> lines before the current line in the edit buffer, it shall be an error.</p><p>If used as a motion command:</p><ol><li><p>The text region shall include the starting line and the previous <i>count</i> lines.</p></li><li><p>Any text copied to a buffer shall be in line mode.</p></li></ol><p>If not used as a motion command:</p><p><i>Current line</i>: Set to <i>current line</i> - <i>count</i>.</p><p><i>Current column</i>: Set to non- &lt;blank&gt; for the <b>-</b> command; otherwise, unchanged.</p><h5><a name="tag_04_167_13_12"></a>Redraw Screen</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>&lt;control&gt;-R</tt></pre></dd></dl><p>If any lines have been deleted from the display screen and flagged as deleted on the terminal using the <b>@</b> convention (seethe beginning of the EXTENDED DESCRIPTION section), they shall be redisplayed to match the contents of the edit buffer.</p><p>It is unspecified whether lines flagged with <b>@</b> because they do not fit on the terminal display shall be affected.</p><p><i>Current line</i>: Unchanged.</p><p><i>Current column</i>: Unchanged.</p><h5><a name="tag_04_167_13_13"></a>Scroll Backward</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>&lt;control&gt;-U</tt></pre></dd></dl><p>If the current line is the first line of the edit buffer, it shall be an error.</p><p>If no <i>count</i> is specified, <i>count</i> shall default to the <i>count</i> associated with the previous &lt;control&gt;-Dor &lt;control&gt;-U command. If there was no previous &lt;control&gt;-D or &lt;control&gt;-U command, <i>count</i> shall defaultto the value of the <b>scroll</b> edit option.</p><p><i>Current line</i>: If <i>count</i> is greater than the current line, set to 1; otherwise, set to the current line -<i>count</i>.</p><p><i>Current column</i>: Set to non- &lt;blank&gt;.</p><h5><a name="tag_04_167_13_14"></a>Scroll Backward by Line</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>&lt;control&gt;-Y</tt></pre></dd></dl><p>Display the line <i>count</i> lines before the first line currently displayed.</p><p>If the current line is the first line of the edit buffer, it shall be an error. If this calculation would result in a line thatis before the first line of the edit buffer, the first line of the display shall display some portion of the first line of the editbuffer.</p><p><i>Current line</i>: Unchanged if the previous current character is displayed; otherwise, set to the first line displayed.</p><p><i>Current column</i>: Unchanged.</p><h5><a name="tag_04_167_13_15"></a>Edit the Alternate File</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>&lt;control&gt;-^</tt></pre></dd></dl>This command shall be equivalent to the <a href="../utilities/ex.html"><i>ex</i></a> <b>edit</b> command, with the alternatepathname as its argument. <h5><a name="tag_04_167_13_16"></a>Terminate Command or Input Mode</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>&lt;ESC&gt;</tt></pre></dd></dl><p>If a partial <i>vi</i> command (as defined by at least one, non- <i>count</i> character) has been entered, discard the<i>count</i> and the command character(s).</p><p>Otherwise, if no command characters have been entered, and the &lt;ESC&gt; was the result of a map expansion, the terminal shallbe alerted and the &lt;ESC&gt; character shall be discarded, but it shall not be an error.</p><p>Otherwise, it shall be an error.</p><p><i>Current line</i>: Unchanged.</p><p><i>Current column</i>: Unchanged.</p><h5><a name="tag_04_167_13_17"></a>Search for tagstring</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>&lt;control&gt;-]</tt></pre></dd></dl><p>If the current character is not a word or &lt;blank&gt;, it shall be an error.</p><p>This command shall be equivalent to the <a href="../utilities/ex.html"><i>ex</i></a> <b>tag</b> command, with the argument tothat command defined as follows.</p><p>If the current character is a &lt;blank&gt;:</p><ol><li><p>Skip all &lt;blank&gt;s after the cursor up to the end of the line.</p></li><li><p>If the end of the line is reached, it shall be an error.</p></li></ol><p>Then, the argument to the <a href="../utilities/ex.html"><i>ex</i></a> <b>tag</b> command shall be the current character and allsubsequent characters, up to the first non-word character or the end of the line.</p><h5><a name="tag_04_167_13_18"></a>Move Cursor Forward</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>&lt;space&gt;<br></tt><b>[</b><i>count</i><b>]</b> <tt>l</tt>  (ell)</pre></dd></dl><p>If there are less than <i>count</i> non- &lt;newline&gt;s after the cursor on the current line, <i>count</i> shall be adjustedto the number of non- &lt;newline&gt;s after the cursor on the line.</p><p>If used as a motion command:</p><ol><li><p>If the current or <i>count</i>th character after the cursor is the last non- &lt;newline&gt; in the line, the text region shallbe comprised of the current character up to and including the last non- &lt;newline&gt; in the line. Otherwise, the text regionshall be from the current character up to, but not including, the <i>count</i>th character after the cursor.</p></li><li><p>Any text copied to a buffer shall be in character mode.</p></li></ol><p>If not used as a motion command:</p><p>If there are no non- &lt;newline&gt;s after the current character on the current line, it shall be an error.</p><p><i>Current line</i>: Unchanged.</p><p><i>Current column</i>: Set to the last column that displays any portion of the <i>count</i>th character after the currentcharacter.</p><h5><a name="tag_04_167_13_19"></a>Replace Text with Results from Shell Command</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>!</tt> <i>motion shell-commands</i> <tt>&lt;newline&gt;</tt></pre></dd></dl><p>If the motion command is the <b>!</b> command repeated:</p><ol><li><p>If the edit buffer is empty and no <i>count</i> was supplied, the command shall be the equivalent of the <a href="../utilities/ex.html"><i>ex</i></a> <b>:read</b> <b>!</b> command, with the text input, and no text shall be copied to anybuffer.</p></li><li><p>Otherwise:</p><ol type="a"><li><p>If there are less than <i>count</i> -1 lines after the current line in the edit buffer, it shall be an error.</p></li><li><p>The text region shall be from the current line up to and including the next <i>count</i> -1 lines.</p></li></ol></li></ol><p>Otherwise, the text region shall be the lines in which any character of the text region specified by the motion commandappear.</p><p>Any text copied to a buffer shall be in line mode.</p><p>This command shall be equivalent to the <a href="../utilities/ex.html"><i>ex</i></a> <b>!</b> command for the specifiedlines.</p><h5><a name="tag_04_167_13_20"></a>Move Cursor to End-of-Line</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><b>[</b><i>count</i><b>]</b> <tt>$</tt></pre></dd></dl><p>It shall be an error if there are less than ( <i>count</i> -1) lines after the current line in the edit buffer.</p><p>If used as a motion command:</p><ol><li><p>If <i>count</i> is 1:</p><ol type="a"><li><p>It shall be an error if the line is empty.</p></li><li><p>Otherwise, the text region shall consist of all characters from the starting cursor to the last non- &lt;newline&gt; in theline, inclusive, and any text copied to a buffer shall be in character mode.</p></li></ol></li><li><p>Otherwise, if the starting cursor position is at or before the first non- &lt;blank&gt; in the line, the text region shallconsist of the current and the next <i>count</i> -1 lines, and any text saved to a buffer shall be in line mode.</p></li><li><p>Otherwise, the text region shall consist of all characters from the starting cursor to the last non- &lt;newline&gt; in the linethat is <i>count</i> -1 lines forward from the current line, and any text copied to a buffer shall be in character mode.</p></li></ol><p>If not used as a motion command:</p><p><i>Current line</i>: Set to the <i>current line</i> + <i>count</i>-1.</p><p><i>Current column</i>: The current column is set to the last display line column of the last non- &lt;newline&gt; in the line,or column position 1 if the line is empty.</p><p>The current column shall be adjusted to be on the last display line column of the last non- &lt;newline&gt; of the current lineas subsequent commands change the current line, until a command changes the current column.</p><h5><a name="tag_04_167_13_21"></a>Move to Matching Character</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>%</tt></pre></dd></dl><p>If the character at the current position is not a parenthesis, bracket, or curly brace, search forward in the line to the firstone of those characters. If no such character is found, it shall be an error.</p><p>The matching character shall be the parenthesis, bracket, or curly brace matching the parenthesis, bracket, or curly brace,respectively, that was at the current position or that was found on the current line.</p>

⌨️ 快捷键说明

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