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

📄 doc.sh

📁 操作系统源代码
💻 SH
📖 第 1 页 / 共 5 页
字号:
X.\"X.de CmX.if "\\$1"0" \t\\$2\t\\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9X.if "\\$1"1" \s-2[line]\s+2\t\\$2\t\\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9X.if "\\$1"2" \s-2[line][,line]\s+2\t\\$2\t\\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9X..X.if t .ds Q ``X.if t .ds U ''X.if n .ds Q "X.if n .ds U "X\s+2LINES	COMMAND	ARGUMENTS\s-2X.Cm 0 ab[br] [short] [expanded form]X.Cm 1 a[ppend][!]X.Cm 0 ar[gs] [files]X.Cm 0 cc [files]X.Cm 0 cd[!] [directory]X.Cm 2 c[hange]X.Cm 0 chd[ir][!] [directory]X.Cm 2 co[py] lineX.Cm 0 col[or] [when] [[\*Qlight\*U] color] [\*Qon\*U color]X.Cm 2 d[elete] [\*Ux]X.Cm 0 dig[raph][!] [XX [Y]]X.Cm 0 e[dit][!] [file]X.Cm 0 er[rlist][!] [errlist]X.Cm 0 f[ile] [file]X.Cm 2 g[lobal] /regexp/ commandX.Cm 1 i[nsert]X.Cm 2 j[oin][!]X.Cm 2 l[ist]X.Cm 0 mak[e] [target]X.Cm 0 map[!] key mapped_toX.Cm 1 ma[rk]  \*UxX.Cm 0 mk[exrc]X.Cm 2 m[ove] lineX.Cm 0 n[ext][!] [files]X.Cm 0 N[ext][!]X.Cm 2 nu[mber]X.Cm 2 p[rint]X.Cm 1 pu[t] [\*Ux]X.Cm 0 q[uit][!]X.Cm 1 r[ead] fileX.Cm 0 rew[ind][!]X.Cm 0 se[t] [options]X.Cm 0 so[urce] fileX.Cm 2 s[ubstitute] /regexp/replacement/[p][g][c]X.Cm 0 ta[g][!] tagnameX.Cm 0 una[bbr] [short]X.Cm 0 u[ndo]X.Cm 0 unm[ap][!] keyX.Cm 0 ve[rsion]X.Cm 2 v[global] /regexp/ commandX.Cm 0 vi[sual] [filename]X.Cm 0 wq X.Cm 2 w[rite][!] [[>>]file]X.Cm 0 x[it][!]X.Cm 2 y[ank] [\*Ux]X.Cm 2 ! commandX.Cm 2 < X.Cm 2 = X.Cm 2 > X.Cm 2 & X.Cm 0 @ "" \*UxX.DEX.TAX.PPXTo use colon mode commands, you must switch from visual commandXmode to colon command mode.XThe visual mode commands to do this are ":" for a single colon command,Xor "Q" for many colon mode commands.X.NH 2XLine SpecifiersX.PPXLine specifiers are always optional.XThe first line specifier of most commands usually defaults to the current line.XThe second line specifier usually defaults to be the sameXas the first line specifier.XExceptions are :write, :global, and :vglobal, which act on all lines of theXfile by default, and :!, which acts on no lines by default.X.PPXLine specifiers consist of an absolute part and a relative part.XThe absolute part of a line specifier may be either an explicit line number,Xa mark, a dot to denote the current line, a dollar sign to denote the lastXline of the file, or a forward or backward search.X.PPXAn explicit line number is simply a decimal number, expressed as aXstring of digits.X.PPXA mark is typed in as an apostrophe followed by a letter.XMarks must be set before they can be used.XYou can set a mark in visual command mode by typing "m" and a letter,Xor you can set it in colon command mode via the "mark" command.X.PPXA forward search is typed in as a regular expression surrounded byXslash characters; searching begins at the default line.XA backward search is typed in as a regular expression surrounded byXquestion marks; searching begins at the line before the default line.X.PPXIf you omit the absolute part, then the default line is used.X.PPXThe relative part of a line specifier is typed as a "+" or "-" characterXfollowed by a decimal number.XThe number is added to or subtracted from the absolute partXof the line specifier to produce the final line number.X.PPXAs a special case, the % character may be used to specify all lines of the file.XIt is roughly equivelent to saying 1,$.XThis can be a handy shortcut.X.PPXSome examples:X.LDX.psX.ta 0.5i 1.8iX	:p	print the current lineX	:37p	print line 37X	:'gp	print the line which contains mark gX	:/foo/p	print the next line that contains "foo"X	:$p	print the last line of the fileX	:20,30p	print lines 20 through 30X	:1,$p	print all lines of the fileX	:%p	print all lines of the fileX	:/foo/-2,+4p	print 5 lines around the next "foo"X.TAX.DEX.NH 2XText Entry CommandsX.if n .ul 0X.IDX.psX[line] appendX[line][,line] change ["x]X[line] insertX.DEX.PPXThe \fBa\fRppend command inserts text after the specified line.X.PPXThe \fBi\fRnsert command inserts text before the specified line.X.PPXThe \fBc\fRhange command copies the range of lines into a cut buffer,Xdeletes them, and inserts new text where the old text used to be.X.PPXFor all of these commands, you indicate the end of the text you'reXinserting by hitting ^D or by entering a line which contains only aXperiod.X.NH 2XCut & Paste CommandsX.if n .ul 0X.IDX.psX[line][,line] delete ["x]X[line][,line] yank ["x]X[line] put ["x]X[line][,line] copy lineX[line][,line] to lineX[line][,line] move lineX.DEX.PPXThe \fBd\fRelete command copies the specified range of lines into aXcut buffer, and then deletes them.X.PPXThe \fBy\fRank command copies the specified range of lines into a cutXbuffer, but does *not* delete them.X.PPXThe \fBpu\fRt command inserts text from a cut buffer after theXspecified line.X.PPXThe \fBco\fRpy and \fBt\fRo commands yank the specified range of lines andXthen immediately paste them after some other line.X.PPXThe \fBm\fRove command deletes the specified range of lines and thenXimmediately pastes them after some other line.XIf the destination line comes after the deleted text,Xthen it will be adjusted automatically to account for the deleted lines.X.NH 2XDisplay Text CommandsX.if n .ul 0X.IDX.psX[line][,line] printX[line][,line] listX[line][,line] numberX.DEX.PPXThe \fBp\fRrint command displays the specified range of lines.X.PPXThe \fBnu\fRmber command displays the lines, with line numbers.X.PPXThe \fBl\fRist command also displays them, but it is careful to makeXcontrol characters visible.X.NH 2XGlobal Operations CommandsX.if n .ul 0X.IDX.psX[line][,line] global /regexp/ commandX[line][,line] vglobal /regexp/ commandX.DEX.PPXThe \fBg\fRlobal command searches through the lines of the specified rangeX(or through the whole file if no range is specified)Xfor lines that contain a given regular expression.XIt then moves the cursor to each of these lines andXruns some other command on them.X.PPXThe \fBv\fRglobal command is similar, but it searches for lines that \fIdon't\fRXcontain the regular expression.X.NH 2XLine Editing CommandsX.if n .ul 0X.IDX.psX[line][,line] join[!]X[line][,line] ! programX[line][,line] <X[line][,line] >X[line][,line] substitute /regexp/replacement/[p][g][c]X[line][,line] &X.DEX.PPXThe \fBj\fRoin command catenates all lines in the specified range togetherXto form one big line.XIf only a single line is specified, then the following line is catenatedXonto it.XThe normal ":join" inserts one or two spaces between the lines;Xthe ":join!" variation (with a '!') doesn't insert spaces.X.PPXThe \fB!\fR command runs an external filter program,Xand feeds the specified range of lines to it's stdin.XThe lines are then replaced by the output of the filter.XA typical example would be ":'a,'z!sort" to sort the lines 'a,'z.X.PPXThe \fB<\fR and \fB>\fR commands shift the specified range of lines left or right,Xnormally by the width of 1 tab character.XThe "shiftwidth" option determines the shifting amount.X.PPXThe \fBs\fRubstitute command finds the regular expression in each line,Xand replaces it with the replacement text.XThe "p" option causes the altered lines to be printed.XThe "g" option permits all instances of the regular expressionXto be found & replaced.X(Without "g", only the first occurrence in each line is replaced.)XThe "c" option asks for confirmation before each substitution.X.PPXThe \fB&\fR command repeats the previous substitution command.XActually, "&" is equivelent to "s//~/" with the same options as last time.XIt searches for the last regular expression that you specified for any purpose,Xand replaces it with the the same textXthat was used in the previous substitution.X.NH 2XUndo CommandX.if n .ul 0X.IDX.psXundoX.DEX.PPXThe \fBu\fRndo command restores the file to the state it was in beforeXyour most recent command which changed text.X.NH 2XConfiguration & Status CommandsX.if n .ul 0X.IDX.psXmap[!] [key mapped_to]Xunmap[!] keyXabbr [word expanded_form_of_word]Xunabbr wordXdigraph[!] [XX [Y]]Xset [options]XmkexrcX[line] mark "xXvisualXversionX[line][,line] =Xfile [file]Xsource fileX@ "xXcolor [when] [["light"] color] ["on" color]X.DEX.PPXThe \fBma\fRp command allows you to configure \*E to recognize your function keys,Xand treat them as though they transmitted some other sequence of characters.XNormally this mapping is done only when in the visual command mode,Xbut with the [!] present it will map keys under input and replace modes as well.XWhen this command is given with no arguments,Xit prints a table showing all mappings currently in effect.XWhen called with two arguments, the first is the sequence that yourXfunction key really sends, and the second is the sequence that you wantX\*E to treat it as having sent.XAs a special case, if the first argument is a number then \*E will map theXcorresponding function key;Xfor example, ":map 7 dd" will cause the <F7> key to delete a line.X.PPXThe \fBunm\fRap command removes key definitions that were made via the map command.X.PPXThe \fBab\fRbr command is used to define/list a table of abbreviations.XThe table contains both the abbreviated form and the fully spelled-out form.XWhen you're in visual input mode, and you type in the abbreviated form,X\*E will replace the abbreviated form with the fully spelled-out form.XWhen this command is called without arguments, it lists the table;Xwith two or more arguments, the first argument is taken as the abbreviatedXform, and the rest of the command line is the fully-spelled out form.X.PPXThe \fBuna\fRbbr command deletes entries from the abbr table.X.PPXThe \fBdi\fRgraph command allows you to display the set of digraphs that \*E isXusing, or add/remove a digraph.XTo list the set of digraphs, use the digraph command with no arguments.XTo add a digraph, you should give the digraph command two arguments.XThe first argument is the two ASCII characters that are to be combined;Xthe second is the non-ASCII character that they represent.XThe non-ASCII character's most significant bit is automatically set by theXdigraph command, unless to append a ! to the command name.XRemoval of a digraph is similar to adding a digraph, except that you shouldXleave off the second argument.X.PPXThe \fBse\fRt command allows you examine or set various options.XWith no arguments, it displays the values of options that have been changed.XWith the single argument "all" it displays the values of all options,Xregardless of whether they've been explicitly set or not.XOtherwise, the arguments are treated as options to be set.X.PPXThe \fBmk\fRexrc command saves the current configuration to a fileXcalled ".exrc" in the current directory.X.PPXThe mar\fBk\fR command defines a named mark to refer to a specific placeXin the file.XThis mark may be used later to specify lines for other commands.X.PPXThe \fBvi\fRsual command puts the editor into visual mode.XInstead of emulating ex, \*E will start emulating vi.X.PPXThe \fBve\fRrsion command tells you that what version of \*E this is.X.PPXThe \fB=\fR command tells you what line you specified, or,Xif you specified a range of lines, it will tell you both endpoints and

⌨️ 快捷键说明

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