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

📄 vi.hlp

📁 vi帮助文档!希望对需要的人有帮助!带来操作便捷!
💻 HLP
📖 第 1 页 / 共 4 页
字号:
indents appropriate for LISP code, and the (, ), {, }, [[, and ]] subcommandsare modified to act appropriately for LISP.-r[File] Recovers a file after a vi editor or system malfunction. If you do notspecify the File variable, the vi editor displays a list of all saved files.-R Sets the readonly option to protect the file against overwriting.-tTag Edits the file containing the Tag variable and positions the vi editor atits definition. To use this flag, you must first create a database of functionnames and their locations using the ctags command.-v Enters the vi editor in the verbose mode.-wNumber Sets the default window size to the value specified by the Numbervariable. This flag is useful when you use the vi editor over a low-speed line.-yNumber Overrides the maximum line setting of 1,048,560 with any value greaterthan 1024. You should request twice the number of lines that you require becausethe vi editor uses the extra lines for buffer manipulation.+[Subcommand] Carries out the ex editor subcommand before editing begins. If youdo not specify the Subcommand variable, the cursor is placed on the first lineof the file. This + flag is incompatible with the -c flag. Do not specify bothflags at the same time.vi General Subcommand SyntaxUse the following general syntax to enter subcommands:[Named_Buffer] [Operator] [Number] Object Note Square brackets indicate optionalitems.[Named_Buffer] Specifies a temporary text storage area.[Operator] Specifies the subcommand or action; instructs the vi editor.[Number] Specifies either the extent of the action or a line address as a wholenumber.Object Specifies what to act on, such as a text object (a character, word,sentence, paragraph, section, character string) or a text position (a line,position in the current line, screen position).Counts before SubcommandsYou can put a number in front of many subcommands. The vi editor interprets thisnumber in one of the following ways:  o Go to the line specified by the Number parameter:    5G    10Z  o Go to the column specified by the Number parameter:    25|  o Scroll the number of lines up or down specified by the Number parameter:    10Ctrl-U    10Ctrl-Dvi Editor SubcommandsUse the subcommands to perform these kinds of actions:  o Moving the cursor  o Editing text  o Manipulating files  o Other actionsMoving the CursorUse subcommands to move the cursor within a file in these ways:  o Moving within a line  o Moving within a line by character position  o Moving to words  o Moving by line position  o Moving to sentences, paragraphs, or sections  o Moving by redrawing the screen  o Paging and scrolling  o Searching for patterns  o Marking a specific location in a file and returningMoving within a LineEnter the following subcommands in command mode. You can cancel an incompletecommand by pressing the Esc key. If you need information about the format of visubcommands, see "vi General Subcommand Syntax."Left Arrow or h or Ctrl-H Moves the cursor one character to the left.Down Arrow or j or Ctrl-J or Ctrl-N Moves the cursor down one line (it remainsin the same column).Up Arrow or k or Ctrl-P Moves the cursor up one line (it remains in the samecolumn).Right Arrow or l Moves the cursor one character to the right.Moving within a Line by Character PositionEnter the following subcommands in command mode. You can cancel an incompletecommand by pressing the Esc key. If you need information about the format of visubcommands, see "vi General Subcommand Syntax."^ Moves the cursor to the first nonblank character.0 Moves the cursor to the beginning of the line.$ Moves the cursor to the end of the line.fx Moves the cursor to the next x character.Fx Moves the cursor to the last x character.tx Moves the cursor to one column before the next x character.Tx Moves the cursor to one column after the last x character.; Repeats the last f, F, t, or T subcommand., Repeats the last f, F, t, or T subcommand in the opposite direction.Number| Moves the cursor to the specified column.Moving to WordsEnter the following subcommands in command mode. If you need information aboutthe format of vi subcommands, "vi General Subcommand Syntax."w Moves the cursor to the next small word.b Moves the cursor to the previous small word.e Moves the cursor to the next end of a small word.W Moves the cursor to the next big word.B Moves the cursor to the previous big word.E Moves the cursor to the next end of a big word.Moving by Line PositionEnter the following subcommands in command mode. If you need information aboutthe format of vi subcommands, see "vi General Subcommand Syntax."H Moves the cursor to the top line on the screen.L Moves the cursor to the last line on the screen.M Moves the cursor to the middle line on the screen.+ Moves the cursor to the next line at its first nonblank character.- Moves the cursor to the previous line at its first nonblank character.Enter Moves the cursor to the next line at its first nonblank character.Moving to Sentences, Paragraphs, or SectionsEnter the following subcommands in command mode. You can cancel an incompletesubcommand by pressing the Esc key. If you need information about the format ofvi subcommands, see "vi General Subcommand Syntax."( Places the cursor at the beginning of the previous sentence, or the previouss-expression if you are in LISP mode.) Places the cursor at the beginning of the next sentence, or the nexts-expression if you are in LISP mode.{ Places the cursor at the beginning of the previous paragraph, or at the nextlist if you are in LISP mode.} Places the cursor at the beginning of the next paragraph, at the next sectionif you are in C mode, or at the next list if you are in LISP mode.]] Places the cursor at the next section, or function if you are in LISP mode.[[ Places the cursor at the previous section, or function if you are in LISPmode.Moving by Redrawing the ScreenEnter the following subcommands in command mode. You can cancel an incompletesubcommand by pressing the Esc key. If you need information about the format ofvi subcommands, see "vi General Subcommand Syntax."z Redraws the screen with the current line at the top of the screen.z- Redraws the screen with the current line at the bottom of the screen.z. Redraws the screen with the current line at the center of the screen./Pattern/z- Redraws the screen with the line containing the character string,specified by the Pattern parameter, at the bottom.Paging and ScrollingEnter the following subcommands in command mode. You can cancel an incompletesubcommand by pressing the Esc key. If you need information about the format ofvi subcommands, see "vi General Subcommand Syntax."Ctrl-U Scrolls up one-half screen.Ctrl-D Scrolls down one-half screen.Ctrl-F Scrolls forward one screen.Ctrl-B Scrolls backward one screen.Ctrl-E Scrolls the window down one line.Ctrl-Y Scrolls the window up one line.z+ Pages up.z^ Pages down.Searching for PatternsEnter the following subcommands in command mode. You can cancel an incompletesubcommand by pressing the Esc key. If you need information about the format ofvi subcommands, see "vi General Subcommand Syntax."[Number]G Places the cursor at the line number specified by the Number parameteror at the last line if the Number parameter is not specified./Pattern Places the cursor at the next line containing the character stringspecified by the Pattern parameter.?Pattern Places the cursor at the next previous line containing the characterstring specified by the Pattern parameter.n Repeats the last search for the text specified by the Pattern parameter in thesame direction.N Repeats the last search for the text specified by the Pattern parameter in theopposite direction./Pattern/+Number Places the cursor the specified number of lines after the linematching the character string specified by the Pattern parameter.?Pattern?-Number Places the cursor the specified number of lines before the linematching the character string specified by the Pattern parameter.% Finds the parenthesis or brace that matches the one at current cursorposition.Editing TextThe subcommands for editing enable you to perform the following tasks:  o Marking a specific location in a file and returning  o Adding text to a file  o Changing text while in input mode  o Changing text from command mode  o Copying and moving text  o Restoring and repeating changesMarking a Specific Location in a File and ReturningEnter the following subcommands in command mode. You can cancel an incompletesubcommand by pressing the Esc key. If you need information about the format ofvi subcommands, see "vi General Subcommand Syntax."" Moves the cursor to the previous location of the current line." Moves the cursor to the beginning of the line containing the previous locationof the current line.mx Marks the current position with the letter specified by the x parameter.`x Moves the cursor to the mark specified by the x parameter.'x Moves the cursor to the beginning of the line containing the mark specifiedby the x parameter.Adding Text to a File (Text Input Mode)Enter the following subcommands in command mode to change the vi editor intotext input mode. If you need information about the format of vi subcommands, see"vi General Subcommand Syntax."aTextInserts text specified by the Text parameter after the cursor. End text inputmode by pressing the Esc key.ATextAdds text specified by the Text parameter to the end of the line. End text inputmode by pressing the Esc key.iTextInserts text specified by the Text parameter before the cursor. End text inputmode by pressing the Esc key.ITextInserts text specified by the Text parameter before the first nonblank characterin the line. End text input mode by pressing the Esc key.oAdds an empty line below the current line. End text input mode by pressing theEsc key.OAdds an empty line above the current line. End text input mode by pressing the

⌨️ 快捷键说明

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