1*84d9c625SLionel Sambuc@comment Copyright (c) 1994 2*84d9c625SLionel Sambuc@comment The Regents of the University of California. All rights reserved. 3*84d9c625SLionel Sambuc@comment Copyright (c) 1994, 1995, 1996 4*84d9c625SLionel Sambuc@comment Keith Bostic. All rights reserved. 5*84d9c625SLionel Sambuc@comment 6*84d9c625SLionel Sambuc@comment See the LICENSE file for redistribution information. 7*84d9c625SLionel Sambuc@comment 8*84d9c625SLionel Sambuc@comment Id: vi.cmd.texi,v 8.1 2001/08/18 20:43:49 skimo Exp (Berkeley) Date: 2001/08/18 20:43:49 9*84d9c625SLionel Sambuc@comment 10*84d9c625SLionel Sambuc@chapter Vi Description 11*84d9c625SLionel Sambuc 12*84d9c625SLionel Sambuc@CO{Vi} takes up the entire screen to display the edited file, 13*84d9c625SLionel Sambucexcept for the bottom line of the screen. 14*84d9c625SLionel SambucThe bottom line of the screen is used to enter 15*84d9c625SLionel Sambuc@CO{exp} 16*84d9c625SLionel Sambuccommands, and for 17*84d9c625SLionel Sambuc@CO{vi} 18*84d9c625SLionel Sambucerror and informational messages. 19*84d9c625SLionel SambucIf no other information is being displayed, 20*84d9c625SLionel Sambucthe default display can show the current cursor row and cursor column, 21*84d9c625SLionel Sambucan indication of whether the file has been modified, 22*84d9c625SLionel Sambucand the current mode of the editor. 23*84d9c625SLionel SambucSee the 24*84d9c625SLionel Sambuc@OP{ruler} 25*84d9c625SLionel Sambucand 26*84d9c625SLionel Sambuc@OP{showmode} 27*84d9c625SLionel Sambucoptions for more information. 28*84d9c625SLionel Sambuc 29*84d9c625SLionel SambucEmpty lines do not have any special representation on the screen, 30*84d9c625SLionel Sambucbut lines on the screen that would logically come after the end of 31*84d9c625SLionel Sambucthe file are displayed as a single tilde 32*84d9c625SLionel Sambuc@PQ{~} 33*84d9c625SLionel Sambuccharacter. 34*84d9c625SLionel SambucTo differentiate between empty lines and lines consisting of only 35*84d9c625SLionel Sambucwhitespace characters, use the 36*84d9c625SLionel Sambuc@OP{list} 37*84d9c625SLionel Sambucoption. 38*84d9c625SLionel SambucHistorically, implementations of 39*84d9c625SLionel Sambuc@CO{vi} 40*84d9c625SLionel Sambuchave also displayed some lines as single asterisk 41*84d9c625SLionel Sambuc@PQ{@@} 42*84d9c625SLionel Sambuccharacters. 43*84d9c625SLionel SambucThese were lines that were not correctly displayed, i.e. lines on the 44*84d9c625SLionel Sambucscreen that did not correspond to lines in the file, or lines that did 45*84d9c625SLionel Sambucnot fit on the current screen. 46*84d9c625SLionel Sambuc@CO{Nvi} 47*84d9c625SLionel Sambucnever displays lines in this fashion. 48*84d9c625SLionel Sambuc 49*84d9c625SLionel Sambuc@CO{Vi} 50*84d9c625SLionel Sambucis a modeful editor, i.e. it has two modes, 51*84d9c625SLionel Sambuc@QQ{command} 52*84d9c625SLionel Sambucmode and 53*84d9c625SLionel Sambuc@QQ{text input} 54*84d9c625SLionel Sambucmode. 55*84d9c625SLionel SambucWhen 56*84d9c625SLionel Sambuc@CO{vi} 57*84d9c625SLionel Sambucfirst starts, it is in command mode. 58*84d9c625SLionel SambucThere are several commands that change 59*84d9c625SLionel Sambuc@CO{vi} 60*84d9c625SLionel Sambucinto text input mode. 61*84d9c625SLionel SambucThe 62*84d9c625SLionel Sambuc@LI{<escape>}character is used to resolve the text input into the file, 63*84d9c625SLionel Sambucand exit back into command mode. 64*84d9c625SLionel SambucIn 65*84d9c625SLionel Sambuc@CO{vi} 66*84d9c625SLionel Sambuccommand mode, the cursor is always positioned on the last column of 67*84d9c625SLionel Sambuccharacters which take up more than one column on the screen. 68*84d9c625SLionel SambucIn 69*84d9c625SLionel Sambuc@CO{vi} 70*84d9c625SLionel Sambuctext insert mode, the cursor is positioned on the first column of 71*84d9c625SLionel Sambuccharacters which take up more than one column on the screen. 72*84d9c625SLionel Sambuc 73*84d9c625SLionel SambucWhen positioning the cursor to a new line and column, 74*84d9c625SLionel Sambucthe type of movement is defined by the distance to the new cursor position. 75*84d9c625SLionel SambucIf the new position is close, 76*84d9c625SLionel Sambucthe screen is scrolled to the new location. 77*84d9c625SLionel SambucIf the new position is far away, 78*84d9c625SLionel Sambucthe screen is repainted so that the new position is on the screen. 79*84d9c625SLionel SambucIf the screen is scrolled, 80*84d9c625SLionel Sambucit is moved a minimal amount, 81*84d9c625SLionel Sambucand the cursor line will usually appear at the top or bottom of the screen. 82*84d9c625SLionel SambucIf the screen is repainted, 83*84d9c625SLionel Sambucthe cursor line will appear in the center of the screen, 84*84d9c625SLionel Sambucunless the cursor is sufficiently close to the beginning or end of the file 85*84d9c625SLionel Sambucthat this isn't possible. 86*84d9c625SLionel SambucIf the 87*84d9c625SLionel Sambuc@OP{leftright} 88*84d9c625SLionel Sambucoption is set, the screen may be scrolled or repainted in a horizontal 89*84d9c625SLionel Sambucdirection as well as in a vertical one. 90*84d9c625SLionel Sambuc 91*84d9c625SLionel SambucA major difference between the historical 92*84d9c625SLionel Sambuc@CO{vi} 93*84d9c625SLionel Sambucpresentation and 94*84d9c625SLionel Sambuc@CO{nvi} 95*84d9c625SLionel Sambucis in the scrolling and screen oriented position commands, 96*84d9c625SLionel Sambuc@CO{<control-B>}, 97*84d9c625SLionel Sambuc@CO{<control-D>}, 98*84d9c625SLionel Sambuc@CO{<control-E>}, 99*84d9c625SLionel Sambuc@CO{<control-F>}, 100*84d9c625SLionel Sambuc@CO{<control-U>}, 101*84d9c625SLionel Sambuc@CO{<control-Y>}, 102*84d9c625SLionel Sambuc@CO{H}, 103*84d9c625SLionel Sambuc@CO{L} 104*84d9c625SLionel Sambucand 105*84d9c625SLionel Sambuc@CO{M}. 106*84d9c625SLionel SambucIn historical implementations of 107*84d9c625SLionel Sambuc@CO{vi}, 108*84d9c625SLionel Sambucthese commands acted on physical (as opposed to logical, or screen) 109*84d9c625SLionel Sambuclines. 110*84d9c625SLionel SambucFor lines that were sufficiently long in relation to the size of the 111*84d9c625SLionel Sambucscreen, this meant that single line scroll commands might repaint the 112*84d9c625SLionel Sambucentire screen, scrolling or screen positioning commands might not change 113*84d9c625SLionel Sambucthe screen or move the cursor at all, and some lines simply could not 114*84d9c625SLionel Sambucbe displayed, even though 115*84d9c625SLionel Sambuc@CO{vi} 116*84d9c625SLionel Sambucwould edit the file that contained them. 117*84d9c625SLionel SambucIn 118*84d9c625SLionel Sambuc@CO{nvi}, 119*84d9c625SLionel Sambucthese commands act on logical, i.e. screen lines. 120*84d9c625SLionel SambucYou are unlikely to notice any difference unless you are editing files 121*84d9c625SLionel Sambucwith lines significantly longer than a screen width. 122*84d9c625SLionel Sambuc 123*84d9c625SLionel Sambuc@CO{Vi} 124*84d9c625SLionel Sambuckeeps track of the currently 125*84d9c625SLionel Sambuc@QQ{most attractive} 126*84d9c625SLionel Sambuccursor position. 127*84d9c625SLionel SambucEach command description (for commands that alter the current cursor 128*84d9c625SLionel Sambucposition), 129*84d9c625SLionel Sambucspecifies if the cursor is set to a specific location in the line, 130*84d9c625SLionel Sambucor if it is moved to the 131*84d9c625SLionel Sambuc@QQ{most attractive cursor position}. 132*84d9c625SLionel SambucThe latter means that the cursor is moved to the cursor position that 133*84d9c625SLionel Sambucis horizontally as close as possible to the current cursor position. 134*84d9c625SLionel SambucIf the current line is shorter than the cursor position 135*84d9c625SLionel Sambuc@CO{vi} 136*84d9c625SLionel Sambucwould select, the cursor is positioned on the last character in the line. 137*84d9c625SLionel Sambuc(If the line is empty, the cursor is positioned on the first column 138*84d9c625SLionel Sambucof the line.) 139*84d9c625SLionel SambucIf a command moves the cursor to the most attractive position, 140*84d9c625SLionel Sambucit does not alter the current cursor position, and a subsequent 141*84d9c625SLionel Sambucmovement will again attempt to move the cursor to that position. 142*84d9c625SLionel SambucTherefore, although a movement to a line shorter than the currently 143*84d9c625SLionel Sambucmost attractive position will cause the cursor to move to the end of 144*84d9c625SLionel Sambucthat line, a subsequent movement to a longer line will cause the 145*84d9c625SLionel Sambuccursor to move back to the most attractive position. 146*84d9c625SLionel Sambuc 147*84d9c625SLionel SambucIn addition, the 148*84d9c625SLionel Sambuc@CO{$} 149*84d9c625SLionel Sambuccommand makes the end of each line the most attractive cursor position 150*84d9c625SLionel Sambucrather than a specific column. 151*84d9c625SLionel Sambuc 152*84d9c625SLionel SambucEach 153*84d9c625SLionel Sambuc@CO{vi} 154*84d9c625SLionel Sambuccommand described below notes where the cursor ends up after it is 155*84d9c625SLionel Sambucexecuted. 156*84d9c625SLionel SambucThis position is described in terms of characters on the line, i.e. 157*84d9c625SLionel Sambuc@QQ{the previous character}, 158*84d9c625SLionel Sambucor, 159*84d9c625SLionel Sambuc@QQ{the last character in the line}. 160*84d9c625SLionel SambucThis is to avoid needing to continually refer to on what part of the 161*84d9c625SLionel Sambuccharacter the cursor rests. 162*84d9c625SLionel Sambuc 163*84d9c625SLionel SambucThe following words have special meaning for 164*84d9c625SLionel Sambuc@CO{vi} 165*84d9c625SLionel Sambuccommands. 166*84d9c625SLionel Sambuc@itemize @bullet 167*84d9c625SLionel Sambuc@cindex "previous context" 168*84d9c625SLionel Sambuc@IP{previous context} 169*84d9c625SLionel Sambuc 170*84d9c625SLionel SambucThe position of the cursor before the command which caused the 171*84d9c625SLionel Sambuclast absolute movement was executed. 172*84d9c625SLionel SambucEach 173*84d9c625SLionel Sambuc@CO{vi} 174*84d9c625SLionel Sambuccommand described in the next section that is considered an 175*84d9c625SLionel Sambucabsolute movement is so noted. 176*84d9c625SLionel SambucIn addition, specifying 177*84d9c625SLionel Sambuc@emph{any} 178*84d9c625SLionel Sambucaddress to an 179*84d9c625SLionel Sambuc@CO{ex} 180*84d9c625SLionel Sambuccommand is considered an absolute movement. 181*84d9c625SLionel Sambuc@cindex "motion" 182*84d9c625SLionel Sambuc@IP{motion} 183*84d9c625SLionel Sambuc 184*84d9c625SLionel SambucA second 185*84d9c625SLionel Sambuc@CO{vi} 186*84d9c625SLionel Sambuccommand can be used as an optional trailing argument to the 187*84d9c625SLionel Sambuc@CO{vi} 188*84d9c625SLionel Sambuc@CO{<}, 189*84d9c625SLionel Sambuc@CO{>}, 190*84d9c625SLionel Sambuc@CO{!}, 191*84d9c625SLionel Sambuc@CO{c}, 192*84d9c625SLionel Sambuc@CO{d}, 193*84d9c625SLionel Sambuc@CO{y}, 194*84d9c625SLionel Sambucand (depending on the 195*84d9c625SLionel Sambuc@OP{tildeop} 196*84d9c625SLionel Sambucoption) 197*84d9c625SLionel Sambuc@CO{~} 198*84d9c625SLionel Sambuccommands. 199*84d9c625SLionel SambucThis command indicates the end of the region of text that's affected by 200*84d9c625SLionel Sambucthe command. 201*84d9c625SLionel SambucThe motion command may be either the command character repeated (in 202*84d9c625SLionel Sambucwhich case it means the current line) or a cursor movement command. 203*84d9c625SLionel SambucIn the latter case, the region affected by the command is from the 204*84d9c625SLionel Sambucstarting or stopping cursor position which comes first in the file, 205*84d9c625SLionel Sambucto immediately before the starting or stopping cursor position which 206*84d9c625SLionel Sambuccomes later in the file. 207*84d9c625SLionel SambucCommands that operate on lines instead of using beginning and ending 208*84d9c625SLionel Sambuccursor positions operate on all of the lines that are wholly or 209*84d9c625SLionel Sambucpartially in the region. 210*84d9c625SLionel SambucIn addition, some other commands become line oriented depending on 211*84d9c625SLionel Sambucwhere in the text they are used. 212*84d9c625SLionel SambucThe command descriptions below note these special cases. 213*84d9c625SLionel Sambuc@sp 1 214*84d9c625SLionel SambucThe following commands may all be used as motion components for 215*84d9c625SLionel Sambuc@CO{vi} 216*84d9c625SLionel Sambuccommands: 217*84d9c625SLionel Sambuc@sp 1 218*84d9c625SLionel Sambuc@multitable {@CO{<control-N>}} {@CO{'<character>}} {@CO{<control-J>}} {@CO{<control-M>}} 219*84d9c625SLionel Sambuc@item @CO{<control-A>} @tab @CO{<control-H>} @tab @CO{<control-J>} @tab @CO{<control-M>} 220*84d9c625SLionel Sambuc@item @CO{<control-N>} @tab @CO{<control-P>} @tab @CO{<space>} @tab @CO{$} 221*84d9c625SLionel Sambuc@item @CO{%} @tab @CO{'<character>} @tab @CO{(} @tab @CO{)} 222*84d9c625SLionel Sambuc@item @CO{+} @tab @CO{,} @tab @CO{-} @tab @CO{/} 223*84d9c625SLionel Sambuc@item @CO{0} @tab @CO{;} @tab @CO{?} @tab @CO{B} 224*84d9c625SLionel Sambuc@item @CO{E} @tab @CO{F} @tab @CO{G} @tab @CO{H} 225*84d9c625SLionel Sambuc@item @CO{L} @tab @CO{M} @tab @CO{N} @tab @CO{T} 226*84d9c625SLionel Sambuc@item @CO{W} @tab @CO{[[} @tab @CO{]]} @tab @CO{^} 227*84d9c625SLionel Sambuc@item @CO{_} @tab @CO{`<character>} @tab @CO{b} @tab @CO{e} 228*84d9c625SLionel Sambuc@item @CO{f} @tab @CO{h} @tab @CO{j} @tab @CO{k} 229*84d9c625SLionel Sambuc@item @CO{l} @tab @CO{n} @tab @CO{t} @tab @CO{w} 230*84d9c625SLionel Sambuc@item @strong{@{} @tab @CO{|} @tab @strong{@}} 231*84d9c625SLionel Sambuc@end multitable 232*84d9c625SLionel Sambuc@sp 1 233*84d9c625SLionel SambucThe optional count prefix available for some of the 234*84d9c625SLionel Sambuc@CO{vi} 235*84d9c625SLionel Sambuccommands that take motion commands, 236*84d9c625SLionel Sambucor the count prefix available for the 237*84d9c625SLionel Sambuc@CO{vi} 238*84d9c625SLionel Sambuccommands that are used as motion components, 239*84d9c625SLionel Sambucmay be included and is 240*84d9c625SLionel Sambuc@emph{always} 241*84d9c625SLionel Sambucconsidered part of the motion argument. 242*84d9c625SLionel SambucFor example, the commands 243*84d9c625SLionel Sambuc@QT{c2w} 244*84d9c625SLionel Sambucand 245*84d9c625SLionel Sambuc@QT{2cw} 246*84d9c625SLionel Sambucare equivalent, and the region affected by the 247*84d9c625SLionel Sambuc@CO{c} 248*84d9c625SLionel Sambuccommand is two words of text. 249*84d9c625SLionel SambucIn addition, 250*84d9c625SLionel Sambucif the optional count prefix is specified for both the 251*84d9c625SLionel Sambuc@CO{vi} 252*84d9c625SLionel Sambuccommand and its motion component, 253*84d9c625SLionel Sambucthe effect is multiplicative and is considered part of the motion argument. 254*84d9c625SLionel SambucFor example, the commands 255*84d9c625SLionel Sambuc@QT{4cw} 256*84d9c625SLionel Sambucand 257*84d9c625SLionel Sambuc@QT{2c2w} 258*84d9c625SLionel Sambucare equivalent, and the region affected by the 259*84d9c625SLionel Sambuc@CO{c} 260*84d9c625SLionel Sambuccommand is four words of text. 261*84d9c625SLionel Sambuc@cindex "count" 262*84d9c625SLionel Sambuc@IP{count} 263*84d9c625SLionel Sambuc 264*84d9c625SLionel SambucA positive number used as an optional argument to most commands, 265*84d9c625SLionel Sambuceither to give a size or a position (for display or movement commands), 266*84d9c625SLionel Sambucor as a repeat count (for commands that modify text). 267*84d9c625SLionel SambucThe count argument is always optional and defaults to 1 unless otherwise 268*84d9c625SLionel Sambucnoted in the command description. 269*84d9c625SLionel Sambuc@sp 1 270*84d9c625SLionel SambucWhen a 271*84d9c625SLionel Sambuc@CO{vi} 272*84d9c625SLionel Sambuccommand synopsis shows both a 273*84d9c625SLionel Sambuc@LI{[buffer]}and 274*84d9c625SLionel Sambuc@LI{[count]}, 275*84d9c625SLionel Sambucthey may be presented in any order. 276*84d9c625SLionel Sambuc@cindex word 277*84d9c625SLionel Sambuc@IP{word} 278*84d9c625SLionel Sambuc 279*84d9c625SLionel SambucGenerally, in languages where it is applicable, 280*84d9c625SLionel Sambuc@CO{vi} 281*84d9c625SLionel Sambucrecognizes two kinds of words. 282*84d9c625SLionel SambucFirst, a sequence of letters, digits and underscores, 283*84d9c625SLionel Sambucdelimited at both ends by: 284*84d9c625SLionel Sambuccharacters other than letters, digits, or underscores, 285*84d9c625SLionel Sambucthe beginning or end of a line, and the beginning or end of the file. 286*84d9c625SLionel SambucSecond, a sequence of characters other than letters, digits, underscores, 287*84d9c625SLionel Sambucor whitespace characters, delimited at both ends by: a letter, digit, 288*84d9c625SLionel Sambucunderscore, or whitespace character, 289*84d9c625SLionel Sambucthe beginning or end of a line, and the beginning or end of the file. 290*84d9c625SLionel SambucFor example, the characters 291*84d9c625SLionel Sambuc@QT{ !@@#abc$%^ } 292*84d9c625SLionel Sambuccontain three words: 293*84d9c625SLionel Sambuc@QT{!@@#}, 294*84d9c625SLionel Sambuc@QT{abc} 295*84d9c625SLionel Sambucand 296*84d9c625SLionel Sambuc@QT{$%^}. 297*84d9c625SLionel Sambuc@sp 1 298*84d9c625SLionel SambucGroups of empty lines (or lines containing only whitespace characters) 299*84d9c625SLionel Sambucare treated as a single word. 300*84d9c625SLionel Sambuc@cindex "bigword" 301*84d9c625SLionel Sambuc@IP{bigword} 302*84d9c625SLionel Sambuc 303*84d9c625SLionel SambucA set of non-whitespace characters preceded and followed by whitespace 304*84d9c625SLionel Sambuccharacters or the beginning or end of the file or line. 305*84d9c625SLionel SambucFor example, the characters 306*84d9c625SLionel Sambuc@QT{ !@@#abc$%^ } 307*84d9c625SLionel Sambuccontain one bigword: 308*84d9c625SLionel Sambuc@QT{!@@#abc$%^}. 309*84d9c625SLionel Sambuc@sp 1 310*84d9c625SLionel SambucGroups of empty lines (or lines containing only whitespace characters) 311*84d9c625SLionel Sambucare treated as a single bigword. 312*84d9c625SLionel Sambuc@cindex "paragraph" 313*84d9c625SLionel Sambuc@IP{paragraph} 314*84d9c625SLionel Sambuc 315*84d9c625SLionel SambucAn area of text that begins with either the beginning of a file, 316*84d9c625SLionel Sambucan empty line, or a section boundary, and continues until either 317*84d9c625SLionel Sambucan empty line, section boundary, or the end of the file. 318*84d9c625SLionel Sambuc@sp 1 319*84d9c625SLionel SambucGroups of empty lines (or lines containing only whitespace characters) 320*84d9c625SLionel Sambucare treated as a single paragraph. 321*84d9c625SLionel Sambuc@sp 1 322*84d9c625SLionel SambucAdditional paragraph boundaries can be defined using the 323*84d9c625SLionel Sambuc@OP{paragraphs} 324*84d9c625SLionel Sambucoption. 325*84d9c625SLionel Sambuc@cindex "section" 326*84d9c625SLionel Sambuc@IP{section} 327*84d9c625SLionel Sambuc 328*84d9c625SLionel SambucAn area of text that starts with the beginning of the file or a line 329*84d9c625SLionel Sambucwhose first character is an open brace 330*84d9c625SLionel Sambuc@comment PQ 331*84d9c625SLionel Sambuc``@code{@{}'' 332*84d9c625SLionel Sambucand continues until the next section or the end of the file. 333*84d9c625SLionel Sambuc@sp 1 334*84d9c625SLionel SambucAdditional section boundaries can be defined using the 335*84d9c625SLionel Sambuc@OP{sections} 336*84d9c625SLionel Sambucoption. 337*84d9c625SLionel Sambuc@cindex "sentence" 338*84d9c625SLionel Sambuc@IP{sentence} 339*84d9c625SLionel Sambuc 340*84d9c625SLionel SambucAn area of text that begins with either the beginning of the file or the 341*84d9c625SLionel Sambucfirst nonblank character following the previous sentence, paragraph, or 342*84d9c625SLionel Sambucsection boundary and continues until the end of the file or a period 343*84d9c625SLionel Sambuc@PQ{.} 344*84d9c625SLionel Sambucexclamation point 345*84d9c625SLionel Sambuc@PQ{!} 346*84d9c625SLionel Sambucor question mark 347*84d9c625SLionel Sambuc@PQ{?} 348*84d9c625SLionel Sambuccharacter, 349*84d9c625SLionel Sambucfollowed by either an end-of-line or two whitespace characters. 350*84d9c625SLionel SambucAny number of closing parentheses 351*84d9c625SLionel Sambuc@PQ{)}, 352*84d9c625SLionel Sambucbrackets 353*84d9c625SLionel Sambuc@PQ{]}, 354*84d9c625SLionel Sambucdouble-quote 355*84d9c625SLionel Sambuc@PQ{"} 356*84d9c625SLionel Sambucor single quote 357*84d9c625SLionel Sambuc@PQ{'} 358*84d9c625SLionel Sambuccharacters can appear between the period, exclamation point, 359*84d9c625SLionel Sambucor question mark and the whitespace characters or end-of-line. 360*84d9c625SLionel Sambuc@sp 1 361*84d9c625SLionel SambucGroups of empty lines (or lines containing only whitespace characters) 362*84d9c625SLionel Sambucare treated as a single sentence. 363*84d9c625SLionel Sambuc@chapter Vi Commands 364*84d9c625SLionel Sambuc@end itemize 365*84d9c625SLionel Sambuc 366*84d9c625SLionel SambucThe following section describes the commands available in the command 367*84d9c625SLionel Sambucmode of the 368*84d9c625SLionel Sambuc@CO{vi} 369*84d9c625SLionel Sambuceditor. 370*84d9c625SLionel SambucIn each entry below, the tag line is a usage synopsis for the command 371*84d9c625SLionel Sambuccharacter. 372*84d9c625SLionel SambucIn addition, the final line and column the cursor rests upon, 373*84d9c625SLionel Sambucand any options which affect the command are noted. 374*84d9c625SLionel Sambuc 375*84d9c625SLionel Sambuc@cindex <control-A> 376*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-A>} 377*84d9c625SLionel Sambuc 378*84d9c625SLionel SambucSearch forward 379*84d9c625SLionel Sambuc@LI{count}times for the current word. 380*84d9c625SLionel SambucThe current word begins at the first non-whitespace character on or 381*84d9c625SLionel Sambucafter the current cursor position, 382*84d9c625SLionel Sambucand extends up to the next non-word character or the end of the line. 383*84d9c625SLionel SambucThe search is literal, i.e. no characters in the word have any special 384*84d9c625SLionel Sambucmeaning in terms of Regular Expressions. 385*84d9c625SLionel SambucIt is an error if no matching pattern is found between the starting position 386*84d9c625SLionel Sambucand the end of the file. 387*84d9c625SLionel Sambuc@sp 1 388*84d9c625SLionel SambucThe 389*84d9c625SLionel Sambuc@CO{<control-A>} 390*84d9c625SLionel Sambuccommand is an absolute movement. 391*84d9c625SLionel SambucThe 392*84d9c625SLionel Sambuc@CO{<control-A>} 393*84d9c625SLionel Sambuccommand may be used as the motion component of other 394*84d9c625SLionel Sambuc@CO{vi} 395*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 396*84d9c625SLionel Sambuccharacter oriented. 397*84d9c625SLionel Sambuc@table @asis 398*84d9c625SLionel Sambuc@item Line: 399*84d9c625SLionel SambucSet to the line where the word is found. 400*84d9c625SLionel Sambuc@item Column: 401*84d9c625SLionel SambucSet to the first character of the word. 402*84d9c625SLionel Sambuc@item Options: 403*84d9c625SLionel SambucAffected by the 404*84d9c625SLionel Sambuc@OP{ignorecase} 405*84d9c625SLionel Sambucand 406*84d9c625SLionel Sambuc@OP{wrapscan} 407*84d9c625SLionel Sambucoptions. 408*84d9c625SLionel Sambuc@end table 409*84d9c625SLionel Sambuc@end deftypefn 410*84d9c625SLionel Sambuc@cindex <control-B> 411*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-B>} 412*84d9c625SLionel Sambuc 413*84d9c625SLionel SambucPage backward 414*84d9c625SLionel Sambuc@LI{count}screens. 415*84d9c625SLionel SambucTwo lines of overlap are maintained, if possible, 416*84d9c625SLionel Sambucby displaying the window starting at line 417*84d9c625SLionel Sambuc@LI{(top_line - count * window_size) + 2}, 418*84d9c625SLionel Sambucwhere 419*84d9c625SLionel Sambuc@LI{window_size}is the value of the 420*84d9c625SLionel Sambuc@OP{window} 421*84d9c625SLionel Sambucoption. 422*84d9c625SLionel Sambuc(In the case of split screens, this size is corrected to the 423*84d9c625SLionel Sambuccurrent screen size.) 424*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 425*84d9c625SLionel Sambuc@table @asis 426*84d9c625SLionel Sambuc@item Line: 427*84d9c625SLionel SambucSet to the last line of text displayed on the screen. 428*84d9c625SLionel Sambuc@item Column: 429*84d9c625SLionel SambucSet to the first nonblank character of the line. 430*84d9c625SLionel Sambuc@item Options: 431*84d9c625SLionel SambucAffected by the 432*84d9c625SLionel Sambuc@OP{window} 433*84d9c625SLionel Sambucoption. 434*84d9c625SLionel Sambuc@end table 435*84d9c625SLionel Sambuc@end deftypefn 436*84d9c625SLionel Sambuc@cindex <control-D> 437*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-D>} 438*84d9c625SLionel Sambuc 439*84d9c625SLionel SambucScroll forward 440*84d9c625SLionel Sambuc@LI{count}lines. 441*84d9c625SLionel SambucIf 442*84d9c625SLionel Sambuc@LI{count}is not specified, scroll forward the number of lines specified by the last 443*84d9c625SLionel Sambuc@CO{<control-D>} 444*84d9c625SLionel Sambucor 445*84d9c625SLionel Sambuc@CO{<control-U>} 446*84d9c625SLionel Sambuccommand. 447*84d9c625SLionel SambucIf this is the first 448*84d9c625SLionel Sambuc@CO{<control-D>} 449*84d9c625SLionel Sambucor 450*84d9c625SLionel Sambuc@CO{<control-U>} 451*84d9c625SLionel Sambuccommand, 452*84d9c625SLionel Sambucscroll forward half the number of lines in the screen. 453*84d9c625SLionel Sambuc(In the case of split screens, the default scrolling distance is 454*84d9c625SLionel Sambuccorrected to half the current screen size.) 455*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 456*84d9c625SLionel Sambuc@table @asis 457*84d9c625SLionel Sambuc@item Line: 458*84d9c625SLionel SambucSet to the current line plus the number of lines scrolled. 459*84d9c625SLionel Sambuc@item Column: 460*84d9c625SLionel SambucSet to the first nonblank character of the line. 461*84d9c625SLionel Sambuc@item Options: 462*84d9c625SLionel SambucNone. 463*84d9c625SLionel Sambuc@end table 464*84d9c625SLionel Sambuc@end deftypefn 465*84d9c625SLionel Sambuc@cindex <control-E> 466*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-E>} 467*84d9c625SLionel Sambuc 468*84d9c625SLionel SambucScroll forward 469*84d9c625SLionel Sambuc@LI{count}lines, leaving the cursor on the current line and column, if possible. 470*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 471*84d9c625SLionel Sambuc@table @asis 472*84d9c625SLionel Sambuc@item Line: 473*84d9c625SLionel SambucUnchanged unless the current line scrolls off the screen, 474*84d9c625SLionel Sambucin which case it is set to the first line on the screen. 475*84d9c625SLionel Sambuc@item Column: 476*84d9c625SLionel SambucUnchanged unless the current line scrolls off the screen, 477*84d9c625SLionel Sambucin which case it is set to the most attractive cursor position. 478*84d9c625SLionel Sambuc@item Options: 479*84d9c625SLionel SambucNone. 480*84d9c625SLionel Sambuc@end table 481*84d9c625SLionel Sambuc@end deftypefn 482*84d9c625SLionel Sambuc@cindex <control-F> 483*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-F>} 484*84d9c625SLionel Sambuc 485*84d9c625SLionel SambucPage forward 486*84d9c625SLionel Sambuc@LI{count}screens. 487*84d9c625SLionel SambucTwo lines of overlap are maintained, if possible, 488*84d9c625SLionel Sambucby displaying the window starting at line 489*84d9c625SLionel Sambuc@LI{top_line + count * window_size - 2}, 490*84d9c625SLionel Sambucwhere 491*84d9c625SLionel Sambuc@LI{window_size}is the value of the 492*84d9c625SLionel Sambuc@OP{window} 493*84d9c625SLionel Sambucoption. 494*84d9c625SLionel Sambuc(In the case of split screens, this size is corrected to the 495*84d9c625SLionel Sambuccurrent screen size.) 496*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 497*84d9c625SLionel Sambuc@table @asis 498*84d9c625SLionel Sambuc@item Line: 499*84d9c625SLionel SambucSet to the first line on the screen. 500*84d9c625SLionel Sambuc@item Column: 501*84d9c625SLionel SambucSet to the first nonblank character of the current line. 502*84d9c625SLionel Sambuc@item Options: 503*84d9c625SLionel SambucAffected by the 504*84d9c625SLionel Sambuc@OP{window} 505*84d9c625SLionel Sambucoption. 506*84d9c625SLionel Sambuc@end table 507*84d9c625SLionel Sambuc@end deftypefn 508*84d9c625SLionel Sambuc@cindex <control-G> 509*84d9c625SLionel Sambuc@deftypefn Command {} {<control-G>} 510*84d9c625SLionel Sambuc 511*84d9c625SLionel SambucDisplay the file information. 512*84d9c625SLionel SambucThe information includes the current pathname, the current line, 513*84d9c625SLionel Sambucthe number of total lines in the file, the current line as a percentage 514*84d9c625SLionel Sambucof the total lines in the file, if the file has been modified, 515*84d9c625SLionel Sambucwas able to be locked, if the file's name has been changed, 516*84d9c625SLionel Sambucand if the edit session is read-only. 517*84d9c625SLionel Sambuc@table @asis 518*84d9c625SLionel Sambuc@item Line: 519*84d9c625SLionel SambucUnchanged. 520*84d9c625SLionel Sambuc@item Column: 521*84d9c625SLionel SambucUnchanged. 522*84d9c625SLionel Sambuc@item Options: 523*84d9c625SLionel SambucNone. 524*84d9c625SLionel Sambuc@end table 525*84d9c625SLionel Sambuc@end deftypefn 526*84d9c625SLionel Sambuc 527*84d9c625SLionel Sambuc@cindex <control-H> 528*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-H>} 529*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {h} 530*84d9c625SLionel SambucMove the cursor back 531*84d9c625SLionel Sambuc@LI{count}characters in the current line. 532*84d9c625SLionel SambucIt is an error if the cursor is on the first character in the line. 533*84d9c625SLionel Sambuc@sp 1 534*84d9c625SLionel SambucThe 535*84d9c625SLionel Sambuc@CO{<control-H>} 536*84d9c625SLionel Sambucand 537*84d9c625SLionel Sambuc@CO{h} 538*84d9c625SLionel Sambuccommands may be used as the motion component of other 539*84d9c625SLionel Sambuc@CO{vi} 540*84d9c625SLionel Sambuccommands, 541*84d9c625SLionel Sambucin which case any text copied into a buffer is character oriented. 542*84d9c625SLionel Sambuc@table @asis 543*84d9c625SLionel Sambuc@item Line: 544*84d9c625SLionel SambucUnchanged. 545*84d9c625SLionel Sambuc@item Column: 546*84d9c625SLionel SambucSet to the 547*84d9c625SLionel Sambuc@LI{current - count}character, or, the first character in the line if 548*84d9c625SLionel Sambuc@LI{count}is greater than or equal to the number of characters in the line 549*84d9c625SLionel Sambucbefore the cursor. 550*84d9c625SLionel Sambuc@item Options: 551*84d9c625SLionel SambucNone. 552*84d9c625SLionel Sambuc@end table 553*84d9c625SLionel Sambuc@end deftypefn 554*84d9c625SLionel Sambuc 555*84d9c625SLionel Sambuc@cindex <control-J> 556*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-J>} 557*84d9c625SLionel Sambuc 558*84d9c625SLionel Sambuc@cindex <control-N> 559*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {<control-N>} 560*84d9c625SLionel Sambuc@cindex j 561*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {j} 562*84d9c625SLionel SambucMove the cursor down 563*84d9c625SLionel Sambuc@LI{count}lines without changing the current column. 564*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 565*84d9c625SLionel Sambuc@sp 1 566*84d9c625SLionel SambucThe 567*84d9c625SLionel Sambuc@CO{<control-J>}, 568*84d9c625SLionel Sambuc@CO{<control-N>} 569*84d9c625SLionel Sambucand 570*84d9c625SLionel Sambuc@CO{j} 571*84d9c625SLionel Sambuccommands may be used as the motion component of other 572*84d9c625SLionel Sambuc@CO{vi} 573*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 574*84d9c625SLionel Sambucline oriented. 575*84d9c625SLionel Sambuc@table @asis 576*84d9c625SLionel Sambuc@item Line: 577*84d9c625SLionel SambucSet to the current line plus 578*84d9c625SLionel Sambuc@LI{count}. 579*84d9c625SLionel Sambuc@item Column: 580*84d9c625SLionel SambucThe most attractive cursor position. 581*84d9c625SLionel Sambuc@item Options: 582*84d9c625SLionel SambucNone. 583*84d9c625SLionel Sambuc@end table 584*84d9c625SLionel Sambuc@end deftypefn 585*84d9c625SLionel Sambuc@cindex <control-L> 586*84d9c625SLionel Sambuc@deftypefn Command {} {<control-L>} 587*84d9c625SLionel Sambuc 588*84d9c625SLionel Sambuc@cindex <control-R> 589*84d9c625SLionel Sambuc@deftypefnx Command {} {<control-R>} 590*84d9c625SLionel SambucRepaint the screen. 591*84d9c625SLionel Sambuc@table @asis 592*84d9c625SLionel Sambuc@item Line: 593*84d9c625SLionel SambucUnchanged. 594*84d9c625SLionel Sambuc@item Column: 595*84d9c625SLionel SambucUnchanged. 596*84d9c625SLionel Sambuc@item Options: 597*84d9c625SLionel SambucNone. 598*84d9c625SLionel Sambuc@end table 599*84d9c625SLionel Sambuc@end deftypefn 600*84d9c625SLionel Sambuc@cindex <control-M> 601*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-M>} 602*84d9c625SLionel Sambuc 603*84d9c625SLionel Sambuc@cindex + 604*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {+} 605*84d9c625SLionel SambucMove the cursor down 606*84d9c625SLionel Sambuc@LI{count}lines to the first nonblank character of that line. 607*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 608*84d9c625SLionel Sambuc@sp 1 609*84d9c625SLionel SambucThe 610*84d9c625SLionel Sambuc@CO{<control-M>} 611*84d9c625SLionel Sambucand 612*84d9c625SLionel Sambuc@CO{+} 613*84d9c625SLionel Sambuccommands may be used as the motion component of other 614*84d9c625SLionel Sambuc@CO{vi} 615*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 616*84d9c625SLionel Sambucline oriented. 617*84d9c625SLionel Sambuc@table @asis 618*84d9c625SLionel Sambuc@item Line: 619*84d9c625SLionel SambucSet to the current line plus 620*84d9c625SLionel Sambuc@LI{count}. 621*84d9c625SLionel Sambuc@item Column: 622*84d9c625SLionel SambucSet to the first nonblank character in the line. 623*84d9c625SLionel Sambuc@item Options: 624*84d9c625SLionel SambucNone. 625*84d9c625SLionel Sambuc@end table 626*84d9c625SLionel Sambuc@end deftypefn 627*84d9c625SLionel Sambuc@cindex <control-P> 628*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-P>} 629*84d9c625SLionel Sambuc 630*84d9c625SLionel Sambuc@cindex k 631*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {k} 632*84d9c625SLionel SambucMove the cursor up 633*84d9c625SLionel Sambuc@LI{count}lines, without changing the current column. 634*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 635*84d9c625SLionel Sambuc@sp 1 636*84d9c625SLionel SambucThe 637*84d9c625SLionel Sambuc@CO{<control-P>} 638*84d9c625SLionel Sambucand 639*84d9c625SLionel Sambuc@CO{k} 640*84d9c625SLionel Sambuccommands may be used as the motion component of other 641*84d9c625SLionel Sambuc@CO{vi} 642*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 643*84d9c625SLionel Sambucline oriented. 644*84d9c625SLionel Sambuc@table @asis 645*84d9c625SLionel Sambuc@item Line: 646*84d9c625SLionel SambucSet to the current line minus 647*84d9c625SLionel Sambuc@LI{count}. 648*84d9c625SLionel Sambuc@item Column: 649*84d9c625SLionel SambucThe most attractive cursor position. 650*84d9c625SLionel Sambuc@item Options: 651*84d9c625SLionel SambucNone. 652*84d9c625SLionel Sambuc@end table 653*84d9c625SLionel Sambuc@end deftypefn 654*84d9c625SLionel Sambuc@cindex <control-T> 655*84d9c625SLionel Sambuc@deftypefn Command {} {<control-T>} 656*84d9c625SLionel Sambuc 657*84d9c625SLionel SambucReturn to the most recent tag context. 658*84d9c625SLionel SambucThe 659*84d9c625SLionel Sambuc@CO{<control-T>} 660*84d9c625SLionel Sambuccommand is an absolute movement. 661*84d9c625SLionel Sambuc@table @asis 662*84d9c625SLionel Sambuc@item Line: 663*84d9c625SLionel SambucSet to the context of the previous tag command. 664*84d9c625SLionel Sambuc@item Column: 665*84d9c625SLionel SambucSet to the context of the previous tag command. 666*84d9c625SLionel Sambuc@item Options: 667*84d9c625SLionel SambucNone. 668*84d9c625SLionel Sambuc@end table 669*84d9c625SLionel Sambuc@end deftypefn 670*84d9c625SLionel Sambuc@cindex <control-U> 671*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-U>} 672*84d9c625SLionel Sambuc 673*84d9c625SLionel SambucScroll backward 674*84d9c625SLionel Sambuc@LI{count}lines. 675*84d9c625SLionel SambucIf 676*84d9c625SLionel Sambuc@LI{count}is not specified, scroll backward the number of lines specified by the 677*84d9c625SLionel Sambuclast 678*84d9c625SLionel Sambuc@CO{<control-D>} 679*84d9c625SLionel Sambucor 680*84d9c625SLionel Sambuc@CO{<control-U>} 681*84d9c625SLionel Sambuccommand. 682*84d9c625SLionel SambucIf this is the first 683*84d9c625SLionel Sambuc@CO{<control-D>} 684*84d9c625SLionel Sambucor 685*84d9c625SLionel Sambuc@CO{<control-U>} 686*84d9c625SLionel Sambuccommand, 687*84d9c625SLionel Sambucscroll backward half the number of lines in the screen. 688*84d9c625SLionel Sambuc(In the case of split screens, the default scrolling distance is 689*84d9c625SLionel Sambuccorrected to half the current screen size.) 690*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 691*84d9c625SLionel Sambuc@table @asis 692*84d9c625SLionel Sambuc@item Line: 693*84d9c625SLionel SambucSet to the current line minus the amount scrolled. 694*84d9c625SLionel Sambuc@item Column: 695*84d9c625SLionel SambucSet to the first nonblank character in the line. 696*84d9c625SLionel Sambuc@item Options: 697*84d9c625SLionel SambucNone. 698*84d9c625SLionel Sambuc@end table 699*84d9c625SLionel Sambuc@end deftypefn 700*84d9c625SLionel Sambuc@cindex <control-W> 701*84d9c625SLionel Sambuc@deftypefn Command {} {<control-W>} 702*84d9c625SLionel Sambuc 703*84d9c625SLionel SambucSwitch to the next lower screen in the window, or, to the first 704*84d9c625SLionel Sambucscreen if there are no lower screens in the window. 705*84d9c625SLionel Sambuc@table @asis 706*84d9c625SLionel Sambuc@item Line: 707*84d9c625SLionel SambucSet to the previous cursor position in the window. 708*84d9c625SLionel Sambuc@item Column: 709*84d9c625SLionel SambucSet to the previous cursor position in the window. 710*84d9c625SLionel Sambuc@item Options: 711*84d9c625SLionel SambucNone. 712*84d9c625SLionel Sambuc@end table 713*84d9c625SLionel Sambuc@end deftypefn 714*84d9c625SLionel Sambuc@cindex <control-Y> 715*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<control-Y>} 716*84d9c625SLionel Sambuc 717*84d9c625SLionel SambucScroll backward 718*84d9c625SLionel Sambuc@LI{count}lines, leaving the current line and column as is, if possible. 719*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 720*84d9c625SLionel Sambuc@table @asis 721*84d9c625SLionel Sambuc@item Line: 722*84d9c625SLionel SambucUnchanged unless the current line scrolls off the screen, 723*84d9c625SLionel Sambucin which case it is set to the last line of text displayed 724*84d9c625SLionel Sambucon the screen. 725*84d9c625SLionel Sambuc@item Column: 726*84d9c625SLionel SambucUnchanged unless the current line scrolls off the screen, 727*84d9c625SLionel Sambucin which case it is the most attractive cursor position. 728*84d9c625SLionel Sambuc@item Options: 729*84d9c625SLionel SambucNone. 730*84d9c625SLionel Sambuc@end table 731*84d9c625SLionel Sambuc@end deftypefn 732*84d9c625SLionel Sambuc@cindex <control-Z> 733*84d9c625SLionel Sambuc@deftypefn Command {} {<control-Z>} 734*84d9c625SLionel Sambuc 735*84d9c625SLionel SambucSuspend the current editor session. 736*84d9c625SLionel SambucIf the file has been modified since it was last completely written, 737*84d9c625SLionel Sambucand the 738*84d9c625SLionel Sambuc@OP{autowrite} 739*84d9c625SLionel Sambucoption is set, the file is written before the editor session is 740*84d9c625SLionel Sambucsuspended. 741*84d9c625SLionel SambucIf this write fails, the editor session is not suspended. 742*84d9c625SLionel Sambuc@table @asis 743*84d9c625SLionel Sambuc@item Line: 744*84d9c625SLionel SambucUnchanged. 745*84d9c625SLionel Sambuc@item Column: 746*84d9c625SLionel SambucUnchanged. 747*84d9c625SLionel Sambuc@item Options: 748*84d9c625SLionel SambucAffected by the 749*84d9c625SLionel Sambuc@OP{autowrite} 750*84d9c625SLionel Sambucoption. 751*84d9c625SLionel Sambuc@end table 752*84d9c625SLionel Sambuc@end deftypefn 753*84d9c625SLionel Sambuc@cindex <escape> 754*84d9c625SLionel Sambuc@deftypefn Command {} {<escape>} 755*84d9c625SLionel Sambuc 756*84d9c625SLionel SambucExecute 757*84d9c625SLionel Sambuc@CO{ex} 758*84d9c625SLionel Sambuccommands or cancel partial commands. 759*84d9c625SLionel SambucIf an 760*84d9c625SLionel Sambuc@CO{ex} 761*84d9c625SLionel Sambuccommand is being entered (e.g. 762*84d9c625SLionel Sambuc@CO{/}, 763*84d9c625SLionel Sambuc@CO{?}, 764*84d9c625SLionel Sambuc@CO{:} 765*84d9c625SLionel Sambucor 766*84d9c625SLionel Sambuc@CO{!}), 767*84d9c625SLionel Sambucthe command is executed. 768*84d9c625SLionel SambucIf a partial command has been entered, e.g. 769*84d9c625SLionel Sambuc@QT{[0-9]*}, 770*84d9c625SLionel Sambucor 771*84d9c625SLionel Sambuc@QT{[0-9]*[!<>cdy]}, 772*84d9c625SLionel Sambucthe command is cancelled. 773*84d9c625SLionel SambucOtherwise, it is an error. 774*84d9c625SLionel Sambuc@table @asis 775*84d9c625SLionel Sambuc@item Line: 776*84d9c625SLionel SambucWhen an 777*84d9c625SLionel Sambuc@CO{ex} 778*84d9c625SLionel Sambuccommand is being executed, the current line is set as described for 779*84d9c625SLionel Sambucthat command. 780*84d9c625SLionel SambucOtherwise, unchanged. 781*84d9c625SLionel Sambuc@item Column: 782*84d9c625SLionel SambucWhen an 783*84d9c625SLionel Sambuc@CO{ex} 784*84d9c625SLionel Sambuccommand is being executed, the current column is set as described for 785*84d9c625SLionel Sambucthat command. 786*84d9c625SLionel SambucOtherwise, unchanged. 787*84d9c625SLionel Sambuc@item Options: 788*84d9c625SLionel SambucNone. 789*84d9c625SLionel Sambuc@end table 790*84d9c625SLionel Sambuc@end deftypefn 791*84d9c625SLionel Sambuc@cindex <control-]> 792*84d9c625SLionel Sambuc@deftypefn Command {} {<control-]>} 793*84d9c625SLionel Sambuc 794*84d9c625SLionel SambucPush a tag reference onto the tag stack. 795*84d9c625SLionel SambucThe tags files (see the 796*84d9c625SLionel Sambuc@OP{tags} 797*84d9c625SLionel Sambucoption for more information) are searched for a tag matching the 798*84d9c625SLionel Sambuccurrent word. 799*84d9c625SLionel SambucThe current word begins at the first non-whitespace character on or 800*84d9c625SLionel Sambucafter the current cursor position, 801*84d9c625SLionel Sambucand extends up to the next non-word character or the end of the line. 802*84d9c625SLionel SambucIf a matching tag is found, the current file is discarded and the 803*84d9c625SLionel Sambucfile containing the tag reference is edited. 804*84d9c625SLionel Sambuc@sp 1 805*84d9c625SLionel SambucIf the current file has been modified since it was last completely 806*84d9c625SLionel Sambucwritten, the command will fail. 807*84d9c625SLionel SambucThe 808*84d9c625SLionel Sambuc@CO{<control-]>} 809*84d9c625SLionel Sambuccommand is an absolute movement. 810*84d9c625SLionel Sambuc@table @asis 811*84d9c625SLionel Sambuc@item Line: 812*84d9c625SLionel SambucSet to the line containing the matching tag string. 813*84d9c625SLionel Sambuc@item Column: 814*84d9c625SLionel SambucSet to the start of the matching tag string. 815*84d9c625SLionel Sambuc@item Options: 816*84d9c625SLionel SambucAffected by the 817*84d9c625SLionel Sambuc@OP{tags} 818*84d9c625SLionel Sambucand 819*84d9c625SLionel Sambuc@OP{taglength} 820*84d9c625SLionel Sambucoptions. 821*84d9c625SLionel Sambuc@end table 822*84d9c625SLionel Sambuc@end deftypefn 823*84d9c625SLionel Sambuc@cindex <control-^> 824*84d9c625SLionel Sambuc@deftypefn Command {} {<control-^>} 825*84d9c625SLionel Sambuc 826*84d9c625SLionel SambucSwitch to the most recently edited file. 827*84d9c625SLionel Sambuc@sp 1 828*84d9c625SLionel SambucIf the file has been modified since it was last completely written, 829*84d9c625SLionel Sambucand the 830*84d9c625SLionel Sambuc@OP{autowrite} 831*84d9c625SLionel Sambucoption is set, the file is written out. 832*84d9c625SLionel SambucIf this write fails, the command will fail. 833*84d9c625SLionel SambucOtherwise, if the current file has been modified since it was last 834*84d9c625SLionel Sambuccompletely written, the command will fail. 835*84d9c625SLionel Sambuc@table @asis 836*84d9c625SLionel Sambuc@item Line: 837*84d9c625SLionel SambucSet to the line the cursor was on when the file was last edited. 838*84d9c625SLionel Sambuc@item Column: 839*84d9c625SLionel SambucSet to the column the cursor was on when the file was last edited. 840*84d9c625SLionel Sambuc@item Options: 841*84d9c625SLionel SambucAffected by the 842*84d9c625SLionel Sambuc@OP{autowrite} 843*84d9c625SLionel Sambucoption. 844*84d9c625SLionel Sambuc@end table 845*84d9c625SLionel Sambuc@end deftypefn 846*84d9c625SLionel Sambuc@cindex <space> 847*84d9c625SLionel Sambuc@deftypefn Command {[count]} {<space>} 848*84d9c625SLionel Sambuc 849*84d9c625SLionel Sambuc@cindex l 850*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {l} 851*84d9c625SLionel SambucMove the cursor forward 852*84d9c625SLionel Sambuc@LI{count}characters without changing the current line. 853*84d9c625SLionel SambucIt is an error if the cursor is on the last character in the line. 854*84d9c625SLionel Sambuc@sp 1 855*84d9c625SLionel SambucThe 856*84d9c625SLionel Sambuc@CO{<space>} 857*84d9c625SLionel Sambucand 858*84d9c625SLionel Sambuc@CO{l} 859*84d9c625SLionel Sambuccommands may be used as the motion component of other 860*84d9c625SLionel Sambuc@CO{vi} 861*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 862*84d9c625SLionel Sambuccharacter oriented. 863*84d9c625SLionel SambucIn addition, these commands may be used as the motion components 864*84d9c625SLionel Sambucof other commands when the cursor is on the last character in the 865*84d9c625SLionel Sambucline, without error. 866*84d9c625SLionel Sambuc@table @asis 867*84d9c625SLionel Sambuc@item Line: 868*84d9c625SLionel SambucUnchanged. 869*84d9c625SLionel Sambuc@item Column: 870*84d9c625SLionel SambucSet to the current character plus the next 871*84d9c625SLionel Sambuc@LI{count}characters, or to the last character on the line if 872*84d9c625SLionel Sambuc@LI{count}is greater than the number of characters in the line after the 873*84d9c625SLionel Sambuccurrent character. 874*84d9c625SLionel Sambuc@item Options: 875*84d9c625SLionel SambucNone. 876*84d9c625SLionel Sambuc@end table 877*84d9c625SLionel Sambuc@end deftypefn 878*84d9c625SLionel Sambuc@cindex ! 879*84d9c625SLionel Sambuc@deftypefn Command {[count]} {!} {motion shell-argument(s)<carriage-return>} 880*84d9c625SLionel Sambuc 881*84d9c625SLionel SambucReplace text with results from a shell command. 882*84d9c625SLionel SambucPass the lines specified by the 883*84d9c625SLionel Sambuc@LI{count}and 884*84d9c625SLionel Sambuc@LI{motion}arguments as standard input to the program named by the 885*84d9c625SLionel Sambuc@OP{shell} 886*84d9c625SLionel Sambucoption, and replace those lines with the output (both 887*84d9c625SLionel Sambucstandard error and standard output) of that command. 888*84d9c625SLionel Sambuc@sp 1 889*84d9c625SLionel SambucAfter the motion is entered, 890*84d9c625SLionel Sambuc@CO{vi} 891*84d9c625SLionel Sambucprompts for arguments to the shell command. 892*84d9c625SLionel Sambuc@sp 1 893*84d9c625SLionel SambucWithin those arguments, 894*84d9c625SLionel Sambuc@QT{%} 895*84d9c625SLionel Sambucand 896*84d9c625SLionel Sambuc@QT{#} 897*84d9c625SLionel Sambuccharacters are expanded to the current and alternate pathnames, 898*84d9c625SLionel Sambucrespectively. 899*84d9c625SLionel SambucThe 900*84d9c625SLionel Sambuc@QT{!} 901*84d9c625SLionel Sambuccharacter is expanded with the command text of the previous 902*84d9c625SLionel Sambuc@CO{!} 903*84d9c625SLionel Sambucor 904*84d9c625SLionel Sambuc@CO{:!} 905*84d9c625SLionel Sambuccommands. 906*84d9c625SLionel Sambuc(Therefore, the command 907*84d9c625SLionel Sambuc@CO{!<motion>!} 908*84d9c625SLionel Sambucrepeats the previous 909*84d9c625SLionel Sambuc@CO{!} 910*84d9c625SLionel Sambuccommand.) 911*84d9c625SLionel SambucThe special meanings of 912*84d9c625SLionel Sambuc@QT{%}, 913*84d9c625SLionel Sambuc@QT{#} 914*84d9c625SLionel Sambucand 915*84d9c625SLionel Sambuc@QT{!} 916*84d9c625SLionel Sambuccan be overridden by escaping them with a backslash. 917*84d9c625SLionel SambucIf no 918*84d9c625SLionel Sambuc@CO{!} 919*84d9c625SLionel Sambucor 920*84d9c625SLionel Sambuc@CO{:!} 921*84d9c625SLionel Sambuccommand has yet been executed, 922*84d9c625SLionel Sambucit is an error to use an unescaped 923*84d9c625SLionel Sambuc@QT{!} 924*84d9c625SLionel Sambuccharacter as a shell argument. 925*84d9c625SLionel SambucThe 926*84d9c625SLionel Sambuc@CO{!} 927*84d9c625SLionel Sambuccommand does 928*84d9c625SLionel Sambuc@emph{not} 929*84d9c625SLionel Sambucdo shell expansion on the strings provided as arguments. 930*84d9c625SLionel SambucIf any of the above expansions change the arguments the user entered, 931*84d9c625SLionel Sambucthe command is redisplayed at the bottom of the screen. 932*84d9c625SLionel Sambuc@sp 1 933*84d9c625SLionel Sambuc@CO{Vi} 934*84d9c625SLionel Sambucthen executes the program named by the 935*84d9c625SLionel Sambuc@OP{shell} 936*84d9c625SLionel Sambucoption, with a 937*84d9c625SLionel Sambuc@strong{-c} 938*84d9c625SLionel Sambucflag followed by the arguments (which are bundled into a single argument). 939*84d9c625SLionel Sambuc@sp 1 940*84d9c625SLionel SambucThe 941*84d9c625SLionel Sambuc@CO{!} 942*84d9c625SLionel Sambuccommand is permitted in an empty file. 943*84d9c625SLionel Sambuc@sp 1 944*84d9c625SLionel SambucIf the file has been modified since it was last completely written, 945*84d9c625SLionel Sambucthe 946*84d9c625SLionel Sambuc@CO{!} 947*84d9c625SLionel Sambuccommand will warn you. 948*84d9c625SLionel Sambuc@table @asis 949*84d9c625SLionel Sambuc@item Line: 950*84d9c625SLionel SambucThe first line of the replaced text. 951*84d9c625SLionel Sambuc@item Column: 952*84d9c625SLionel SambucThe first column of the replaced text. 953*84d9c625SLionel Sambuc@item Options: 954*84d9c625SLionel SambucAffected by the 955*84d9c625SLionel Sambuc@OP{shell} 956*84d9c625SLionel Sambucoption. 957*84d9c625SLionel Sambuc@end table 958*84d9c625SLionel Sambuc@end deftypefn 959*84d9c625SLionel Sambuc@cindex # 960*84d9c625SLionel Sambuc@deftypefn Command {[count]} {#} {#|+|-} 961*84d9c625SLionel Sambuc 962*84d9c625SLionel SambucIncrement or decrement the number referenced by the cursor. 963*84d9c625SLionel SambucIf the trailing character is a 964*84d9c625SLionel Sambuc@LI{+}or 965*84d9c625SLionel Sambuc@LI{#}, 966*84d9c625SLionel Sambucthe number is incremented by 967*84d9c625SLionel Sambuc@LI{count}. 968*84d9c625SLionel SambucIf the trailing character is a 969*84d9c625SLionel Sambuc@LI{-}, 970*84d9c625SLionel Sambucthe number is decremented by 971*84d9c625SLionel Sambuc@LI{count}. 972*84d9c625SLionel Sambuc@sp 1 973*84d9c625SLionel SambucA leading 974*84d9c625SLionel Sambuc@QT{0X} 975*84d9c625SLionel Sambucor 976*84d9c625SLionel Sambuc@QT{0x} 977*84d9c625SLionel Sambuccauses the number to be interpreted as a hexadecimal number. 978*84d9c625SLionel SambucOtherwise, a leading 979*84d9c625SLionel Sambuc@QT{0} 980*84d9c625SLionel Sambuccauses the number to be interpreted as an octal number, unless a non-octal 981*84d9c625SLionel Sambucdigit is found as part of the number. 982*84d9c625SLionel SambucOtherwise, the number is interpreted as a decimal number, and may 983*84d9c625SLionel Sambuchave a leading 984*84d9c625SLionel Sambuc@LI{+}or 985*84d9c625SLionel Sambuc@LI{-}sign. 986*84d9c625SLionel SambucThe current number begins at the first non-blank character at or after 987*84d9c625SLionel Sambucthe current cursor position, and extends up to the end of the line or 988*84d9c625SLionel Sambucthe first character that isn't a possible character for the numeric type. 989*84d9c625SLionel SambucThe format of the number (e.g. leading 0's, signs) is retained unless 990*84d9c625SLionel Sambucthe new value cannot be represented in the previous format. 991*84d9c625SLionel Sambuc@sp 1 992*84d9c625SLionel SambucOctal and hexadecimal numbers, and the result of the operation, must fit 993*84d9c625SLionel Sambucinto an 994*84d9c625SLionel Sambuc@QT{unsigned long}. 995*84d9c625SLionel SambucSimilarly, decimal numbers and their result must fit into a 996*84d9c625SLionel Sambuc@QT{signed long}. 997*84d9c625SLionel SambucIt is an error to use this command when the cursor is not positioned at 998*84d9c625SLionel Sambuca number. 999*84d9c625SLionel Sambuc@sp 1 1000*84d9c625SLionel Sambuc@table @asis 1001*84d9c625SLionel Sambuc@item Line: 1002*84d9c625SLionel SambucUnchanged. 1003*84d9c625SLionel Sambuc@item Column: 1004*84d9c625SLionel SambucSet to the first character in the cursor number. 1005*84d9c625SLionel Sambuc@item Options: 1006*84d9c625SLionel SambucNone. 1007*84d9c625SLionel Sambuc@end table 1008*84d9c625SLionel Sambuc@end deftypefn 1009*84d9c625SLionel Sambuc@cindex $ 1010*84d9c625SLionel Sambuc@deftypefn Command {[count]} {$} 1011*84d9c625SLionel Sambuc 1012*84d9c625SLionel SambucMove the cursor to the end of a line. 1013*84d9c625SLionel SambucIf 1014*84d9c625SLionel Sambuc@LI{count}is specified, the cursor moves down 1015*84d9c625SLionel Sambuc@LI{count - 1}lines. 1016*84d9c625SLionel Sambuc@sp 1 1017*84d9c625SLionel SambucIt is not an error to use the 1018*84d9c625SLionel Sambuc@CO{$} 1019*84d9c625SLionel Sambuccommand when the cursor is on the last character in the line or 1020*84d9c625SLionel Sambucwhen the line is empty. 1021*84d9c625SLionel Sambuc@sp 1 1022*84d9c625SLionel SambucThe 1023*84d9c625SLionel Sambuc@CO{$} 1024*84d9c625SLionel Sambuccommand may be used as the motion component of other 1025*84d9c625SLionel Sambuc@CO{vi} 1026*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1027*84d9c625SLionel Sambuccharacter oriented, unless the cursor is at, or before the first 1028*84d9c625SLionel Sambucnonblank character in the line, in which case it is line oriented. 1029*84d9c625SLionel SambucIt is not an error to use the 1030*84d9c625SLionel Sambuc@CO{$} 1031*84d9c625SLionel Sambuccommand as a motion component when the cursor is on the last character 1032*84d9c625SLionel Sambucin the line, although it is an error when the line is empty. 1033*84d9c625SLionel Sambuc@table @asis 1034*84d9c625SLionel Sambuc@item Line: 1035*84d9c625SLionel SambucSet to the current line plus 1036*84d9c625SLionel Sambuc@LI{count}minus 1. 1037*84d9c625SLionel Sambuc@item Column: 1038*84d9c625SLionel SambucSet to the last character in the line. 1039*84d9c625SLionel Sambuc@item Options: 1040*84d9c625SLionel SambucNone. 1041*84d9c625SLionel Sambuc@end table 1042*84d9c625SLionel Sambuc@end deftypefn 1043*84d9c625SLionel Sambuc@cindex % 1044*84d9c625SLionel Sambuc@deftypefn Command {} {%} 1045*84d9c625SLionel Sambuc 1046*84d9c625SLionel SambucMove to the matching character. 1047*84d9c625SLionel SambucThe cursor moves to the bracket character which 1048*84d9c625SLionel Sambuc@emph{matches} 1049*84d9c625SLionel Sambucthe bracket found at the current cursor position 1050*84d9c625SLionel Sambucor which is the closest one to the right of the cursor on the line. 1051*84d9c625SLionel SambucThe bracket characters are defined by the 1052*84d9c625SLionel Sambuc@OP{matchchars} 1053*84d9c625SLionel Sambucoption. 1054*84d9c625SLionel SambucAn error will be reported if none of the 1055*84d9c625SLionel Sambuc@OP{matchchars} 1056*84d9c625SLionel Sambuccharacters is found, or if no matching character is found. 1057*84d9c625SLionel SambucIf the open and close brackes are identical (e.g.: if they are 1058*84d9c625SLionel Sambuc@QT{'} 1059*84d9c625SLionel Sambucor 1060*84d9c625SLionel Sambuc@QT{"}, 1061*84d9c625SLionel Sambucthen repeating a 1062*84d9c625SLionel Sambuc@CO{%} 1063*84d9c625SLionel Sambuccommand will perform a backwards search from the original opening bracket. 1064*84d9c625SLionel SambucHistorically, any 1065*84d9c625SLionel Sambuc@LI{count}specified to the 1066*84d9c625SLionel Sambuc@CO{%} 1067*84d9c625SLionel Sambuccommand was ignored. 1068*84d9c625SLionel Sambuc@sp 1 1069*84d9c625SLionel SambucThe 1070*84d9c625SLionel Sambuc@CO{%} 1071*84d9c625SLionel Sambuccommand is an absolute movement. 1072*84d9c625SLionel SambucThe 1073*84d9c625SLionel Sambuc@CO{%} 1074*84d9c625SLionel Sambuccommand may be used as the motion component of other 1075*84d9c625SLionel Sambuc@CO{vi} 1076*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1077*84d9c625SLionel Sambuccharacter oriented, unless the starting point of the region is at 1078*84d9c625SLionel Sambucor before the first nonblank character on its line, and the ending 1079*84d9c625SLionel Sambucpoint is at or after the last nonblank character on its line, in 1080*84d9c625SLionel Sambucwhich case it is line oriented. 1081*84d9c625SLionel Sambuc@table @asis 1082*84d9c625SLionel Sambuc@item Line: 1083*84d9c625SLionel SambucSet to the line containing the matching character. 1084*84d9c625SLionel Sambuc@item Column: 1085*84d9c625SLionel SambucSet to the matching character. 1086*84d9c625SLionel Sambuc@item Options: 1087*84d9c625SLionel SambucNone. 1088*84d9c625SLionel Sambuc@end table 1089*84d9c625SLionel Sambuc@end deftypefn 1090*84d9c625SLionel Sambuc@cindex & 1091*84d9c625SLionel Sambuc@deftypefn Command {} {&} 1092*84d9c625SLionel Sambuc 1093*84d9c625SLionel SambucRepeat the previous substitution command on the current line. 1094*84d9c625SLionel Sambuc@sp 1 1095*84d9c625SLionel SambucHistorically, any 1096*84d9c625SLionel Sambuc@LI{count}specified to the 1097*84d9c625SLionel Sambuc@CO{&} 1098*84d9c625SLionel Sambuccommand was ignored. 1099*84d9c625SLionel Sambuc@table @asis 1100*84d9c625SLionel Sambuc@item Line: 1101*84d9c625SLionel SambucUnchanged. 1102*84d9c625SLionel Sambuc@item Column: 1103*84d9c625SLionel SambucUnchanged if the cursor was on the last character in the line, 1104*84d9c625SLionel Sambucotherwise, set to the first nonblank character in the line. 1105*84d9c625SLionel Sambuc@item Options: 1106*84d9c625SLionel SambucAffected by the 1107*84d9c625SLionel Sambuc@OP{edcompatible}, 1108*84d9c625SLionel Sambuc@OP{extended}, 1109*84d9c625SLionel Sambuc@OP{ignorecase} 1110*84d9c625SLionel Sambucand 1111*84d9c625SLionel Sambuc@OP{magic} 1112*84d9c625SLionel Sambucoptions. 1113*84d9c625SLionel Sambuc@end table 1114*84d9c625SLionel Sambuc@end deftypefn 1115*84d9c625SLionel Sambuc@cindex SQUOTE<character> 1116*84d9c625SLionel Sambuc@deftypefn Command {} {'<character>} 1117*84d9c625SLionel Sambuc 1118*84d9c625SLionel Sambuc@cindex `<character> 1119*84d9c625SLionel Sambuc@deftypefnx Command {} `<character> 1120*84d9c625SLionel SambucReturn to a context marked by the character 1121*84d9c625SLionel Sambuc@LI{<character>}. 1122*84d9c625SLionel SambucIf 1123*84d9c625SLionel Sambuc@LI{<character>}is the 1124*84d9c625SLionel Sambuc@QT{'} 1125*84d9c625SLionel Sambucor 1126*84d9c625SLionel Sambuc@QT{`} 1127*84d9c625SLionel Sambuccharacter, return to the previous context. 1128*84d9c625SLionel SambucIf 1129*84d9c625SLionel Sambuc@LI{<character>}is any other character, 1130*84d9c625SLionel Sambucreturn to the context marked by that character (see the 1131*84d9c625SLionel Sambuc@CO{m} 1132*84d9c625SLionel Sambuccommand for more information). 1133*84d9c625SLionel SambucIf the command is the 1134*84d9c625SLionel Sambuc@CO{\'} 1135*84d9c625SLionel Sambuccommand, only the line value is restored, 1136*84d9c625SLionel Sambucand the cursor is placed on the first nonblank character of that line. 1137*84d9c625SLionel SambucIf the command is the 1138*84d9c625SLionel Sambuc@CO{`} 1139*84d9c625SLionel Sambuccommand, both the line and column values are restored. 1140*84d9c625SLionel Sambuc@sp 1 1141*84d9c625SLionel SambucIt is an error if the context no longer exists because of 1142*84d9c625SLionel Sambucline deletion. 1143*84d9c625SLionel Sambuc(Contexts follow lines that are moved, or which are deleted 1144*84d9c625SLionel Sambucand then restored.) 1145*84d9c625SLionel Sambuc@sp 1 1146*84d9c625SLionel SambucThe 1147*84d9c625SLionel Sambuc@CO{\'} 1148*84d9c625SLionel Sambucand 1149*84d9c625SLionel Sambuc@CO{`} 1150*84d9c625SLionel Sambuccommands are both absolute movements. 1151*84d9c625SLionel SambucThey may be used as a motion component for other 1152*84d9c625SLionel Sambuc@CO{vi} 1153*84d9c625SLionel Sambuccommands. 1154*84d9c625SLionel SambucFor the 1155*84d9c625SLionel Sambuc@CO{\'} 1156*84d9c625SLionel Sambuccommand, any text copied into a buffer is line oriented. 1157*84d9c625SLionel SambucFor the 1158*84d9c625SLionel Sambuc@CO{`} 1159*84d9c625SLionel Sambuccommand, 1160*84d9c625SLionel Sambucany text copied into a buffer is character oriented, 1161*84d9c625SLionel Sambucunless it both starts and stops at the first character in the line, 1162*84d9c625SLionel Sambucin which case it is line oriented. 1163*84d9c625SLionel SambucIn addition, when using the 1164*84d9c625SLionel Sambuc@CO{`} 1165*84d9c625SLionel Sambuccommand as a motion component, 1166*84d9c625SLionel Sambuccommands which move backward and started at the first character in the line, 1167*84d9c625SLionel Sambucor move forward and ended at the first character in the line, 1168*84d9c625SLionel Sambucare corrected to the last character of the line preceding the starting and 1169*84d9c625SLionel Sambucending lines, respectively. 1170*84d9c625SLionel Sambuc@table @asis 1171*84d9c625SLionel Sambuc@item Line: 1172*84d9c625SLionel SambucSet to the line from the context. 1173*84d9c625SLionel Sambuc@item Column: 1174*84d9c625SLionel SambucSet to the first nonblank character in the line, for the 1175*84d9c625SLionel Sambuc@CO{\'} 1176*84d9c625SLionel Sambuccommand, and set to the context's column for the 1177*84d9c625SLionel Sambuc@CO{`} 1178*84d9c625SLionel Sambuccommand. 1179*84d9c625SLionel Sambuc@item Options: 1180*84d9c625SLionel SambucNone. 1181*84d9c625SLionel Sambuc@end table 1182*84d9c625SLionel Sambuc@end deftypefn 1183*84d9c625SLionel Sambuc@cindex ( 1184*84d9c625SLionel Sambuc@deftypefn Command {} {[count] (} 1185*84d9c625SLionel Sambuc 1186*84d9c625SLionel SambucBack up 1187*84d9c625SLionel Sambuc@LI{count}sentences. 1188*84d9c625SLionel Sambuc@sp 1 1189*84d9c625SLionel SambucThe 1190*84d9c625SLionel Sambuc@CO{(} 1191*84d9c625SLionel Sambuccommand is an absolute movement. 1192*84d9c625SLionel SambucThe 1193*84d9c625SLionel Sambuc@CO{(} 1194*84d9c625SLionel Sambuccommand may be used as the motion component of other 1195*84d9c625SLionel Sambuc@CO{vi} 1196*84d9c625SLionel Sambuccommands, 1197*84d9c625SLionel Sambucin which case any text copied into a buffer is character oriented, 1198*84d9c625SLionel Sambucunless the starting and stopping points of the region are the first 1199*84d9c625SLionel Sambuccharacter in the line, 1200*84d9c625SLionel Sambucin which case it is line oriented. 1201*84d9c625SLionel SambucIf it is line oriented, 1202*84d9c625SLionel Sambucthe starting point of the region is adjusted to be the end of the line 1203*84d9c625SLionel Sambucimmediately before the starting cursor position. 1204*84d9c625SLionel Sambuc@table @asis 1205*84d9c625SLionel Sambuc@item Line: 1206*84d9c625SLionel SambucSet to the line containing the beginning of the sentence. 1207*84d9c625SLionel Sambuc@item Column: 1208*84d9c625SLionel SambucSet to the first nonblank character of the sentence. 1209*84d9c625SLionel Sambuc@item Options: 1210*84d9c625SLionel SambucAffected by the 1211*84d9c625SLionel Sambuc@OP{lisp} 1212*84d9c625SLionel Sambucoption. 1213*84d9c625SLionel Sambuc@end table 1214*84d9c625SLionel Sambuc@end deftypefn 1215*84d9c625SLionel Sambuc@cindex ) 1216*84d9c625SLionel Sambuc@deftypefn Command {[count]} {)} 1217*84d9c625SLionel Sambuc 1218*84d9c625SLionel SambucMove forward 1219*84d9c625SLionel Sambuc@LI{count}sentences. 1220*84d9c625SLionel Sambuc@sp 1 1221*84d9c625SLionel SambucThe 1222*84d9c625SLionel Sambuc@CO{)} 1223*84d9c625SLionel Sambuccommand is an absolute movement. 1224*84d9c625SLionel SambucThe 1225*84d9c625SLionel Sambuc@CO{)} 1226*84d9c625SLionel Sambuccommand may be used as the motion component of other 1227*84d9c625SLionel Sambuc@CO{vi} 1228*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1229*84d9c625SLionel Sambuccharacter oriented, unless the starting point of the region is the 1230*84d9c625SLionel Sambucfirst character in the line, in which case it is line oriented. 1231*84d9c625SLionel SambucIn the latter case, if the stopping point of the region is also 1232*84d9c625SLionel Sambucthe first character in the line, it is adjusted to be the end of the 1233*84d9c625SLionel Sambucline immediately before it. 1234*84d9c625SLionel Sambuc@table @asis 1235*84d9c625SLionel Sambuc@item Line: 1236*84d9c625SLionel SambucSet to the line containing the beginning of the sentence. 1237*84d9c625SLionel Sambuc@item Column: 1238*84d9c625SLionel SambucSet to the first nonblank character of the sentence. 1239*84d9c625SLionel Sambuc@item Options: 1240*84d9c625SLionel SambucAffected by the 1241*84d9c625SLionel Sambuc@OP{lisp} 1242*84d9c625SLionel Sambucoption. 1243*84d9c625SLionel Sambuc@end table 1244*84d9c625SLionel Sambuc@end deftypefn 1245*84d9c625SLionel Sambuc@cindex , 1246*84d9c625SLionel Sambuc@deftypefn Command {[count]} {,} 1247*84d9c625SLionel Sambuc 1248*84d9c625SLionel SambucReverse find character 1249*84d9c625SLionel Sambuc@LI{count}times. 1250*84d9c625SLionel SambucReverse the last 1251*84d9c625SLionel Sambuc@CO{F}, 1252*84d9c625SLionel Sambuc@CO{f}, 1253*84d9c625SLionel Sambuc@CO{T} 1254*84d9c625SLionel Sambucor 1255*84d9c625SLionel Sambuc@CO{t} 1256*84d9c625SLionel Sambuccommand, searching the other way in the line, 1257*84d9c625SLionel Sambuc@LI{count}times. 1258*84d9c625SLionel SambucIt is an error if a 1259*84d9c625SLionel Sambuc@CO{F}, 1260*84d9c625SLionel Sambuc@CO{f}, 1261*84d9c625SLionel Sambuc@CO{T} 1262*84d9c625SLionel Sambucor 1263*84d9c625SLionel Sambuc@CO{t} 1264*84d9c625SLionel Sambuccommand has not been performed yet. 1265*84d9c625SLionel Sambuc@sp 1 1266*84d9c625SLionel SambucThe 1267*84d9c625SLionel Sambuc@CO{,} 1268*84d9c625SLionel Sambuccommand may be used as the motion component of other 1269*84d9c625SLionel Sambuc@CO{vi} 1270*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1271*84d9c625SLionel Sambuccharacter oriented. 1272*84d9c625SLionel Sambuc@table @asis 1273*84d9c625SLionel Sambuc@item Line: 1274*84d9c625SLionel SambucUnchanged. 1275*84d9c625SLionel Sambuc@item Column: 1276*84d9c625SLionel SambucSet to the searched-for character for the 1277*84d9c625SLionel Sambuc@CO{F} 1278*84d9c625SLionel Sambucand 1279*84d9c625SLionel Sambuc@CO{f} 1280*84d9c625SLionel Sambuccommands, 1281*84d9c625SLionel Sambucbefore the character for the 1282*84d9c625SLionel Sambuc@CO{t} 1283*84d9c625SLionel Sambuccommand 1284*84d9c625SLionel Sambucand after the character for the 1285*84d9c625SLionel Sambuc@CO{T} 1286*84d9c625SLionel Sambuccommand. 1287*84d9c625SLionel Sambuc@item Options: 1288*84d9c625SLionel SambucNone. 1289*84d9c625SLionel Sambuc@end table 1290*84d9c625SLionel Sambuc@end deftypefn 1291*84d9c625SLionel Sambuc@cindex MINUSSIGN 1292*84d9c625SLionel Sambuc@deftypefn Command {[count]} {-} 1293*84d9c625SLionel Sambuc 1294*84d9c625SLionel SambucMove to the first nonblank of the previous line, 1295*84d9c625SLionel Sambuc@LI{count}times. 1296*84d9c625SLionel Sambuc@sp 1 1297*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 1298*84d9c625SLionel Sambuc@sp 1 1299*84d9c625SLionel SambucThe 1300*84d9c625SLionel Sambuc@CO{-} 1301*84d9c625SLionel Sambuccommand may be used as the motion component of other 1302*84d9c625SLionel Sambuc@CO{vi} 1303*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1304*84d9c625SLionel Sambucline oriented. 1305*84d9c625SLionel Sambuc@table @asis 1306*84d9c625SLionel Sambuc@item Line: 1307*84d9c625SLionel SambucSet to the current line minus 1308*84d9c625SLionel Sambuc@LI{count}. 1309*84d9c625SLionel Sambuc@item Column: 1310*84d9c625SLionel SambucSet to the first nonblank character in the line. 1311*84d9c625SLionel Sambuc@item Options: 1312*84d9c625SLionel SambucNone. 1313*84d9c625SLionel Sambuc@end table 1314*84d9c625SLionel Sambuc@end deftypefn 1315*84d9c625SLionel Sambuc@cindex . 1316*84d9c625SLionel Sambuc@deftypefn Command {[count]} {.} 1317*84d9c625SLionel Sambuc 1318*84d9c625SLionel SambucRepeat the last 1319*84d9c625SLionel Sambuc@CO{vi} 1320*84d9c625SLionel Sambuccommand that modified text. 1321*84d9c625SLionel SambucThe repeated command may be a command and motion component combination. 1322*84d9c625SLionel SambucIf 1323*84d9c625SLionel Sambuc@LI{count}is specified, it replaces 1324*84d9c625SLionel Sambuc@emph{both} 1325*84d9c625SLionel Sambucthe count specified for the repeated command, and, if applicable, for 1326*84d9c625SLionel Sambucthe repeated motion component. 1327*84d9c625SLionel SambucIf 1328*84d9c625SLionel Sambuc@LI{count}is not specified, the counts originally specified to the command being 1329*84d9c625SLionel Sambucrepeated are used again. 1330*84d9c625SLionel Sambuc@sp 1 1331*84d9c625SLionel SambucAs a special case, if the 1332*84d9c625SLionel Sambuc@CO{\.} 1333*84d9c625SLionel Sambuccommand is executed immediately after the 1334*84d9c625SLionel Sambuc@CO{u} 1335*84d9c625SLionel Sambuccommand, the change log is rolled forward or backward, depending on 1336*84d9c625SLionel Sambucthe action of the 1337*84d9c625SLionel Sambuc@CO{u} 1338*84d9c625SLionel Sambuccommand. 1339*84d9c625SLionel Sambuc@table @asis 1340*84d9c625SLionel Sambuc@item Line: 1341*84d9c625SLionel SambucSet as described for the repeated command. 1342*84d9c625SLionel Sambuc@item Column: 1343*84d9c625SLionel SambucSet as described for the repeated command. 1344*84d9c625SLionel Sambuc@item Options: 1345*84d9c625SLionel SambucNone. 1346*84d9c625SLionel Sambuc@end table 1347*84d9c625SLionel Sambuc@end deftypefn 1348*84d9c625SLionel Sambuc@cindex /RE/ 1349*84d9c625SLionel Sambuc@deftypefn Command {} {/RE<carriage-return>} 1350*84d9c625SLionel Sambuc 1351*84d9c625SLionel Sambuc@deftypefnx Command {} {/RE/} {[offset]<carriage-return>} 1352*84d9c625SLionel Sambuc@cindex ?RE? 1353*84d9c625SLionel Sambuc@deftypefnx Command {} {?RE<carriage-return>} 1354*84d9c625SLionel Sambuc@deftypefnx Command {} {?RE?} {[offset]<carriage-return>} 1355*84d9c625SLionel Sambuc@cindex N 1356*84d9c625SLionel Sambuc@deftypefnx Command {} N 1357*84d9c625SLionel Sambuc@cindex n 1358*84d9c625SLionel Sambuc@deftypefnx Command {} n 1359*84d9c625SLionel SambucSearch forward or backward for a regular expression. 1360*84d9c625SLionel SambucThe commands beginning with a slash 1361*84d9c625SLionel Sambuc@PQ{/} 1362*84d9c625SLionel Sambuccharacter are forward searches, the commands beginning with a 1363*84d9c625SLionel Sambucquestion mark 1364*84d9c625SLionel Sambuc@PQ{?} 1365*84d9c625SLionel Sambucare backward searches. 1366*84d9c625SLionel Sambuc@CO{Vi} 1367*84d9c625SLionel Sambucprompts with the leading character on the last line of the screen 1368*84d9c625SLionel Sambucfor a string. 1369*84d9c625SLionel SambucIt then searches forward or backward in the file for the next 1370*84d9c625SLionel Sambucoccurrence of the string, which is interpreted as a Basic Regular 1371*84d9c625SLionel SambucExpression. 1372*84d9c625SLionel Sambuc@sp 1 1373*84d9c625SLionel SambucThe 1374*84d9c625SLionel Sambuc@CO{/} 1375*84d9c625SLionel Sambucand 1376*84d9c625SLionel Sambuc@CO{?} 1377*84d9c625SLionel Sambuccommands are absolute movements. 1378*84d9c625SLionel SambucThey may be used as the motion components of other 1379*84d9c625SLionel Sambuc@CO{vi} 1380*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1381*84d9c625SLionel Sambuccharacter oriented, unless the search started and ended on 1382*84d9c625SLionel Sambucthe first column of a line, in which case it is line oriented. 1383*84d9c625SLionel SambucIn addition, forward searches ending at the first character of a line, 1384*84d9c625SLionel Sambucand backward searches beginning at the first character in the line, 1385*84d9c625SLionel Sambucare corrected to begin or end at the last character of the previous line. 1386*84d9c625SLionel Sambuc(Note, forward and backward searches can occur for both 1387*84d9c625SLionel Sambuc@CO{/} 1388*84d9c625SLionel Sambucand 1389*84d9c625SLionel Sambuc@CO{?} 1390*84d9c625SLionel Sambuccommands, if the 1391*84d9c625SLionel Sambuc@OP{wrapscan} 1392*84d9c625SLionel Sambucoption is set.) 1393*84d9c625SLionel Sambuc@sp 1 1394*84d9c625SLionel SambucIf an offset from the matched line is specified (i.e. a trailing 1395*84d9c625SLionel Sambuc@QT{/} 1396*84d9c625SLionel Sambucor 1397*84d9c625SLionel Sambuc@QT{?} 1398*84d9c625SLionel Sambuccharacter is followed by a signed offset), the buffer will always 1399*84d9c625SLionel Sambucbe line oriented (e.g. 1400*84d9c625SLionel Sambuc@QT{/string/+0} 1401*84d9c625SLionel Sambucwill always guarantee a line orientation). 1402*84d9c625SLionel Sambuc@sp 1 1403*84d9c625SLionel SambucThe 1404*84d9c625SLionel Sambuc@CO{N} 1405*84d9c625SLionel Sambuccommand repeats the previous search, but in the reverse direction. 1406*84d9c625SLionel SambucThe 1407*84d9c625SLionel Sambuc@CO{n} 1408*84d9c625SLionel Sambuccommand repeats the previous search. 1409*84d9c625SLionel SambucIf either the 1410*84d9c625SLionel Sambuc@CO{N} 1411*84d9c625SLionel Sambucor 1412*84d9c625SLionel Sambuc@CO{n} 1413*84d9c625SLionel Sambuccommands are used as motion components for the 1414*84d9c625SLionel Sambuc@CO{!} 1415*84d9c625SLionel Sambuccommand, you will not be prompted for the text of the bang command, 1416*84d9c625SLionel Sambucinstead the previous bang command will be executed. 1417*84d9c625SLionel Sambuc@sp 1 1418*84d9c625SLionel SambucMissing RE's (e.g. 1419*84d9c625SLionel Sambuc@QT{//<carriage-return>}, 1420*84d9c625SLionel Sambuc@QT{/<carriage-return>}, 1421*84d9c625SLionel Sambuc@QT{??<carriage-return>}, 1422*84d9c625SLionel Sambucor 1423*84d9c625SLionel Sambuc@QT{?<carriage-return>} 1424*84d9c625SLionel Sambucsearch for the last search RE, in the indicated direction. 1425*84d9c625SLionel Sambuc@sp 1 1426*84d9c625SLionel SambucSearches may be interrupted using the 1427*84d9c625SLionel Sambuc@LI{<interrupt>}character. 1428*84d9c625SLionel Sambuc@sp 1 1429*84d9c625SLionel SambucMultiple search patterns may be grouped together by delimiting 1430*84d9c625SLionel Sambucthem with semicolons and zero or more whitespace characters, e.g. 1431*84d9c625SLionel Sambuc@LI{/foo/ ; ?bar?}searches forward for 1432*84d9c625SLionel Sambuc@LI{foo}and then, from that location, backwards for 1433*84d9c625SLionel Sambuc@LI{bar}. 1434*84d9c625SLionel SambucWhen search patterns are grouped together in this manner, 1435*84d9c625SLionel Sambucthe search patterns are evaluated left to right with the 1436*84d9c625SLionel Sambucfinal cursor position determined by the last search pattern. 1437*84d9c625SLionel Sambuc@sp 1 1438*84d9c625SLionel SambucIt is also permissible to append a 1439*84d9c625SLionel Sambuc@CO{z} 1440*84d9c625SLionel Sambuccommand to the search strings, e.g. 1441*84d9c625SLionel Sambuc@LI{/foo/ z.}searches forward for the next occurrence of 1442*84d9c625SLionel Sambuc@LI{foo}, 1443*84d9c625SLionel Sambucand then positions that line in the middle of screen. 1444*84d9c625SLionel Sambuc@table @asis 1445*84d9c625SLionel Sambuc@item Line: 1446*84d9c625SLionel SambucSet to the line in which the match occurred. 1447*84d9c625SLionel Sambuc@item Column: 1448*84d9c625SLionel SambucSet to the first character of the matched string. 1449*84d9c625SLionel Sambuc@item Options: 1450*84d9c625SLionel SambucAffected by the 1451*84d9c625SLionel Sambuc@OP{edcompatible}, 1452*84d9c625SLionel Sambuc@OP{extended}, 1453*84d9c625SLionel Sambuc@OP{ignorecase}, 1454*84d9c625SLionel Sambuc@OP{magic}, 1455*84d9c625SLionel Sambucand 1456*84d9c625SLionel Sambuc@OP{wrapscan} 1457*84d9c625SLionel Sambucoptions. 1458*84d9c625SLionel Sambuc@end table 1459*84d9c625SLionel Sambuc@end deftypefn 1460*84d9c625SLionel Sambuc@cindex 0 1461*84d9c625SLionel Sambuc@deftypefn Command {} {0} 1462*84d9c625SLionel Sambuc 1463*84d9c625SLionel SambucMove to the first character in the current line. 1464*84d9c625SLionel SambucIt is not an error to use the 1465*84d9c625SLionel Sambuc@CO{0} 1466*84d9c625SLionel Sambuccommand when the cursor is on the first character in the line, 1467*84d9c625SLionel Sambuc@sp 1 1468*84d9c625SLionel SambucThe 1469*84d9c625SLionel Sambuc@CO{0} 1470*84d9c625SLionel Sambuccommand may be used as the motion component of other 1471*84d9c625SLionel Sambuc@CO{vi} 1472*84d9c625SLionel Sambuccommands, 1473*84d9c625SLionel Sambucin which case it is an error if the cursor is on the first character 1474*84d9c625SLionel Sambucin the line, 1475*84d9c625SLionel Sambucand any text copied into a buffer is character oriented. 1476*84d9c625SLionel Sambuc@table @asis 1477*84d9c625SLionel Sambuc@item Line: 1478*84d9c625SLionel SambucUnchanged. 1479*84d9c625SLionel Sambuc@item Column: 1480*84d9c625SLionel SambucSet to the first character in the line. 1481*84d9c625SLionel Sambuc@item Options: 1482*84d9c625SLionel SambucNone. 1483*84d9c625SLionel Sambuc@end table 1484*84d9c625SLionel Sambuc@end deftypefn 1485*84d9c625SLionel Sambuc@cindex : 1486*84d9c625SLionel Sambuc@deftypefn Command {} {:} 1487*84d9c625SLionel Sambuc 1488*84d9c625SLionel SambucExecute an 1489*84d9c625SLionel Sambuc@CO{ex} 1490*84d9c625SLionel Sambuccommand. 1491*84d9c625SLionel Sambuc@CO{Vi} 1492*84d9c625SLionel Sambucprompts for an 1493*84d9c625SLionel Sambuc@CO{ex} 1494*84d9c625SLionel Sambuccommand on the last line of the screen, using a colon 1495*84d9c625SLionel Sambuc@PQ{:} 1496*84d9c625SLionel Sambuccharacter. 1497*84d9c625SLionel SambucThe command is terminated by a 1498*84d9c625SLionel Sambuc@LI{<carriage-return>}, 1499*84d9c625SLionel Sambuc@LI{<newline>}or 1500*84d9c625SLionel Sambuc@LI{<escape>}character; all of these characters may be escaped by using a 1501*84d9c625SLionel Sambuc@LI{<literal-next>}character. 1502*84d9c625SLionel SambucThe command is then executed. 1503*84d9c625SLionel Sambuc@sp 1 1504*84d9c625SLionel SambucIf the 1505*84d9c625SLionel Sambuc@CO{ex} 1506*84d9c625SLionel Sambuccommand writes to the screen, 1507*84d9c625SLionel Sambuc@CO{vi} 1508*84d9c625SLionel Sambucwill prompt the user for a 1509*84d9c625SLionel Sambuc@LI{<carriage-return>}before continuing 1510*84d9c625SLionel Sambucwhen the 1511*84d9c625SLionel Sambuc@CO{ex} 1512*84d9c625SLionel Sambuccommand finishes. 1513*84d9c625SLionel SambucLarge amounts of output from the 1514*84d9c625SLionel Sambuc@CO{ex} 1515*84d9c625SLionel Sambuccommand will be paged for the user, and the user prompted for a 1516*84d9c625SLionel Sambuc@LI{<carriage-return>}or 1517*84d9c625SLionel Sambuc@LI{<space>}key to continue. 1518*84d9c625SLionel SambucIn some cases, a quit (normally a 1519*84d9c625SLionel Sambuc@QQ{q} 1520*84d9c625SLionel Sambuccharacter) or 1521*84d9c625SLionel Sambuc@LI{<interrupt>}may be entered to interrupt the 1522*84d9c625SLionel Sambuc@CO{ex} 1523*84d9c625SLionel Sambuccommand. 1524*84d9c625SLionel Sambuc@sp 1 1525*84d9c625SLionel SambucWhen the 1526*84d9c625SLionel Sambuc@CO{ex} 1527*84d9c625SLionel Sambuccommand finishes, and the user is prompted to resume visual mode, 1528*84d9c625SLionel Sambucit is also possible to enter another 1529*84d9c625SLionel Sambuc@QT{:} 1530*84d9c625SLionel Sambuccharacter followed by another 1531*84d9c625SLionel Sambuc@CO{ex} 1532*84d9c625SLionel Sambuccommand. 1533*84d9c625SLionel Sambuc@table @asis 1534*84d9c625SLionel Sambuc@item Line: 1535*84d9c625SLionel SambucThe current line is set as described for the 1536*84d9c625SLionel Sambuc@CO{ex} 1537*84d9c625SLionel Sambuccommand. 1538*84d9c625SLionel Sambuc@item Column: 1539*84d9c625SLionel SambucThe current column is set as described for the 1540*84d9c625SLionel Sambuc@CO{ex} 1541*84d9c625SLionel Sambuccommand. 1542*84d9c625SLionel Sambuc@item Options: 1543*84d9c625SLionel SambucAffected as described for the 1544*84d9c625SLionel Sambuc@CO{ex} 1545*84d9c625SLionel Sambuccommand. 1546*84d9c625SLionel Sambuc@end table 1547*84d9c625SLionel Sambuc@end deftypefn 1548*84d9c625SLionel Sambuc@cindex ; 1549*84d9c625SLionel Sambuc@deftypefn Command {[count]} {;} 1550*84d9c625SLionel Sambuc 1551*84d9c625SLionel SambucRepeat the last character find 1552*84d9c625SLionel Sambuc@LI{count}times. 1553*84d9c625SLionel SambucThe last character find is one of the 1554*84d9c625SLionel Sambuc@CO{F}, 1555*84d9c625SLionel Sambuc@CO{f}, 1556*84d9c625SLionel Sambuc@CO{T} 1557*84d9c625SLionel Sambucor 1558*84d9c625SLionel Sambuc@CO{t} 1559*84d9c625SLionel Sambuccommands. 1560*84d9c625SLionel SambucIt is an error if a 1561*84d9c625SLionel Sambuc@CO{F}, 1562*84d9c625SLionel Sambuc@CO{f}, 1563*84d9c625SLionel Sambuc@CO{T} 1564*84d9c625SLionel Sambucor 1565*84d9c625SLionel Sambuc@CO{t} 1566*84d9c625SLionel Sambuccommand has not been performed yet. 1567*84d9c625SLionel Sambuc@sp 1 1568*84d9c625SLionel SambucThe 1569*84d9c625SLionel Sambuc@CO{;} 1570*84d9c625SLionel Sambuccommand may be used as the motion component of other 1571*84d9c625SLionel Sambuc@CO{vi} 1572*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1573*84d9c625SLionel Sambuccharacter oriented. 1574*84d9c625SLionel Sambuc@table @asis 1575*84d9c625SLionel Sambuc@item Line: 1576*84d9c625SLionel SambucUnchanged. 1577*84d9c625SLionel Sambuc@item Column: 1578*84d9c625SLionel SambucSet to the searched-for character for the 1579*84d9c625SLionel Sambuc@CO{F} 1580*84d9c625SLionel Sambucand 1581*84d9c625SLionel Sambuc@CO{f} 1582*84d9c625SLionel Sambuccommands, 1583*84d9c625SLionel Sambucbefore the character for the 1584*84d9c625SLionel Sambuc@CO{t} 1585*84d9c625SLionel Sambuccommand 1586*84d9c625SLionel Sambucand after the character for the 1587*84d9c625SLionel Sambuc@CO{T} 1588*84d9c625SLionel Sambuccommand. 1589*84d9c625SLionel Sambuc@item Options: 1590*84d9c625SLionel SambucNone. 1591*84d9c625SLionel Sambuc@end table 1592*84d9c625SLionel Sambuc@end deftypefn 1593*84d9c625SLionel Sambuc@cindex < 1594*84d9c625SLionel Sambuc@deftypefn Command {[count]} {< motion} 1595*84d9c625SLionel Sambuc 1596*84d9c625SLionel Sambuc@cindex > 1597*84d9c625SLionel Sambuc@deftypefnx Command {[count]} {>} {motion} 1598*84d9c625SLionel SambucShift lines left or right. 1599*84d9c625SLionel SambucShift the number of lines in the region specified by the 1600*84d9c625SLionel Sambuc@LI{count}and 1601*84d9c625SLionel Sambuc@LI{motion}left (for the 1602*84d9c625SLionel Sambuc@CO{<} 1603*84d9c625SLionel Sambuccommand) or right (for the 1604*84d9c625SLionel Sambuc@CO{>} 1605*84d9c625SLionel Sambuccommand) by the number of columns specified by the 1606*84d9c625SLionel Sambuc@OP{shiftwidth} 1607*84d9c625SLionel Sambucoption. 1608*84d9c625SLionel SambucOnly whitespace characters are deleted when shifting left. 1609*84d9c625SLionel SambucOnce the first character in the line no longer contains a whitespace 1610*84d9c625SLionel Sambuccharacter, the command will succeed, 1611*84d9c625SLionel Sambucbut the line will not be modified. 1612*84d9c625SLionel Sambuc@table @asis 1613*84d9c625SLionel Sambuc@item Line: 1614*84d9c625SLionel SambucUnchanged. 1615*84d9c625SLionel Sambuc@item Column: 1616*84d9c625SLionel SambucSet to the first nonblank character in the line. 1617*84d9c625SLionel Sambuc@item Options: 1618*84d9c625SLionel SambucAffected by the 1619*84d9c625SLionel Sambuc@OP{shiftwidth} 1620*84d9c625SLionel Sambucoption. 1621*84d9c625SLionel Sambuc@end table 1622*84d9c625SLionel Sambuc@end deftypefn 1623*84d9c625SLionel Sambuc@cindex @@ 1624*84d9c625SLionel Sambuc@deftypefn Command {} {@@} {buffer} 1625*84d9c625SLionel Sambuc 1626*84d9c625SLionel SambucExecute a named buffer. 1627*84d9c625SLionel SambucExecute the named buffer as 1628*84d9c625SLionel Sambuc@CO{vi} 1629*84d9c625SLionel Sambuccommands. 1630*84d9c625SLionel SambucThe buffer may include 1631*84d9c625SLionel Sambuc@CO{ex} 1632*84d9c625SLionel Sambuccommands, too, but they must be expressed as a 1633*84d9c625SLionel Sambuc@CO{:} 1634*84d9c625SLionel Sambuccommand. 1635*84d9c625SLionel SambucIf the buffer is line oriented, 1636*84d9c625SLionel Sambuc@LI{<newline>}characters are logically appended to each line of the buffer. 1637*84d9c625SLionel SambucIf the buffer is character oriented, 1638*84d9c625SLionel Sambuc@LI{<newline>}characters are logically appended to all but the last line in the buffer. 1639*84d9c625SLionel Sambuc@sp 1 1640*84d9c625SLionel SambucIf the buffer name is 1641*84d9c625SLionel Sambuc@QT{@@}, 1642*84d9c625SLionel Sambucor 1643*84d9c625SLionel Sambuc@QT{*}, 1644*84d9c625SLionel Sambucthen the last buffer executed shall be used. 1645*84d9c625SLionel SambucIt is an error to specify 1646*84d9c625SLionel Sambuc@QT{@@@@} 1647*84d9c625SLionel Sambucor 1648*84d9c625SLionel Sambuc@QT{@@*} 1649*84d9c625SLionel Sambucif there were no previous buffer executions. 1650*84d9c625SLionel SambucThe text of a buffer may contain a 1651*84d9c625SLionel Sambuc@CO{@@} 1652*84d9c625SLionel Sambuccommand, 1653*84d9c625SLionel Sambucand it is possible to create infinite loops in this manner. 1654*84d9c625SLionel Sambuc(The 1655*84d9c625SLionel Sambuc@LI{<interrupt>}character may be used to interrupt the loop.) 1656*84d9c625SLionel Sambuc@table @asis 1657*84d9c625SLionel Sambuc@item Line: 1658*84d9c625SLionel SambucThe current line is set as described for the command(s). 1659*84d9c625SLionel Sambuc@item Column: 1660*84d9c625SLionel SambucThe current column is set as described for the command(s). 1661*84d9c625SLionel Sambuc@item Options: 1662*84d9c625SLionel SambucNone. 1663*84d9c625SLionel Sambuc@end table 1664*84d9c625SLionel Sambuc@end deftypefn 1665*84d9c625SLionel Sambuc@cindex A 1666*84d9c625SLionel Sambuc@deftypefn Command {[count]} {A} 1667*84d9c625SLionel Sambuc 1668*84d9c625SLionel SambucEnter input mode, appending the text after the end of the line. 1669*84d9c625SLionel SambucIf 1670*84d9c625SLionel Sambuc@LI{count}is specified, the text is repeatedly input 1671*84d9c625SLionel Sambuc@LI{count - 1}more times after input mode is exited. 1672*84d9c625SLionel Sambuc@table @asis 1673*84d9c625SLionel Sambuc@item Line: 1674*84d9c625SLionel SambucSet to the last line upon which characters were entered. 1675*84d9c625SLionel Sambuc@item Column: 1676*84d9c625SLionel SambucSet to the last character entered. 1677*84d9c625SLionel Sambuc@item Options: 1678*84d9c625SLionel SambucAffected by the 1679*84d9c625SLionel Sambuc@OP{altwerase}, 1680*84d9c625SLionel Sambuc@OP{autoindent}, 1681*84d9c625SLionel Sambuc@OP{beautify}, 1682*84d9c625SLionel Sambuc@OP{showmatch}, 1683*84d9c625SLionel Sambuc@OP{ttywerase} 1684*84d9c625SLionel Sambucand 1685*84d9c625SLionel Sambuc@OP{wrapmargin} 1686*84d9c625SLionel Sambucoptions. 1687*84d9c625SLionel Sambuc@end table 1688*84d9c625SLionel Sambuc@end deftypefn 1689*84d9c625SLionel Sambuc@cindex B 1690*84d9c625SLionel Sambuc@deftypefn Command {[count]} {B} 1691*84d9c625SLionel Sambuc 1692*84d9c625SLionel SambucMove backward 1693*84d9c625SLionel Sambuc@LI{count}bigwords. 1694*84d9c625SLionel SambucMove the cursor backward to the beginning of a bigword by repeating the 1695*84d9c625SLionel Sambucfollowing algorithm: if the current position is at the beginning of a 1696*84d9c625SLionel Sambucbigword or the character at the current position cannot be part of a bigword, 1697*84d9c625SLionel Sambucmove to the first character of the preceding bigword. 1698*84d9c625SLionel SambucOtherwise, move to the first character of the bigword at the current position. 1699*84d9c625SLionel SambucIf no preceding bigword exists on the current line, move to the first 1700*84d9c625SLionel Sambuccharacter of the last bigword on the first preceding line that contains a 1701*84d9c625SLionel Sambucbigword. 1702*84d9c625SLionel Sambuc@sp 1 1703*84d9c625SLionel SambucThe 1704*84d9c625SLionel Sambuc@CO{B} 1705*84d9c625SLionel Sambuccommand may be used as the motion component of other 1706*84d9c625SLionel Sambuc@CO{vi} 1707*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1708*84d9c625SLionel Sambuccharacter oriented. 1709*84d9c625SLionel Sambuc@table @asis 1710*84d9c625SLionel Sambuc@item Line: 1711*84d9c625SLionel SambucSet to the line containing the word selected. 1712*84d9c625SLionel Sambuc@item Column: 1713*84d9c625SLionel SambucSet to the first character of the word selected. 1714*84d9c625SLionel Sambuc@item Options: 1715*84d9c625SLionel SambucNone. 1716*84d9c625SLionel Sambuc@end table 1717*84d9c625SLionel Sambuc@end deftypefn 1718*84d9c625SLionel Sambuc@cindex C 1719*84d9c625SLionel Sambuc@deftypefn Command {[buffer]} {[count] C} 1720*84d9c625SLionel Sambuc 1721*84d9c625SLionel SambucChange text from the current position to the end-of-line. 1722*84d9c625SLionel SambucIf 1723*84d9c625SLionel Sambuc@LI{count}is specified, the input text replaces from the current position to 1724*84d9c625SLionel Sambucthe end-of-line, plus 1725*84d9c625SLionel Sambuc@LI{count - 1}subsequent lines. 1726*84d9c625SLionel Sambuc@table @asis 1727*84d9c625SLionel Sambuc@item Line: 1728*84d9c625SLionel SambucSet to the last line upon which characters were entered. 1729*84d9c625SLionel Sambuc@item Column: 1730*84d9c625SLionel SambucSet to the last character entered. 1731*84d9c625SLionel Sambuc@item Options: 1732*84d9c625SLionel SambucAffected by the 1733*84d9c625SLionel Sambuc@OP{altwerase}, 1734*84d9c625SLionel Sambuc@OP{autoindent}, 1735*84d9c625SLionel Sambuc@OP{beautify}, 1736*84d9c625SLionel Sambuc@OP{showmatch}, 1737*84d9c625SLionel Sambuc@OP{ttywerase} 1738*84d9c625SLionel Sambucand 1739*84d9c625SLionel Sambuc@OP{wrapmargin} 1740*84d9c625SLionel Sambucoptions. 1741*84d9c625SLionel Sambuc@end table 1742*84d9c625SLionel Sambuc@end deftypefn 1743*84d9c625SLionel Sambuc@cindex D 1744*84d9c625SLionel Sambuc@deftypefn Command {[buffer]} {D} 1745*84d9c625SLionel Sambuc 1746*84d9c625SLionel SambucDelete text from the current position to the end-of-line. 1747*84d9c625SLionel Sambuc@sp 1 1748*84d9c625SLionel SambucIt is not an error to execute the 1749*84d9c625SLionel Sambuc@CO{D} 1750*84d9c625SLionel Sambuccommand on an empty line. 1751*84d9c625SLionel Sambuc@table @asis 1752*84d9c625SLionel Sambuc@item Line: 1753*84d9c625SLionel SambucUnchanged. 1754*84d9c625SLionel Sambuc@item Column: 1755*84d9c625SLionel SambucSet to the character before the current character, or, column 1 if 1756*84d9c625SLionel Sambucthe cursor was on column 1. 1757*84d9c625SLionel Sambuc@item Options: 1758*84d9c625SLionel SambucNone. 1759*84d9c625SLionel Sambuc@end table 1760*84d9c625SLionel Sambuc@end deftypefn 1761*84d9c625SLionel Sambuc@cindex E 1762*84d9c625SLionel Sambuc@deftypefn Command {[count]} {E} 1763*84d9c625SLionel Sambuc 1764*84d9c625SLionel SambucMove forward 1765*84d9c625SLionel Sambuc@LI{count}end-of-bigwords. 1766*84d9c625SLionel SambucMove the cursor forward to the end of a bigword by repeating the 1767*84d9c625SLionel Sambucfollowing algorithm: if the current position is the end of a 1768*84d9c625SLionel Sambucbigword or the character at that position cannot be part of a bigword, 1769*84d9c625SLionel Sambucmove to the last character of the following bigword. 1770*84d9c625SLionel SambucOtherwise, move to the last character of the bigword at the current 1771*84d9c625SLionel Sambucposition. 1772*84d9c625SLionel SambucIf no succeeding bigword exists on the current line, 1773*84d9c625SLionel Sambucmove to the last character of the first bigword on the next following 1774*84d9c625SLionel Sambucline that contains a bigword. 1775*84d9c625SLionel Sambuc@sp 1 1776*84d9c625SLionel SambucThe 1777*84d9c625SLionel Sambuc@CO{E} 1778*84d9c625SLionel Sambuccommand may be used as the motion component of other 1779*84d9c625SLionel Sambuc@CO{vi} 1780*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1781*84d9c625SLionel Sambuccharacter oriented. 1782*84d9c625SLionel Sambuc@table @asis 1783*84d9c625SLionel Sambuc@item Line: 1784*84d9c625SLionel SambucSet to the line containing the word selected. 1785*84d9c625SLionel Sambuc@item Column: 1786*84d9c625SLionel SambucSet to the last character of the word selected. 1787*84d9c625SLionel Sambuc@item Options: 1788*84d9c625SLionel SambucNone. 1789*84d9c625SLionel Sambuc@end table 1790*84d9c625SLionel Sambuc@end deftypefn 1791*84d9c625SLionel Sambuc@cindex F 1792*84d9c625SLionel Sambuc@deftypefn Command {[count]} {F} {<character>} 1793*84d9c625SLionel Sambuc 1794*84d9c625SLionel SambucSearch 1795*84d9c625SLionel Sambuc@LI{count}times backward through the current line for 1796*84d9c625SLionel Sambuc@LI{<character>}. 1797*84d9c625SLionel Sambuc@sp 1 1798*84d9c625SLionel SambucThe 1799*84d9c625SLionel Sambuc@CO{F} 1800*84d9c625SLionel Sambuccommand may be used as the motion component of other 1801*84d9c625SLionel Sambuc@CO{vi} 1802*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1803*84d9c625SLionel Sambuccharacter oriented. 1804*84d9c625SLionel Sambuc@table @asis 1805*84d9c625SLionel Sambuc@item Line: 1806*84d9c625SLionel SambucUnchanged. 1807*84d9c625SLionel Sambuc@item Column: 1808*84d9c625SLionel SambucSet to the searched-for character. 1809*84d9c625SLionel Sambuc@item Options: 1810*84d9c625SLionel SambucNone. 1811*84d9c625SLionel Sambuc@end table 1812*84d9c625SLionel Sambuc@end deftypefn 1813*84d9c625SLionel Sambuc@cindex G 1814*84d9c625SLionel Sambuc@deftypefn Command {[count]} {G} 1815*84d9c625SLionel Sambuc 1816*84d9c625SLionel SambucMove to line 1817*84d9c625SLionel Sambuc@LI{count}, 1818*84d9c625SLionel Sambucor the last line of the file if 1819*84d9c625SLionel Sambuc@LI{count}not specified. 1820*84d9c625SLionel Sambuc@sp 1 1821*84d9c625SLionel SambucThe 1822*84d9c625SLionel Sambuc@CO{G} 1823*84d9c625SLionel Sambuccommand is an absolute movement. 1824*84d9c625SLionel SambucThe 1825*84d9c625SLionel Sambuc@CO{G} 1826*84d9c625SLionel Sambuccommand may be used as the motion component of other 1827*84d9c625SLionel Sambuc@CO{vi} 1828*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1829*84d9c625SLionel Sambucline oriented. 1830*84d9c625SLionel Sambuc@table @asis 1831*84d9c625SLionel Sambuc@item Line: 1832*84d9c625SLionel SambucSet to 1833*84d9c625SLionel Sambuc@LI{count}, 1834*84d9c625SLionel Sambucif specified, otherwise, the last line. 1835*84d9c625SLionel Sambuc@item Column: 1836*84d9c625SLionel SambucSet to the first nonblank character in the line. 1837*84d9c625SLionel Sambuc@item Options: 1838*84d9c625SLionel SambucNone. 1839*84d9c625SLionel Sambuc@end table 1840*84d9c625SLionel Sambuc@end deftypefn 1841*84d9c625SLionel Sambuc@cindex H 1842*84d9c625SLionel Sambuc@deftypefn Command {[count]} {H} 1843*84d9c625SLionel Sambuc 1844*84d9c625SLionel SambucMove to the screen line 1845*84d9c625SLionel Sambuc@LI{count - 1}lines below the top of the screen. 1846*84d9c625SLionel Sambuc@sp 1 1847*84d9c625SLionel SambucThe 1848*84d9c625SLionel Sambuc@CO{H} 1849*84d9c625SLionel Sambuccommand is an absolute movement. 1850*84d9c625SLionel SambucThe 1851*84d9c625SLionel Sambuc@CO{H} 1852*84d9c625SLionel Sambuccommand may be used as the motion component of other 1853*84d9c625SLionel Sambuc@CO{vi} 1854*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1855*84d9c625SLionel Sambucline oriented. 1856*84d9c625SLionel Sambuc@table @asis 1857*84d9c625SLionel Sambuc@item Line: 1858*84d9c625SLionel SambucSet to the line 1859*84d9c625SLionel Sambuc@LI{count - 1}lines below the top of the screen. 1860*84d9c625SLionel Sambuc@item Column: 1861*84d9c625SLionel SambucSet to the first nonblank character of the 1862*84d9c625SLionel Sambuc@emph{screen} 1863*84d9c625SLionel Sambucline. 1864*84d9c625SLionel Sambuc@item Options: 1865*84d9c625SLionel SambucNone. 1866*84d9c625SLionel Sambuc@end table 1867*84d9c625SLionel Sambuc@end deftypefn 1868*84d9c625SLionel Sambuc@cindex I 1869*84d9c625SLionel Sambuc@deftypefn Command {[count]} {I} 1870*84d9c625SLionel Sambuc 1871*84d9c625SLionel SambucEnter input mode, inserting the text at the beginning of the line. 1872*84d9c625SLionel SambucIf 1873*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 1874*84d9c625SLionel Sambuc@LI{count - 1}more times. 1875*84d9c625SLionel Sambuc@table @asis 1876*84d9c625SLionel Sambuc@item Line: 1877*84d9c625SLionel SambucSet to the last line upon which characters were entered. 1878*84d9c625SLionel Sambuc@item Column: 1879*84d9c625SLionel SambucSet to the last character entered. 1880*84d9c625SLionel Sambuc@item Options: 1881*84d9c625SLionel SambucNone. 1882*84d9c625SLionel Sambuc@end table 1883*84d9c625SLionel Sambuc@end deftypefn 1884*84d9c625SLionel Sambuc@cindex J 1885*84d9c625SLionel Sambuc@deftypefn Command {[count]} {J} 1886*84d9c625SLionel Sambuc 1887*84d9c625SLionel SambucJoin lines. 1888*84d9c625SLionel SambucIf 1889*84d9c625SLionel Sambuc@LI{count}is specified, 1890*84d9c625SLionel Sambuc@LI{count}lines are joined; a minimum of two lines are always joined, 1891*84d9c625SLionel Sambucregardless of the value of 1892*84d9c625SLionel Sambuc@LI{count}. 1893*84d9c625SLionel Sambuc@sp 1 1894*84d9c625SLionel SambucIf the current line ends with a whitespace character, all whitespace 1895*84d9c625SLionel Sambucis stripped from the next line. 1896*84d9c625SLionel SambucOtherwise, if the next line starts with a open parenthesis 1897*84d9c625SLionel Sambuc@PQ{(} 1898*84d9c625SLionel Sambucdo nothing. 1899*84d9c625SLionel SambucOtherwise, if the current line ends with a question mark 1900*84d9c625SLionel Sambuc@PQ{?}, 1901*84d9c625SLionel Sambucperiod 1902*84d9c625SLionel Sambuc@PQ{.} 1903*84d9c625SLionel Sambucor exclamation point 1904*84d9c625SLionel Sambuc@PQ{!}, 1905*84d9c625SLionel Sambucinsert two spaces. 1906*84d9c625SLionel SambucOtherwise, insert a single space. 1907*84d9c625SLionel Sambuc@sp 1 1908*84d9c625SLionel SambucIt is not an error to join lines past the end of the file, 1909*84d9c625SLionel Sambuci.e. lines that do not exist. 1910*84d9c625SLionel Sambuc@table @asis 1911*84d9c625SLionel Sambuc@item Line: 1912*84d9c625SLionel SambucUnchanged. 1913*84d9c625SLionel Sambuc@item Column: 1914*84d9c625SLionel SambucSet to the character after the last character of the next-to-last 1915*84d9c625SLionel Sambucjoined line. 1916*84d9c625SLionel Sambuc@item Options: 1917*84d9c625SLionel SambucNone. 1918*84d9c625SLionel Sambuc@end table 1919*84d9c625SLionel Sambuc@end deftypefn 1920*84d9c625SLionel Sambuc@cindex L 1921*84d9c625SLionel Sambuc@deftypefn Command {[count]} {L} 1922*84d9c625SLionel Sambuc 1923*84d9c625SLionel SambucMove to the screen line 1924*84d9c625SLionel Sambuc@LI{count - 1}lines above the bottom of the screen. 1925*84d9c625SLionel Sambuc@sp 1 1926*84d9c625SLionel SambucThe 1927*84d9c625SLionel Sambuc@CO{L} 1928*84d9c625SLionel Sambuccommand is an absolute movement. 1929*84d9c625SLionel SambucThe 1930*84d9c625SLionel Sambuc@CO{L} 1931*84d9c625SLionel Sambuccommand may be used as the motion component of other 1932*84d9c625SLionel Sambuc@CO{vi} 1933*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1934*84d9c625SLionel Sambucline oriented. 1935*84d9c625SLionel Sambuc@table @asis 1936*84d9c625SLionel Sambuc@item Line: 1937*84d9c625SLionel SambucSet to the line 1938*84d9c625SLionel Sambuc@LI{count - 1}lines above the bottom of the screen. 1939*84d9c625SLionel Sambuc@item Column: 1940*84d9c625SLionel SambucSet to the first nonblank character of the 1941*84d9c625SLionel Sambuc@emph{screen} 1942*84d9c625SLionel Sambucline. 1943*84d9c625SLionel Sambuc@item Options: 1944*84d9c625SLionel SambucNone. 1945*84d9c625SLionel Sambuc@end table 1946*84d9c625SLionel Sambuc@end deftypefn 1947*84d9c625SLionel Sambuc@cindex M 1948*84d9c625SLionel Sambuc@deftypefn Command {} {M} 1949*84d9c625SLionel Sambuc 1950*84d9c625SLionel SambucMove to the screen line in the middle of the screen. 1951*84d9c625SLionel Sambuc@sp 1 1952*84d9c625SLionel SambucThe 1953*84d9c625SLionel Sambuc@CO{M} 1954*84d9c625SLionel Sambuccommand is an absolute movement. 1955*84d9c625SLionel SambucThe 1956*84d9c625SLionel Sambuc@CO{M} 1957*84d9c625SLionel Sambuccommand may be used as the motion component of other 1958*84d9c625SLionel Sambuc@CO{vi} 1959*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 1960*84d9c625SLionel Sambucline oriented. 1961*84d9c625SLionel Sambuc@sp 1 1962*84d9c625SLionel SambucHistorically, any 1963*84d9c625SLionel Sambuc@LI{count}specified to the 1964*84d9c625SLionel Sambuc@CO{M} 1965*84d9c625SLionel Sambuccommand was ignored. 1966*84d9c625SLionel Sambuc@table @asis 1967*84d9c625SLionel Sambuc@item Line: 1968*84d9c625SLionel SambucSet to the line in the middle of the screen. 1969*84d9c625SLionel Sambuc@item Column: 1970*84d9c625SLionel SambucSet to the first nonblank character of the 1971*84d9c625SLionel Sambuc@emph{screen} 1972*84d9c625SLionel Sambucline. 1973*84d9c625SLionel Sambuc@item Options: 1974*84d9c625SLionel SambucNone. 1975*84d9c625SLionel Sambuc@end table 1976*84d9c625SLionel Sambuc@end deftypefn 1977*84d9c625SLionel Sambuc@cindex O 1978*84d9c625SLionel Sambuc@deftypefn Command {[count]} {O} 1979*84d9c625SLionel Sambuc 1980*84d9c625SLionel SambucEnter input mode, appending text in a new line above the current line. 1981*84d9c625SLionel SambucIf 1982*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 1983*84d9c625SLionel Sambuc@LI{count - 1}more times. 1984*84d9c625SLionel Sambuc@sp 1 1985*84d9c625SLionel SambucHistorically, any 1986*84d9c625SLionel Sambuc@LI{count}specified to the 1987*84d9c625SLionel Sambuc@CO{O} 1988*84d9c625SLionel Sambuccommand was ignored. 1989*84d9c625SLionel Sambuc@table @asis 1990*84d9c625SLionel Sambuc@item Line: 1991*84d9c625SLionel SambucSet to the last line upon which characters were entered. 1992*84d9c625SLionel Sambuc@item Column: 1993*84d9c625SLionel SambucSet to the last character entered. 1994*84d9c625SLionel Sambuc@item Options: 1995*84d9c625SLionel SambucAffected by the 1996*84d9c625SLionel Sambuc@OP{altwerase}, 1997*84d9c625SLionel Sambuc@OP{autoindent}, 1998*84d9c625SLionel Sambuc@OP{beautify}, 1999*84d9c625SLionel Sambuc@OP{showmatch}, 2000*84d9c625SLionel Sambuc@OP{ttywerase} 2001*84d9c625SLionel Sambucand 2002*84d9c625SLionel Sambuc@OP{wrapmargin} 2003*84d9c625SLionel Sambucoptions. 2004*84d9c625SLionel Sambuc@end table 2005*84d9c625SLionel Sambuc@end deftypefn 2006*84d9c625SLionel Sambuc@cindex P 2007*84d9c625SLionel Sambuc@deftypefn Command {[buffer]} {P} 2008*84d9c625SLionel Sambuc 2009*84d9c625SLionel SambucInsert text from a buffer. 2010*84d9c625SLionel SambucText from the buffer (the unnamed buffer by default) is inserted 2011*84d9c625SLionel Sambucbefore the current column or, if the buffer is line oriented, 2012*84d9c625SLionel Sambucbefore the current line. 2013*84d9c625SLionel Sambuc@table @asis 2014*84d9c625SLionel Sambuc@item Line: 2015*84d9c625SLionel SambucSet to the lowest numbered line insert, 2016*84d9c625SLionel Sambucif the buffer is line oriented, otherwise unchanged. 2017*84d9c625SLionel Sambuc@item Column: 2018*84d9c625SLionel SambucSet to the first nonblank character of the appended text, 2019*84d9c625SLionel Sambucif the buffer is line oriented, otherwise, the last character 2020*84d9c625SLionel Sambucof the appended text. 2021*84d9c625SLionel Sambuc@item Options: 2022*84d9c625SLionel SambucNone. 2023*84d9c625SLionel Sambuc@end table 2024*84d9c625SLionel Sambuc@end deftypefn 2025*84d9c625SLionel Sambuc@cindex Q 2026*84d9c625SLionel Sambuc@deftypefn Command {} {Q} 2027*84d9c625SLionel Sambuc 2028*84d9c625SLionel SambucExit 2029*84d9c625SLionel Sambuc@CO{vi} 2030*84d9c625SLionel Sambuc(or visual) mode and switch to 2031*84d9c625SLionel Sambuc@CO{ex} 2032*84d9c625SLionel Sambucmode. 2033*84d9c625SLionel Sambuc@table @asis 2034*84d9c625SLionel Sambuc@item Line: 2035*84d9c625SLionel SambucUnchanged. 2036*84d9c625SLionel Sambuc@item Column: 2037*84d9c625SLionel SambucNo longer relevant. 2038*84d9c625SLionel Sambuc@item Options: 2039*84d9c625SLionel SambucNone. 2040*84d9c625SLionel Sambuc@end table 2041*84d9c625SLionel Sambuc@end deftypefn 2042*84d9c625SLionel Sambuc@cindex R 2043*84d9c625SLionel Sambuc@deftypefn Command {[count]} {R} 2044*84d9c625SLionel Sambuc 2045*84d9c625SLionel SambucEnter input mode, replacing the characters in the current line. 2046*84d9c625SLionel SambucIf 2047*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 2048*84d9c625SLionel Sambuc@LI{count - 1}more times. 2049*84d9c625SLionel Sambuc@sp 1 2050*84d9c625SLionel SambucIf the end of the current line is reached, no more characters are 2051*84d9c625SLionel Sambucreplaced and any further characters input are appended to the line. 2052*84d9c625SLionel Sambuc@table @asis 2053*84d9c625SLionel Sambuc@item Line: 2054*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2055*84d9c625SLionel Sambuc@item Column: 2056*84d9c625SLionel SambucSet to the last character entered. 2057*84d9c625SLionel Sambuc@item Options: 2058*84d9c625SLionel SambucAffected by the 2059*84d9c625SLionel Sambuc@OP{altwerase}, 2060*84d9c625SLionel Sambuc@OP{autoindent}, 2061*84d9c625SLionel Sambuc@OP{beautify}, 2062*84d9c625SLionel Sambuc@OP{showmatch}, 2063*84d9c625SLionel Sambuc@OP{ttywerase} 2064*84d9c625SLionel Sambucand 2065*84d9c625SLionel Sambuc@OP{wrapmargin} 2066*84d9c625SLionel Sambucoptions. 2067*84d9c625SLionel Sambuc@end table 2068*84d9c625SLionel Sambuc@end deftypefn 2069*84d9c625SLionel Sambuc@cindex S 2070*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {S} 2071*84d9c625SLionel Sambuc 2072*84d9c625SLionel SambucSubstitute 2073*84d9c625SLionel Sambuc@LI{count}lines. 2074*84d9c625SLionel Sambuc@table @asis 2075*84d9c625SLionel Sambuc@item Line: 2076*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2077*84d9c625SLionel Sambuc@item Column: 2078*84d9c625SLionel SambucSet to the last character entered. 2079*84d9c625SLionel Sambuc@item Options: 2080*84d9c625SLionel SambucAffected by the 2081*84d9c625SLionel Sambuc@OP{altwerase}, 2082*84d9c625SLionel Sambuc@OP{autoindent}, 2083*84d9c625SLionel Sambuc@OP{beautify}, 2084*84d9c625SLionel Sambuc@OP{showmatch}, 2085*84d9c625SLionel Sambuc@OP{ttywerase} 2086*84d9c625SLionel Sambucand 2087*84d9c625SLionel Sambuc@OP{wrapmargin} 2088*84d9c625SLionel Sambucoptions. 2089*84d9c625SLionel Sambuc@end table 2090*84d9c625SLionel Sambuc@end deftypefn 2091*84d9c625SLionel Sambuc@cindex T 2092*84d9c625SLionel Sambuc@deftypefn Command {[count]} {T} {<character>} 2093*84d9c625SLionel Sambuc 2094*84d9c625SLionel SambucSearch backward, 2095*84d9c625SLionel Sambuc@LI{count}times, 2096*84d9c625SLionel Sambucthrough the current line for the character 2097*84d9c625SLionel Sambuc@emph{after} 2098*84d9c625SLionel Sambucthe specified 2099*84d9c625SLionel Sambuc@LI{<character>}. 2100*84d9c625SLionel Sambuc@sp 1 2101*84d9c625SLionel SambucThe 2102*84d9c625SLionel Sambuc@CO{T} 2103*84d9c625SLionel Sambuccommand may be used as the motion component of other 2104*84d9c625SLionel Sambuc@CO{vi} 2105*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2106*84d9c625SLionel Sambuccharacter oriented. 2107*84d9c625SLionel Sambuc@table @asis 2108*84d9c625SLionel Sambuc@item Line: 2109*84d9c625SLionel SambucUnchanged. 2110*84d9c625SLionel Sambuc@item Column: 2111*84d9c625SLionel SambucSet to the character 2112*84d9c625SLionel Sambuc@emph{after} 2113*84d9c625SLionel Sambucthe searched-for character. 2114*84d9c625SLionel Sambuc@item Options: 2115*84d9c625SLionel SambucNone. 2116*84d9c625SLionel Sambuc@end table 2117*84d9c625SLionel Sambuc@end deftypefn 2118*84d9c625SLionel Sambuc@cindex U 2119*84d9c625SLionel Sambuc@deftypefn Command {} {U} 2120*84d9c625SLionel Sambuc 2121*84d9c625SLionel SambucRestore the current line to its state before the cursor last 2122*84d9c625SLionel Sambucmoved to it. 2123*84d9c625SLionel Sambuc@table @asis 2124*84d9c625SLionel Sambuc@item Line: 2125*84d9c625SLionel SambucUnchanged. 2126*84d9c625SLionel Sambuc@item Column: 2127*84d9c625SLionel SambucThe first character in the line. 2128*84d9c625SLionel Sambuc@item Options: 2129*84d9c625SLionel SambucNone. 2130*84d9c625SLionel Sambuc@end table 2131*84d9c625SLionel Sambuc@end deftypefn 2132*84d9c625SLionel Sambuc@cindex W 2133*84d9c625SLionel Sambuc@deftypefn Command {[count]} {W} 2134*84d9c625SLionel Sambuc 2135*84d9c625SLionel SambucMove forward 2136*84d9c625SLionel Sambuc@LI{count}bigwords. 2137*84d9c625SLionel SambucMove the cursor forward to the beginning of a bigword by repeating the 2138*84d9c625SLionel Sambucfollowing algorithm: if the current position is within a bigword or the 2139*84d9c625SLionel Sambuccharacter at that position cannot be part of a bigword, move to the first 2140*84d9c625SLionel Sambuccharacter of the next bigword. 2141*84d9c625SLionel SambucIf no subsequent bigword exists on the current line, 2142*84d9c625SLionel Sambucmove to the first character of the first bigword on the first following 2143*84d9c625SLionel Sambucline that contains a bigword. 2144*84d9c625SLionel Sambuc@sp 1 2145*84d9c625SLionel SambucThe 2146*84d9c625SLionel Sambuc@CO{W} 2147*84d9c625SLionel Sambuccommand may be used as the motion component of other 2148*84d9c625SLionel Sambuc@CO{vi} 2149*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2150*84d9c625SLionel Sambuccharacter oriented. 2151*84d9c625SLionel Sambuc@table @asis 2152*84d9c625SLionel Sambuc@item Line: 2153*84d9c625SLionel SambucThe line containing the word selected. 2154*84d9c625SLionel Sambuc@item Column: 2155*84d9c625SLionel SambucThe first character of the word selected. 2156*84d9c625SLionel Sambuc@item Options: 2157*84d9c625SLionel SambucNone. 2158*84d9c625SLionel Sambuc@end table 2159*84d9c625SLionel Sambuc@end deftypefn 2160*84d9c625SLionel Sambuc@cindex X 2161*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {X} 2162*84d9c625SLionel Sambuc 2163*84d9c625SLionel SambucDelete 2164*84d9c625SLionel Sambuc@LI{count}characters before the cursor. 2165*84d9c625SLionel SambucIf the number of characters to be deleted is greater than or equal to 2166*84d9c625SLionel Sambucthe number of characters to the beginning of the line, all of the 2167*84d9c625SLionel Sambuccharacters before the current cursor position, to the beginning of the 2168*84d9c625SLionel Sambucline, are deleted. 2169*84d9c625SLionel Sambuc@table @asis 2170*84d9c625SLionel Sambuc@item Line: 2171*84d9c625SLionel SambucUnchanged. 2172*84d9c625SLionel Sambuc@item Column: 2173*84d9c625SLionel SambucSet to the current character minus 2174*84d9c625SLionel Sambuc@LI{count}, 2175*84d9c625SLionel Sambucor the first character if count is greater than the number of 2176*84d9c625SLionel Sambuccharacters in the line before the cursor. 2177*84d9c625SLionel Sambuc@item Options: 2178*84d9c625SLionel SambucNone. 2179*84d9c625SLionel Sambuc@end table 2180*84d9c625SLionel Sambuc@end deftypefn 2181*84d9c625SLionel Sambuc@cindex Y 2182*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {Y} 2183*84d9c625SLionel Sambuc 2184*84d9c625SLionel SambucCopy (or 2185*84d9c625SLionel Sambuc@QQ{yank}) 2186*84d9c625SLionel Sambuc@LI{count}lines into the specified buffer. 2187*84d9c625SLionel Sambuc@table @asis 2188*84d9c625SLionel Sambuc@item Line: 2189*84d9c625SLionel SambucUnchanged. 2190*84d9c625SLionel Sambuc@item Column: 2191*84d9c625SLionel SambucUnchanged. 2192*84d9c625SLionel Sambuc@item Options: 2193*84d9c625SLionel SambucNone. 2194*84d9c625SLionel Sambuc@end table 2195*84d9c625SLionel Sambuc@end deftypefn 2196*84d9c625SLionel Sambuc@cindex ZZ 2197*84d9c625SLionel Sambuc@deftypefn Command {} {ZZ} 2198*84d9c625SLionel Sambuc 2199*84d9c625SLionel SambucWrite the file and exit 2200*84d9c625SLionel Sambuc@CO{vi}. 2201*84d9c625SLionel SambucThe file is only written if it has been modified since the last 2202*84d9c625SLionel Sambuccomplete write of the file to any file. 2203*84d9c625SLionel Sambuc@sp 1 2204*84d9c625SLionel SambucThe 2205*84d9c625SLionel Sambuc@CO{ZZ} 2206*84d9c625SLionel Sambuccommand will exit the editor after writing the file, 2207*84d9c625SLionel Sambucif there are no further files to edit. 2208*84d9c625SLionel SambucEntering two 2209*84d9c625SLionel Sambuc@QQ{quit} 2210*84d9c625SLionel Sambuccommands (i.e. 2211*84d9c625SLionel Sambuc@CO{wq}, 2212*84d9c625SLionel Sambuc@CO{quit}, 2213*84d9c625SLionel Sambuc@CO{xit} 2214*84d9c625SLionel Sambucor 2215*84d9c625SLionel Sambuc@CO{ZZ}) 2216*84d9c625SLionel Sambucin a row will override this check and the editor will exit, 2217*84d9c625SLionel Sambucignoring any files that have not yet been edited. 2218*84d9c625SLionel Sambuc@table @asis 2219*84d9c625SLionel Sambuc@item Line: 2220*84d9c625SLionel SambucUnchanged. 2221*84d9c625SLionel Sambuc@item Column: 2222*84d9c625SLionel SambucUnchanged. 2223*84d9c625SLionel Sambuc@item Options: 2224*84d9c625SLionel SambucNone. 2225*84d9c625SLionel Sambuc@end table 2226*84d9c625SLionel Sambuc@end deftypefn 2227*84d9c625SLionel Sambuc@cindex [[ 2228*84d9c625SLionel Sambuc@deftypefn Command {[count]} {[[} 2229*84d9c625SLionel Sambuc 2230*84d9c625SLionel SambucBack up 2231*84d9c625SLionel Sambuc@LI{count}section boundaries. 2232*84d9c625SLionel Sambuc@sp 1 2233*84d9c625SLionel SambucThe 2234*84d9c625SLionel Sambuc@CO{[[} 2235*84d9c625SLionel Sambuccommand is an absolute movement. 2236*84d9c625SLionel SambucThe 2237*84d9c625SLionel Sambuc@CO{[[} 2238*84d9c625SLionel Sambuccommand may be used as the motion component of other 2239*84d9c625SLionel Sambuc@CO{vi} 2240*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2241*84d9c625SLionel Sambuccharacter oriented, unless the starting position is column 0, 2242*84d9c625SLionel Sambucin which case it is line oriented. 2243*84d9c625SLionel Sambuc@sp 1 2244*84d9c625SLionel SambucIt is an error if the movement is past the beginning of the file. 2245*84d9c625SLionel Sambuc@table @asis 2246*84d9c625SLionel Sambuc@item Line: 2247*84d9c625SLionel SambucSet to the previous line that is 2248*84d9c625SLionel Sambuc@LI{count}section boundaries back, 2249*84d9c625SLionel Sambucor the first line of the file if no more section boundaries exist 2250*84d9c625SLionel Sambucpreceding the current line. 2251*84d9c625SLionel Sambuc@item Column: 2252*84d9c625SLionel SambucSet to the first nonblank character in the line. 2253*84d9c625SLionel Sambuc@item Options: 2254*84d9c625SLionel SambucAffected by the 2255*84d9c625SLionel Sambuc@OP{sections} 2256*84d9c625SLionel Sambucoption. 2257*84d9c625SLionel Sambuc@end table 2258*84d9c625SLionel Sambuc@end deftypefn 2259*84d9c625SLionel Sambuc@cindex ]] 2260*84d9c625SLionel Sambuc@deftypefn Command {[count]} {]]} 2261*84d9c625SLionel Sambuc 2262*84d9c625SLionel SambucMove forward 2263*84d9c625SLionel Sambuc@LI{count}section boundaries. 2264*84d9c625SLionel Sambuc@sp 1 2265*84d9c625SLionel SambucThe 2266*84d9c625SLionel Sambuc@CO{]]} 2267*84d9c625SLionel Sambuccommand is an absolute movement. 2268*84d9c625SLionel SambucThe 2269*84d9c625SLionel Sambuc@CO{]]} 2270*84d9c625SLionel Sambuccommand may be used as the motion component of other 2271*84d9c625SLionel Sambuc@CO{vi} 2272*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2273*84d9c625SLionel Sambuccharacter oriented, unless the starting position is column 0, 2274*84d9c625SLionel Sambucin which case it is line oriented. 2275*84d9c625SLionel Sambuc@sp 1 2276*84d9c625SLionel SambucIt is an error if the movement is past the end of the file. 2277*84d9c625SLionel Sambuc@table @asis 2278*84d9c625SLionel Sambuc@item Line: 2279*84d9c625SLionel SambucSet to the line that is 2280*84d9c625SLionel Sambuc@LI{count}section boundaries forward, 2281*84d9c625SLionel Sambucor to the last line of the file if no more section 2282*84d9c625SLionel Sambucboundaries exist following the current line. 2283*84d9c625SLionel Sambuc@item Column: 2284*84d9c625SLionel SambucSet to the first nonblank character in the line. 2285*84d9c625SLionel Sambuc@item Options: 2286*84d9c625SLionel SambucAffected by the 2287*84d9c625SLionel Sambuc@OP{sections} 2288*84d9c625SLionel Sambucoption. 2289*84d9c625SLionel Sambuc@end table 2290*84d9c625SLionel Sambuc@end deftypefn 2291*84d9c625SLionel Sambuc@cindex ^ 2292*84d9c625SLionel Sambuc@deftypefn Command {} {^} 2293*84d9c625SLionel Sambuc 2294*84d9c625SLionel SambucMove to first nonblank character on the current line. 2295*84d9c625SLionel Sambuc@sp 1 2296*84d9c625SLionel SambucThe 2297*84d9c625SLionel Sambuc@CO{^} 2298*84d9c625SLionel Sambuccommand may be used as the motion component of other 2299*84d9c625SLionel Sambuc@CO{vi} 2300*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2301*84d9c625SLionel Sambuccharacter oriented. 2302*84d9c625SLionel Sambuc@table @asis 2303*84d9c625SLionel Sambuc@item Line: 2304*84d9c625SLionel SambucUnchanged. 2305*84d9c625SLionel Sambuc@item Column: 2306*84d9c625SLionel SambucSet to the first nonblank character of the current line. 2307*84d9c625SLionel Sambuc@item Options: 2308*84d9c625SLionel SambucNone. 2309*84d9c625SLionel Sambuc@end table 2310*84d9c625SLionel Sambuc@end deftypefn 2311*84d9c625SLionel Sambuc@cindex _ 2312*84d9c625SLionel Sambuc@deftypefn Command {[count]} {_} 2313*84d9c625SLionel Sambuc 2314*84d9c625SLionel SambucMove down 2315*84d9c625SLionel Sambuc@LI{count - 1}lines, to the first nonblank character. 2316*84d9c625SLionel SambucThe 2317*84d9c625SLionel Sambuc@CO{_} 2318*84d9c625SLionel Sambuccommand may be used as the motion component of other 2319*84d9c625SLionel Sambuc@CO{vi} 2320*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2321*84d9c625SLionel Sambucline oriented. 2322*84d9c625SLionel Sambuc@sp 1 2323*84d9c625SLionel SambucIt is not an error to execute the 2324*84d9c625SLionel Sambuc@CO{_} 2325*84d9c625SLionel Sambuccommand when the cursor is on the first character in the line. 2326*84d9c625SLionel Sambuc@table @asis 2327*84d9c625SLionel Sambuc@item Line: 2328*84d9c625SLionel SambucThe current line plus 2329*84d9c625SLionel Sambuc@LI{count - 1}. 2330*84d9c625SLionel Sambuc@item Column: 2331*84d9c625SLionel SambucThe first nonblank character in the line. 2332*84d9c625SLionel Sambuc@item Options: 2333*84d9c625SLionel SambucNone. 2334*84d9c625SLionel Sambuc@end table 2335*84d9c625SLionel Sambuc@end deftypefn 2336*84d9c625SLionel Sambuc@cindex a 2337*84d9c625SLionel Sambuc@deftypefn Command {[count]} {a} 2338*84d9c625SLionel Sambuc 2339*84d9c625SLionel SambucEnter input mode, appending the text after the cursor. 2340*84d9c625SLionel SambucIf 2341*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 2342*84d9c625SLionel Sambuc@LI{count - 1}more times. 2343*84d9c625SLionel Sambuc@table @asis 2344*84d9c625SLionel Sambuc@item Line: 2345*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2346*84d9c625SLionel Sambuc@item Column: 2347*84d9c625SLionel SambucSet to the last character entered. 2348*84d9c625SLionel Sambuc@item Options: 2349*84d9c625SLionel SambucAffected by the 2350*84d9c625SLionel Sambuc@OP{altwerase}, 2351*84d9c625SLionel Sambuc@OP{autoindent}, 2352*84d9c625SLionel Sambuc@OP{beautify}, 2353*84d9c625SLionel Sambuc@OP{showmatch}, 2354*84d9c625SLionel Sambuc@OP{ttywerase} 2355*84d9c625SLionel Sambucand 2356*84d9c625SLionel Sambuc@OP{wrapmargin} 2357*84d9c625SLionel Sambucoptions. 2358*84d9c625SLionel Sambuc@end table 2359*84d9c625SLionel Sambuc@end deftypefn 2360*84d9c625SLionel Sambuc@cindex b 2361*84d9c625SLionel Sambuc@deftypefn Command {[count]} {b} 2362*84d9c625SLionel Sambuc 2363*84d9c625SLionel SambucMove backward 2364*84d9c625SLionel Sambuc@LI{count}words. 2365*84d9c625SLionel SambucMove the cursor backward to the beginning of a word by repeating the 2366*84d9c625SLionel Sambucfollowing algorithm: if the current position is at the beginning of a word, 2367*84d9c625SLionel Sambucmove to the first character of the preceding word. 2368*84d9c625SLionel SambucOtherwise, the current position moves to the first character of the word 2369*84d9c625SLionel Sambucat the current position. 2370*84d9c625SLionel SambucIf no preceding word exists on the current line, move to the first 2371*84d9c625SLionel Sambuccharacter of the last word on the first preceding line that contains 2372*84d9c625SLionel Sambuca word. 2373*84d9c625SLionel Sambuc@sp 1 2374*84d9c625SLionel SambucThe 2375*84d9c625SLionel Sambuc@CO{b} 2376*84d9c625SLionel Sambuccommand may be used as the motion component of other 2377*84d9c625SLionel Sambuc@CO{vi} 2378*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2379*84d9c625SLionel Sambuccharacter oriented. 2380*84d9c625SLionel Sambuc@table @asis 2381*84d9c625SLionel Sambuc@item Line: 2382*84d9c625SLionel SambucSet to the line containing the word selected. 2383*84d9c625SLionel Sambuc@item Column: 2384*84d9c625SLionel SambucSet to the first character of the word selected. 2385*84d9c625SLionel Sambuc@item Options: 2386*84d9c625SLionel SambucNone. 2387*84d9c625SLionel Sambuc@end table 2388*84d9c625SLionel Sambuc@end deftypefn 2389*84d9c625SLionel Sambuc@cindex c 2390*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {c} {motion} 2391*84d9c625SLionel Sambuc 2392*84d9c625SLionel SambucChange the region of text specified by the 2393*84d9c625SLionel Sambuc@LI{count}and 2394*84d9c625SLionel Sambuc@LI{motion}. 2395*84d9c625SLionel SambucIf only part of a single line is affected, then the last character 2396*84d9c625SLionel Sambucbeing changed is marked with a 2397*84d9c625SLionel Sambuc@QT{$}. 2398*84d9c625SLionel SambucOtherwise, the region of text is deleted, and input mode is entered. 2399*84d9c625SLionel Sambuc@table @asis 2400*84d9c625SLionel Sambuc@item Line: 2401*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2402*84d9c625SLionel Sambuc@item Column: 2403*84d9c625SLionel SambucSet to the last character entered. 2404*84d9c625SLionel Sambuc@item Options: 2405*84d9c625SLionel SambucAffected by the 2406*84d9c625SLionel Sambuc@OP{altwerase}, 2407*84d9c625SLionel Sambuc@OP{autoindent}, 2408*84d9c625SLionel Sambuc@OP{beautify}, 2409*84d9c625SLionel Sambuc@OP{showmatch}, 2410*84d9c625SLionel Sambuc@OP{ttywerase} 2411*84d9c625SLionel Sambucand 2412*84d9c625SLionel Sambuc@OP{wrapmargin} 2413*84d9c625SLionel Sambucoptions. 2414*84d9c625SLionel Sambuc@end table 2415*84d9c625SLionel Sambuc@end deftypefn 2416*84d9c625SLionel Sambuc@cindex d 2417*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {d} {motion} 2418*84d9c625SLionel Sambuc 2419*84d9c625SLionel SambucDelete the region of text specified by the 2420*84d9c625SLionel Sambuc@LI{count}and 2421*84d9c625SLionel Sambuc@LI{motion}. 2422*84d9c625SLionel Sambuc@table @asis 2423*84d9c625SLionel Sambuc@item Line: 2424*84d9c625SLionel SambucSet to the line where the region starts. 2425*84d9c625SLionel Sambuc@item Column: 2426*84d9c625SLionel SambucSet to the first character in the line after the last character in the 2427*84d9c625SLionel Sambucregion. 2428*84d9c625SLionel SambucIf no such character exists, set to the last character before the region. 2429*84d9c625SLionel Sambuc@item Options: 2430*84d9c625SLionel SambucNone. 2431*84d9c625SLionel Sambuc@end table 2432*84d9c625SLionel Sambuc@end deftypefn 2433*84d9c625SLionel Sambuc@cindex e 2434*84d9c625SLionel Sambuc@deftypefn Command {[count]} {e} 2435*84d9c625SLionel Sambuc 2436*84d9c625SLionel SambucMove forward 2437*84d9c625SLionel Sambuc@LI{count}end-of-words. 2438*84d9c625SLionel SambucMove the cursor forward to the end of a word by repeating the following 2439*84d9c625SLionel Sambucalgorithm: if the current position is the end of a word, 2440*84d9c625SLionel Sambucmove to the last character of the following word. 2441*84d9c625SLionel SambucOtherwise, move to the last character of the word at the current position. 2442*84d9c625SLionel SambucIf no succeeding word exists on the current line, move to the last character 2443*84d9c625SLionel Sambucof the first word on the next following line that contains a word. 2444*84d9c625SLionel Sambuc@sp 1 2445*84d9c625SLionel SambucThe 2446*84d9c625SLionel Sambuc@CO{e} 2447*84d9c625SLionel Sambuccommand may be used as the motion component of other 2448*84d9c625SLionel Sambuc@CO{vi} 2449*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2450*84d9c625SLionel Sambuccharacter oriented. 2451*84d9c625SLionel Sambuc@table @asis 2452*84d9c625SLionel Sambuc@item Line: 2453*84d9c625SLionel SambucSet to the line containing the word selected. 2454*84d9c625SLionel Sambuc@item Column: 2455*84d9c625SLionel SambucSet to the last character of the word selected. 2456*84d9c625SLionel Sambuc@item Options: 2457*84d9c625SLionel SambucNone. 2458*84d9c625SLionel Sambuc@end table 2459*84d9c625SLionel Sambuc@end deftypefn 2460*84d9c625SLionel Sambuc@cindex f 2461*84d9c625SLionel Sambuc@deftypefn Command {[count]} {f} {<character>} 2462*84d9c625SLionel Sambuc 2463*84d9c625SLionel SambucSearch forward, 2464*84d9c625SLionel Sambuc@LI{count}times, through the rest of the current line for 2465*84d9c625SLionel Sambuc@LI{<character>}. 2466*84d9c625SLionel Sambuc@sp 1 2467*84d9c625SLionel SambucThe 2468*84d9c625SLionel Sambuc@CO{f} 2469*84d9c625SLionel Sambuccommand may be used as the motion component of other 2470*84d9c625SLionel Sambuc@CO{vi} 2471*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2472*84d9c625SLionel Sambuccharacter oriented. 2473*84d9c625SLionel Sambuc@table @asis 2474*84d9c625SLionel Sambuc@item Line: 2475*84d9c625SLionel SambucUnchanged. 2476*84d9c625SLionel Sambuc@item Column: 2477*84d9c625SLionel SambucSet to the searched-for character. 2478*84d9c625SLionel Sambuc@item Options: 2479*84d9c625SLionel SambucNone. 2480*84d9c625SLionel Sambuc@end table 2481*84d9c625SLionel Sambuc@end deftypefn 2482*84d9c625SLionel Sambuc@cindex i 2483*84d9c625SLionel Sambuc@deftypefn Command {[count]} {i} 2484*84d9c625SLionel Sambuc 2485*84d9c625SLionel SambucEnter input mode, inserting the text before the cursor. 2486*84d9c625SLionel SambucIf 2487*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 2488*84d9c625SLionel Sambuc@LI{count - 1}more times. 2489*84d9c625SLionel Sambuc@table @asis 2490*84d9c625SLionel Sambuc@item Line: 2491*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2492*84d9c625SLionel Sambuc@item Column: 2493*84d9c625SLionel SambucSet to the last character entered. 2494*84d9c625SLionel Sambuc@item Options: 2495*84d9c625SLionel SambucAffected by the 2496*84d9c625SLionel Sambuc@OP{altwerase}, 2497*84d9c625SLionel Sambuc@OP{autoindent}, 2498*84d9c625SLionel Sambuc@OP{beautify}, 2499*84d9c625SLionel Sambuc@OP{showmatch}, 2500*84d9c625SLionel Sambuc@OP{ttywerase} 2501*84d9c625SLionel Sambucand 2502*84d9c625SLionel Sambuc@OP{wrapmargin} 2503*84d9c625SLionel Sambucoptions. 2504*84d9c625SLionel Sambuc@end table 2505*84d9c625SLionel Sambuc@end deftypefn 2506*84d9c625SLionel Sambuc@cindex m 2507*84d9c625SLionel Sambuc@deftypefn Command {} {m} {<character>} 2508*84d9c625SLionel Sambuc 2509*84d9c625SLionel SambucSave the current context (line and column) as 2510*84d9c625SLionel Sambuc@LI{<character>}. 2511*84d9c625SLionel SambucThe exact position is referred to by 2512*84d9c625SLionel Sambuc@QT{`<character>}. 2513*84d9c625SLionel SambucThe line is referred to by 2514*84d9c625SLionel Sambuc@QT{'<character>}. 2515*84d9c625SLionel Sambuc@sp 1 2516*84d9c625SLionel SambucHistorically, 2517*84d9c625SLionel Sambuc@LI{<character>}was restricted to lower-case letters. 2518*84d9c625SLionel Sambuc@CO{Nvi} 2519*84d9c625SLionel Sambucpermits the use of any character. 2520*84d9c625SLionel Sambuc@table @asis 2521*84d9c625SLionel Sambuc@item Line: 2522*84d9c625SLionel SambucUnchanged. 2523*84d9c625SLionel Sambuc@item Column: 2524*84d9c625SLionel SambucUnchanged. 2525*84d9c625SLionel Sambuc@item Options: 2526*84d9c625SLionel SambucNone. 2527*84d9c625SLionel Sambuc@end table 2528*84d9c625SLionel Sambuc@end deftypefn 2529*84d9c625SLionel Sambuc@cindex o 2530*84d9c625SLionel Sambuc@deftypefn Command {[count]} {o} 2531*84d9c625SLionel Sambuc 2532*84d9c625SLionel SambucEnter input mode, appending text in a new line under the current line. 2533*84d9c625SLionel SambucIf 2534*84d9c625SLionel Sambuc@LI{count}is specified, the text input is repeatedly input 2535*84d9c625SLionel Sambuc@LI{count - 1}more times. 2536*84d9c625SLionel Sambuc@sp 1 2537*84d9c625SLionel SambucHistorically, any 2538*84d9c625SLionel Sambuc@LI{count}specified to the 2539*84d9c625SLionel Sambuc@CO{o} 2540*84d9c625SLionel Sambuccommand was ignored. 2541*84d9c625SLionel Sambuc@table @asis 2542*84d9c625SLionel Sambuc@item Line: 2543*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2544*84d9c625SLionel Sambuc@item Column: 2545*84d9c625SLionel SambucSet to the last character entered. 2546*84d9c625SLionel Sambuc@item Options: 2547*84d9c625SLionel SambucAffected by the 2548*84d9c625SLionel Sambuc@OP{altwerase}, 2549*84d9c625SLionel Sambuc@OP{autoindent}, 2550*84d9c625SLionel Sambuc@OP{beautify}, 2551*84d9c625SLionel Sambuc@OP{showmatch}, 2552*84d9c625SLionel Sambuc@OP{ttywerase} 2553*84d9c625SLionel Sambucand 2554*84d9c625SLionel Sambuc@OP{wrapmargin} 2555*84d9c625SLionel Sambucoptions. 2556*84d9c625SLionel Sambuc@end table 2557*84d9c625SLionel Sambuc@end deftypefn 2558*84d9c625SLionel Sambuc@cindex p 2559*84d9c625SLionel Sambuc@deftypefn Command {[buffer]} {p} 2560*84d9c625SLionel Sambuc 2561*84d9c625SLionel SambucAppend text from a buffer. 2562*84d9c625SLionel SambucText from the buffer (the unnamed buffer by default) is appended 2563*84d9c625SLionel Sambucafter the current column or, if the buffer is line oriented, 2564*84d9c625SLionel Sambucafter the current line. 2565*84d9c625SLionel Sambuc@table @asis 2566*84d9c625SLionel Sambuc@item Line: 2567*84d9c625SLionel SambucSet to the first line appended, if the buffer is line oriented, 2568*84d9c625SLionel Sambucotherwise unchanged. 2569*84d9c625SLionel Sambuc@item Column: 2570*84d9c625SLionel SambucSet to the first nonblank character of the appended text if the buffer 2571*84d9c625SLionel Sambucis line oriented, otherwise, the last character of the appended text. 2572*84d9c625SLionel Sambuc@item Options: 2573*84d9c625SLionel SambucNone. 2574*84d9c625SLionel Sambuc@end table 2575*84d9c625SLionel Sambuc@end deftypefn 2576*84d9c625SLionel Sambuc@cindex r 2577*84d9c625SLionel Sambuc@deftypefn Command {[count]} {r} {<character>} 2578*84d9c625SLionel Sambuc 2579*84d9c625SLionel SambucReplace characters. 2580*84d9c625SLionel SambucThe next 2581*84d9c625SLionel Sambuc@LI{count}characters in the line are replaced with 2582*84d9c625SLionel Sambuc@LI{<character>}. 2583*84d9c625SLionel SambucReplacing characters with 2584*84d9c625SLionel Sambuc@LI{<newline>}characters results in creating new, empty lines into the file. 2585*84d9c625SLionel Sambuc@sp 1 2586*84d9c625SLionel SambucIf 2587*84d9c625SLionel Sambuc@LI{<character>}is 2588*84d9c625SLionel Sambuc@LI{<escape>}, 2589*84d9c625SLionel Sambucthe command is cancelled. 2590*84d9c625SLionel Sambuc@table @asis 2591*84d9c625SLionel Sambuc@item Line: 2592*84d9c625SLionel SambucUnchanged unless the replacement character is a 2593*84d9c625SLionel Sambuc@LI{<newline>}, 2594*84d9c625SLionel Sambucin which case it is set to the current line plus 2595*84d9c625SLionel Sambuc@LI{count - 1}. 2596*84d9c625SLionel Sambuc@item Column: 2597*84d9c625SLionel SambucSet to the last character replaced, 2598*84d9c625SLionel Sambucunless the replacement character is a 2599*84d9c625SLionel Sambuc@LI{<newline>}, 2600*84d9c625SLionel Sambucin which case the cursor is in column 1 of the last line inserted. 2601*84d9c625SLionel Sambuc@item Options: 2602*84d9c625SLionel SambucNone. 2603*84d9c625SLionel Sambuc@end table 2604*84d9c625SLionel Sambuc@end deftypefn 2605*84d9c625SLionel Sambuc@cindex s 2606*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {s} 2607*84d9c625SLionel Sambuc 2608*84d9c625SLionel SambucSubstitute 2609*84d9c625SLionel Sambuc@LI{count}characters in the current line starting with the current character. 2610*84d9c625SLionel Sambuc@table @asis 2611*84d9c625SLionel Sambuc@item Line: 2612*84d9c625SLionel SambucSet to the last line upon which characters were entered. 2613*84d9c625SLionel Sambuc@item Column: 2614*84d9c625SLionel SambucSet to the last character entered. 2615*84d9c625SLionel Sambuc@item Options: 2616*84d9c625SLionel SambucAffected by the 2617*84d9c625SLionel Sambuc@OP{altwerase}, 2618*84d9c625SLionel Sambuc@OP{autoindent}, 2619*84d9c625SLionel Sambuc@OP{beautify}, 2620*84d9c625SLionel Sambuc@OP{showmatch}, 2621*84d9c625SLionel Sambuc@OP{ttywerase} 2622*84d9c625SLionel Sambucand 2623*84d9c625SLionel Sambuc@OP{wrapmargin} 2624*84d9c625SLionel Sambucoptions. 2625*84d9c625SLionel Sambuc@end table 2626*84d9c625SLionel Sambuc@end deftypefn 2627*84d9c625SLionel Sambuc@cindex t 2628*84d9c625SLionel Sambuc@deftypefn Command {[count]} {t} {<character>} 2629*84d9c625SLionel Sambuc 2630*84d9c625SLionel SambucSearch forward, 2631*84d9c625SLionel Sambuc@LI{count}times, through the current line for the character immediately 2632*84d9c625SLionel Sambuc@emph{before} 2633*84d9c625SLionel Sambuc@LI{<character>}. 2634*84d9c625SLionel Sambuc@sp 1 2635*84d9c625SLionel SambucThe 2636*84d9c625SLionel Sambuc@CO{t} 2637*84d9c625SLionel Sambuccommand may be used as the motion component of other 2638*84d9c625SLionel Sambuc@CO{vi} 2639*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2640*84d9c625SLionel Sambuccharacter oriented. 2641*84d9c625SLionel Sambuc@table @asis 2642*84d9c625SLionel Sambuc@item Line: 2643*84d9c625SLionel SambucUnchanged. 2644*84d9c625SLionel Sambuc@item Column: 2645*84d9c625SLionel SambucSet to the character 2646*84d9c625SLionel Sambuc@emph{before} 2647*84d9c625SLionel Sambucthe searched-for character. 2648*84d9c625SLionel Sambuc@item Options: 2649*84d9c625SLionel SambucNone. 2650*84d9c625SLionel Sambuc@end table 2651*84d9c625SLionel Sambuc@end deftypefn 2652*84d9c625SLionel Sambuc@cindex u 2653*84d9c625SLionel Sambuc@deftypefn Command {} {u} 2654*84d9c625SLionel Sambuc 2655*84d9c625SLionel SambucUndo the last change made to the file. 2656*84d9c625SLionel SambucIf repeated, the 2657*84d9c625SLionel Sambuc@CO{u} 2658*84d9c625SLionel Sambuccommand alternates between these two states, and is its own inverse. 2659*84d9c625SLionel SambucWhen used after an insert that inserted text on more than one line, 2660*84d9c625SLionel Sambucthe lines are saved in the numeric buffers. 2661*84d9c625SLionel Sambuc@sp 1 2662*84d9c625SLionel SambucThe 2663*84d9c625SLionel Sambuc@CO{.} 2664*84d9c625SLionel Sambuccommand, when used immediately after the 2665*84d9c625SLionel Sambuc@CO{u} 2666*84d9c625SLionel Sambuccommand, causes the change log to be rolled forward or backward, 2667*84d9c625SLionel Sambucdepending on the action of the 2668*84d9c625SLionel Sambuc@CO{u} 2669*84d9c625SLionel Sambuccommand. 2670*84d9c625SLionel Sambuc@table @asis 2671*84d9c625SLionel Sambuc@item Line: 2672*84d9c625SLionel SambucSet to the position of the first line changed, if the reversal affects 2673*84d9c625SLionel Sambuconly one line or represents an addition or change; otherwise, the line 2674*84d9c625SLionel Sambucpreceding the deleted text. 2675*84d9c625SLionel Sambuc@item Column: 2676*84d9c625SLionel SambucSet to the cursor position before the change was made. 2677*84d9c625SLionel Sambuc@item Options: 2678*84d9c625SLionel SambucNone. 2679*84d9c625SLionel Sambuc@end table 2680*84d9c625SLionel Sambuc@end deftypefn 2681*84d9c625SLionel Sambuc@cindex w 2682*84d9c625SLionel Sambuc@deftypefn Command {[count]} {w} 2683*84d9c625SLionel Sambuc 2684*84d9c625SLionel SambucMove forward 2685*84d9c625SLionel Sambuc@LI{count}words. 2686*84d9c625SLionel SambucMove the cursor forward to the beginning of a word by repeating the 2687*84d9c625SLionel Sambucfollowing algorithm: if the current position is at the 2688*84d9c625SLionel Sambucbeginning of a word, move to the first character of the next word. 2689*84d9c625SLionel SambucIf no subsequent word exists on the current line, move to the first 2690*84d9c625SLionel Sambuccharacter of the first word on the first following line that contains 2691*84d9c625SLionel Sambuca word. 2692*84d9c625SLionel Sambuc@sp 1 2693*84d9c625SLionel SambucThe 2694*84d9c625SLionel Sambuc@CO{w} 2695*84d9c625SLionel Sambuccommand may be used as the motion component of other 2696*84d9c625SLionel Sambuc@CO{vi} 2697*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2698*84d9c625SLionel Sambuccharacter oriented. 2699*84d9c625SLionel Sambuc@table @asis 2700*84d9c625SLionel Sambuc@item Line: 2701*84d9c625SLionel SambucSet to the line containing the word selected. 2702*84d9c625SLionel Sambuc@item Column: 2703*84d9c625SLionel SambucSet to the first character of the word selected. 2704*84d9c625SLionel Sambuc@item Options: 2705*84d9c625SLionel SambucNone. 2706*84d9c625SLionel Sambuc@end table 2707*84d9c625SLionel Sambuc@end deftypefn 2708*84d9c625SLionel Sambuc@cindex x 2709*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} {x} 2710*84d9c625SLionel Sambuc 2711*84d9c625SLionel SambucDelete 2712*84d9c625SLionel Sambuc@LI{count}characters. 2713*84d9c625SLionel SambucThe deletion is at the current character position. 2714*84d9c625SLionel SambucIf the number of characters to be deleted is greater than or equal to 2715*84d9c625SLionel Sambucthe number of characters to the end of the line, all of the characters 2716*84d9c625SLionel Sambucfrom the current cursor position to the end of the line are deleted. 2717*84d9c625SLionel Sambuc@table @asis 2718*84d9c625SLionel Sambuc@item Line: 2719*84d9c625SLionel SambucUnchanged. 2720*84d9c625SLionel Sambuc@item Column: 2721*84d9c625SLionel SambucUnchanged unless the last character in the line is deleted and the cursor 2722*84d9c625SLionel Sambucis not already on the first character in the line, in which case it is 2723*84d9c625SLionel Sambucset to the previous character. 2724*84d9c625SLionel Sambuc@item Options: 2725*84d9c625SLionel SambucNone. 2726*84d9c625SLionel Sambuc@end table 2727*84d9c625SLionel Sambuc@end deftypefn 2728*84d9c625SLionel Sambuc@cindex y 2729*84d9c625SLionel Sambuc@deftypefn Command {[buffer] [count]} y {motion} 2730*84d9c625SLionel Sambuc 2731*84d9c625SLionel SambucCopy (or 2732*84d9c625SLionel Sambuc@QQ{yank}) 2733*84d9c625SLionel Sambucthe text region specified by the 2734*84d9c625SLionel Sambuc@LI{count}and 2735*84d9c625SLionel Sambuc@LI{motion}, 2736*84d9c625SLionel Sambucinto a buffer. 2737*84d9c625SLionel Sambuc@table @asis 2738*84d9c625SLionel Sambuc@item Line: 2739*84d9c625SLionel SambucUnchanged, unless the region covers more than a single line, 2740*84d9c625SLionel Sambucin which case it is set to the line where the region starts. 2741*84d9c625SLionel Sambuc@item Column: 2742*84d9c625SLionel SambucUnchanged, unless the region covers more than a single line, 2743*84d9c625SLionel Sambucin which case it is set to the character were the region starts. 2744*84d9c625SLionel Sambuc@item Options: 2745*84d9c625SLionel SambucNone. 2746*84d9c625SLionel Sambuc@end table 2747*84d9c625SLionel Sambuc@end deftypefn 2748*84d9c625SLionel Sambuc@cindex z 2749*84d9c625SLionel Sambuc@deftypefn Command {[count1]} {z} {[count2] type} 2750*84d9c625SLionel Sambuc 2751*84d9c625SLionel SambucRedraw the screen with a window 2752*84d9c625SLionel Sambuc@LI{count2}lines long, with line 2753*84d9c625SLionel Sambuc@LI{count1}placed as specified by the 2754*84d9c625SLionel Sambuc@LI{type}character. 2755*84d9c625SLionel SambucIf 2756*84d9c625SLionel Sambuc@LI{count1}is not specified, it defaults to the current line. 2757*84d9c625SLionel SambucIf 2758*84d9c625SLionel Sambuc@LI{count2}is not specified, it defaults to the current window size. 2759*84d9c625SLionel Sambuc@sp 1 2760*84d9c625SLionel SambucThe following 2761*84d9c625SLionel Sambuc@LI{type}characters may be used: 2762*84d9c625SLionel Sambuc@table @asis 2763*84d9c625SLionel Sambuc@item + 2764*84d9c625SLionel SambucIf 2765*84d9c625SLionel Sambuc@LI{count1}is specified, place the line 2766*84d9c625SLionel Sambuc@LI{count1}at the top of the screen. 2767*84d9c625SLionel SambucOtherwise, display the screen after the current screen, similarly to the 2768*84d9c625SLionel Sambuc@CO{<control-F>} 2769*84d9c625SLionel Sambuccommand. 2770*84d9c625SLionel Sambuc@item <carriage-return> 2771*84d9c625SLionel SambucPlace the line 2772*84d9c625SLionel Sambuc@LI{count1}at the top of the screen. 2773*84d9c625SLionel Sambuc@item . 2774*84d9c625SLionel SambucPlace the line 2775*84d9c625SLionel Sambuc@LI{count1}in the center of the screen. 2776*84d9c625SLionel Sambuc@item - 2777*84d9c625SLionel SambucPlace the line 2778*84d9c625SLionel Sambuc@LI{count1}at the bottom of the screen. 2779*84d9c625SLionel Sambuc@item ^ 2780*84d9c625SLionel SambucIf 2781*84d9c625SLionel Sambuc@LI{count1}is specified, place the line that is at the top of the screen 2782*84d9c625SLionel Sambucwhen 2783*84d9c625SLionel Sambuc@LI{count1}is at the bottom of the screen, at the bottom of the screen, 2784*84d9c625SLionel Sambuci.e. display the screen before the screen before 2785*84d9c625SLionel Sambuc@LI{count1}. 2786*84d9c625SLionel SambucOtherwise, display the screen before the current screen, similarly to the 2787*84d9c625SLionel Sambuc@CO{<control-B>} 2788*84d9c625SLionel Sambuccommand. 2789*84d9c625SLionel Sambuc@end table 2790*84d9c625SLionel Sambuc@table @asis 2791*84d9c625SLionel Sambuc@item Line: 2792*84d9c625SLionel SambucSet to 2793*84d9c625SLionel Sambuc@LI{count1}unless 2794*84d9c625SLionel Sambuc@LI{count1}is not specified and the 2795*84d9c625SLionel Sambuc@LI{type}character was either 2796*84d9c625SLionel Sambuc@QT{^} 2797*84d9c625SLionel Sambucor 2798*84d9c625SLionel Sambuc@QT{+}, 2799*84d9c625SLionel Sambucin which case it is set to the line before the first line on the 2800*84d9c625SLionel Sambucprevious screen or the line after the last line on the previous 2801*84d9c625SLionel Sambucscreen, respectively. 2802*84d9c625SLionel Sambuc@item Column: 2803*84d9c625SLionel SambucSet to the first nonblank character in the line. 2804*84d9c625SLionel Sambuc@item Options: 2805*84d9c625SLionel SambucNone. 2806*84d9c625SLionel Sambuc@end table 2807*84d9c625SLionel Sambuc@end deftypefn 2808*84d9c625SLionel Sambuc@cindex @{ 2809*84d9c625SLionel Sambuc@deftypefn Command {[count]} @{ 2810*84d9c625SLionel Sambuc 2811*84d9c625SLionel SambucMove backward 2812*84d9c625SLionel Sambuc@LI{count}paragraphs. 2813*84d9c625SLionel Sambuc@sp 1 2814*84d9c625SLionel SambucThe 2815*84d9c625SLionel Sambuc@strong{@{} 2816*84d9c625SLionel Sambuccommand is an absolute movement. 2817*84d9c625SLionel SambucThe 2818*84d9c625SLionel Sambuc@strong{@{} 2819*84d9c625SLionel Sambuccommand may be used as the motion component of other 2820*84d9c625SLionel Sambuc@CO{vi} 2821*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2822*84d9c625SLionel Sambuccharacter oriented, unless the starting character is the first 2823*84d9c625SLionel Sambuccharacter on its line, in which case it is line oriented. 2824*84d9c625SLionel Sambuc@table @asis 2825*84d9c625SLionel Sambuc@item Line: 2826*84d9c625SLionel SambucSet to the line containing the beginning of the previous paragraph. 2827*84d9c625SLionel Sambuc@item Column: 2828*84d9c625SLionel SambucSet to the first nonblank character in the line. 2829*84d9c625SLionel Sambuc@item Options: 2830*84d9c625SLionel SambucAffected by the 2831*84d9c625SLionel Sambuc@OP{paragraph} 2832*84d9c625SLionel Sambucoption. 2833*84d9c625SLionel Sambuc@end table 2834*84d9c625SLionel Sambuc@end deftypefn 2835*84d9c625SLionel Sambuc@cindex | 2836*84d9c625SLionel Sambuc@deftypefn Command {[count]} {|} 2837*84d9c625SLionel Sambuc 2838*84d9c625SLionel SambucMove to a specific 2839*84d9c625SLionel Sambuc@emph{column} 2840*84d9c625SLionel Sambucposition on the current line. 2841*84d9c625SLionel Sambuc@sp 1 2842*84d9c625SLionel SambucThe 2843*84d9c625SLionel Sambuc@CO{|} 2844*84d9c625SLionel Sambuccommand may be used as the motion component of other 2845*84d9c625SLionel Sambuc@CO{vi} 2846*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2847*84d9c625SLionel Sambuccharacter oriented. 2848*84d9c625SLionel SambucIt is an error to use the 2849*84d9c625SLionel Sambuc@CO{|} 2850*84d9c625SLionel Sambuccommand as a motion component and for the cursor not to move. 2851*84d9c625SLionel Sambuc@table @asis 2852*84d9c625SLionel Sambuc@item Line: 2853*84d9c625SLionel SambucUnchanged. 2854*84d9c625SLionel Sambuc@item Column: 2855*84d9c625SLionel SambucSet to the character occupying the column position identified by 2856*84d9c625SLionel Sambuc@LI{count}, 2857*84d9c625SLionel Sambucif the position exists in the line. 2858*84d9c625SLionel SambucIf the column length of the current line is less than 2859*84d9c625SLionel Sambuc@LI{count}, 2860*84d9c625SLionel Sambucthe cursor is moved to the last character in the line. 2861*84d9c625SLionel Sambuc@item Options: 2862*84d9c625SLionel SambucNone. 2863*84d9c625SLionel Sambuc@end table 2864*84d9c625SLionel Sambuc@end deftypefn 2865*84d9c625SLionel Sambuc@cindex @} 2866*84d9c625SLionel Sambuc@deftypefn Command {[count]} @} 2867*84d9c625SLionel Sambuc 2868*84d9c625SLionel SambucMove forward 2869*84d9c625SLionel Sambuc@LI{count}paragraphs. 2870*84d9c625SLionel Sambuc@sp 1 2871*84d9c625SLionel SambucThe 2872*84d9c625SLionel Sambuc@strong{@}} 2873*84d9c625SLionel Sambuccommand is an absolute movement. 2874*84d9c625SLionel SambucThe 2875*84d9c625SLionel Sambuc@strong{@}} 2876*84d9c625SLionel Sambuccommand may be used as the motion component of other 2877*84d9c625SLionel Sambuc@CO{vi} 2878*84d9c625SLionel Sambuccommands, in which case any text copied into a buffer is 2879*84d9c625SLionel Sambuccharacter oriented, unless the starting character is at or 2880*84d9c625SLionel Sambucbefore any nonblank characters in its line, 2881*84d9c625SLionel Sambucin which case it is line oriented. 2882*84d9c625SLionel Sambuc@table @asis 2883*84d9c625SLionel Sambuc@item Line: 2884*84d9c625SLionel SambucSet to the line containing the beginning of the next paragraph. 2885*84d9c625SLionel Sambuc@item Column: 2886*84d9c625SLionel SambucSet to the first nonblank character in the line. 2887*84d9c625SLionel Sambuc@item Options: 2888*84d9c625SLionel SambucAffected by the 2889*84d9c625SLionel Sambuc@OP{paragraph} 2890*84d9c625SLionel Sambucoption. 2891*84d9c625SLionel Sambuc@end table 2892*84d9c625SLionel Sambuc@end deftypefn 2893*84d9c625SLionel Sambuc@cindex ~ 2894*84d9c625SLionel Sambuc@deftypefn Command {[count]} {~} 2895*84d9c625SLionel Sambuc 2896*84d9c625SLionel SambucReverse the case of the next 2897*84d9c625SLionel Sambuc@LI{count}character(s). 2898*84d9c625SLionel SambucThis is the historic semantic for the 2899*84d9c625SLionel Sambuc@CO{~} 2900*84d9c625SLionel Sambuccommand and it is only in effect if the 2901*84d9c625SLionel Sambuc@OP{tildeop} 2902*84d9c625SLionel Sambucoption is not set. 2903*84d9c625SLionel Sambuc@sp 1 2904*84d9c625SLionel SambucLowercase alphabetic characters are changed to uppercase, 2905*84d9c625SLionel Sambucand uppercase characters are changed to lowercase. 2906*84d9c625SLionel SambucNo other characters are affected. 2907*84d9c625SLionel Sambuc@sp 1 2908*84d9c625SLionel SambucHistorically, the 2909*84d9c625SLionel Sambuc@CO{~} 2910*84d9c625SLionel Sambuccommand did not take an associated count, nor did it move past the 2911*84d9c625SLionel Sambucend of the current line. 2912*84d9c625SLionel SambucAs it had no associated motion it was difficult to change the case 2913*84d9c625SLionel Sambucof large blocks of text. 2914*84d9c625SLionel SambucIn 2915*84d9c625SLionel Sambuc@CO{nvi}, 2916*84d9c625SLionel Sambucif the cursor is on the last character of a line, and there are 2917*84d9c625SLionel Sambucmore lines in the file, the cursor moves to the next line. 2918*84d9c625SLionel Sambuc@sp 1 2919*84d9c625SLionel SambucIt is not an error to specify a count larger than the number of 2920*84d9c625SLionel Sambuccharacters between the cursor and the end of the file. 2921*84d9c625SLionel Sambuc@table @asis 2922*84d9c625SLionel Sambuc@item Line: 2923*84d9c625SLionel SambucSet to the line of the character after 2924*84d9c625SLionel Sambuc@LI{count}characters, or, end of file. 2925*84d9c625SLionel Sambuc@item Column: 2926*84d9c625SLionel SambucSet to the character after 2927*84d9c625SLionel Sambuc@LI{count}characters, or, end-of-file. 2928*84d9c625SLionel Sambuc@item Options: 2929*84d9c625SLionel SambucAffected by the 2930*84d9c625SLionel Sambuc@OP{tildeop} 2931*84d9c625SLionel Sambucoption. 2932*84d9c625SLionel Sambuc@end table 2933*84d9c625SLionel Sambuc@end deftypefn 2934*84d9c625SLionel Sambuc@cindex ~ 2935*84d9c625SLionel Sambuc@deftypefn Command {[count]} {~} {motion} 2936*84d9c625SLionel Sambuc 2937*84d9c625SLionel SambucReverse the case of the characters in a text region specified by the 2938*84d9c625SLionel Sambuc@LI{count}and 2939*84d9c625SLionel Sambuc@LI{motion}. 2940*84d9c625SLionel SambucOnly in effect if the 2941*84d9c625SLionel Sambuc@OP{tildeop} 2942*84d9c625SLionel Sambucoption is set. 2943*84d9c625SLionel Sambuc@sp 1 2944*84d9c625SLionel SambucLowercase characters are changed to uppercase, 2945*84d9c625SLionel Sambucand uppercase characters are changed to lowercase. 2946*84d9c625SLionel SambucNo other characters are affected. 2947*84d9c625SLionel Sambuc@table @asis 2948*84d9c625SLionel Sambuc@item Line: 2949*84d9c625SLionel SambucSet to the line of the character after the last character in the region. 2950*84d9c625SLionel Sambuc@item Column: 2951*84d9c625SLionel SambucSet to the character after the last character in the region. 2952*84d9c625SLionel Sambuc@item Options: 2953*84d9c625SLionel SambucAffected by the 2954*84d9c625SLionel Sambuc@OP{tildeop} 2955*84d9c625SLionel Sambucoption. 2956*84d9c625SLionel Sambuc@end table 2957*84d9c625SLionel Sambuc@end deftypefn 2958*84d9c625SLionel Sambuc@cindex <interrupt> 2959*84d9c625SLionel Sambuc@deftypefn Command {} {<interrupt>} 2960*84d9c625SLionel Sambuc 2961*84d9c625SLionel SambucInterrupt the current operation. 2962*84d9c625SLionel SambucMany of the potentially long-running 2963*84d9c625SLionel Sambuc@CO{vi} 2964*84d9c625SLionel Sambuccommands may be interrupted using the terminal interrupt character. 2965*84d9c625SLionel SambucThese operations include searches, file reading and writing, filter 2966*84d9c625SLionel Sambucoperations and map character expansion. 2967*84d9c625SLionel SambucInterrupts are also enabled when running commands outside of 2968*84d9c625SLionel Sambuc@CO{vi}. 2969*84d9c625SLionel Sambuc@sp 1 2970*84d9c625SLionel SambucIf the 2971*84d9c625SLionel Sambuc@LI{<interrupt>}character is used to interrupt while entering an 2972*84d9c625SLionel Sambuc@CO{ex} 2973*84d9c625SLionel Sambuccommand, the command is aborted, the cursor returns to its previous 2974*84d9c625SLionel Sambucposition, and 2975*84d9c625SLionel Sambuc@CO{vi} 2976*84d9c625SLionel Sambucremains in command mode. 2977*84d9c625SLionel Sambuc@sp 1 2978*84d9c625SLionel SambucGenerally, if the 2979*84d9c625SLionel Sambuc@LI{<interrupt>}character is used to interrupt any 2980*84d9c625SLionel Sambucoperation, any changes made before the interrupt are left in place. 2981*84d9c625SLionel Sambuc@table @asis 2982*84d9c625SLionel Sambuc@item Line: 2983*84d9c625SLionel SambucDependent on the operation being interrupted. 2984*84d9c625SLionel Sambuc@item Column: 2985*84d9c625SLionel SambucDependent on the operation being interrupted. 2986*84d9c625SLionel Sambuc@item Options: 2987*84d9c625SLionel SambucNone. 2988*84d9c625SLionel Sambuc@end table 2989*84d9c625SLionel Sambuc@end deftypefn 2990*84d9c625SLionel Sambuc@chapter Vi Text Input Commands 2991*84d9c625SLionel Sambuc 2992*84d9c625SLionel SambucThe following section describes the commands available in the text 2993*84d9c625SLionel Sambucinput mode of the 2994*84d9c625SLionel Sambuc@CO{vi} 2995*84d9c625SLionel Sambuceditor. 2996*84d9c625SLionel Sambuc 2997*84d9c625SLionel SambucHistorically, 2998*84d9c625SLionel Sambuc@CO{vi} 2999*84d9c625SLionel Sambucimplementations only permitted the characters inserted on the current 3000*84d9c625SLionel Sambucline to be erased. 3001*84d9c625SLionel SambucIn addition, only the 3002*84d9c625SLionel Sambuc@LI{<control-D>}erase character and the 3003*84d9c625SLionel Sambuc@QT{0<control-D>} 3004*84d9c625SLionel Sambucand 3005*84d9c625SLionel Sambuc@QT{^<control-D>} 3006*84d9c625SLionel Sambucerase strings could erase autoindent characters. 3007*84d9c625SLionel Sambuc(Autoindent characters include both the characters inserted automatically 3008*84d9c625SLionel Sambucat the beginning of an input line as well as characters inserted using the 3009*84d9c625SLionel Sambuc@LI{<control-T>}command.) 3010*84d9c625SLionel SambucThis implementation permits erasure to continue past the beginning 3011*84d9c625SLionel Sambucof the current line, and back to where text input mode was entered. 3012*84d9c625SLionel SambucIn addition, autoindent characters may be erased using the standard 3013*84d9c625SLionel Sambucerase characters. 3014*84d9c625SLionel SambucFor the line and word erase characters, reaching the autoindent 3015*84d9c625SLionel Sambuccharacters forms a 3016*84d9c625SLionel Sambuc@QQ{soft} 3017*84d9c625SLionel Sambucboundary, denoting the end of the current word or line erase. 3018*84d9c625SLionel SambucRepeating the word or line erase key will erase the autoindent characters. 3019*84d9c625SLionel Sambuc 3020*84d9c625SLionel SambucHistorically, 3021*84d9c625SLionel Sambuc@CO{vi} 3022*84d9c625SLionel Sambucalways used 3023*84d9c625SLionel Sambuc@LI{<control-H>}and 3024*84d9c625SLionel Sambuc@LI{<control-W>}as character and word erase characters, respectively, regardless of 3025*84d9c625SLionel Sambucthe current terminal settings. 3026*84d9c625SLionel SambucThis implementation accepts, in addition to these two characters, 3027*84d9c625SLionel Sambucthe current terminal characters for those operations. 3028*84d9c625SLionel Sambuc@cindex <nul> 3029*84d9c625SLionel Sambuc@deftypefn Input {} {<nul>} 3030*84d9c625SLionel Sambuc 3031*84d9c625SLionel SambucIf the first character of the input is a 3032*84d9c625SLionel Sambuc@LI{<nul>}, 3033*84d9c625SLionel Sambucthe previous input is replayed, as if just entered. 3034*84d9c625SLionel Sambuc@end deftypefn 3035*84d9c625SLionel Sambuc@cindex <control-D> 3036*84d9c625SLionel Sambuc@deftypefn Input {} {<control-D>} 3037*84d9c625SLionel Sambuc 3038*84d9c625SLionel SambucIf the previous character on the line was an autoindent character, 3039*84d9c625SLionel Sambucerase characters to move the cursor back to the column immediately 3040*84d9c625SLionel Sambucafter the previous (1-based) column which is a multiple of the 3041*84d9c625SLionel Sambuc@OP{shiftwidth} 3042*84d9c625SLionel Sambucedit option. 3043*84d9c625SLionel SambucThis may result in any number of 3044*84d9c625SLionel Sambuc@LI{<tab>}and 3045*84d9c625SLionel Sambuc@LI{<space>}characters preceding the cursor being changed. 3046*84d9c625SLionel Sambuc@sp 1 3047*84d9c625SLionel SambucOtherwise, if the 3048*84d9c625SLionel Sambuc@OP{autoindent} 3049*84d9c625SLionel Sambucoption is set and the user is entering the first character in the line, 3050*84d9c625SLionel Sambuc@LI{<control-D>}is ignored. 3051*84d9c625SLionel SambucOtherwise, a literal 3052*84d9c625SLionel Sambuc@LI{<control-D>}character is entered. 3053*84d9c625SLionel Sambuc@end deftypefn 3054*84d9c625SLionel Sambuc@cindex ^<control-D> 3055*84d9c625SLionel Sambuc@deftypefn Input {} {^<control-D>} 3056*84d9c625SLionel Sambuc 3057*84d9c625SLionel SambucIf the previous character on the line was an autoindent character, 3058*84d9c625SLionel Sambucerase all of the autoindent characters on the line. 3059*84d9c625SLionel SambucIn addition, the autoindent level is reset to 0. 3060*84d9c625SLionel Sambuc@end deftypefn 3061*84d9c625SLionel Sambuc@cindex 0<control-D> 3062*84d9c625SLionel Sambuc@deftypefn Input {} {0<control-D>} 3063*84d9c625SLionel Sambuc 3064*84d9c625SLionel SambucIf the previous character on the line was an autoindent character, 3065*84d9c625SLionel Sambucerase all of the autoindent characters on the line. 3066*84d9c625SLionel SambucThe autoindent level is not altered. 3067*84d9c625SLionel Sambuc@end deftypefn 3068*84d9c625SLionel Sambuc@cindex <control-T> 3069*84d9c625SLionel Sambuc@deftypefn Input {} {<control-T>} 3070*84d9c625SLionel Sambuc 3071*84d9c625SLionel SambucInsert sufficient 3072*84d9c625SLionel Sambuc@LI{<tab>}and 3073*84d9c625SLionel Sambuc@LI{<space>}characters to move the cursor forward to the column immediately 3074*84d9c625SLionel Sambucafter the next (1-based) column which is a multiple of the 3075*84d9c625SLionel Sambuc@OP{shiftwidth} 3076*84d9c625SLionel Sambucedit option. 3077*84d9c625SLionel SambucThis may result in any number of 3078*84d9c625SLionel Sambuc@LI{<tab>}and 3079*84d9c625SLionel Sambuc@LI{<space>}characters preceding the cursor being changed. 3080*84d9c625SLionel Sambuc@sp 1 3081*84d9c625SLionel SambucHistorically, 3082*84d9c625SLionel Sambuc@CO{vi} 3083*84d9c625SLionel Sambucdid not permit the 3084*84d9c625SLionel Sambuc@LI{<control-T>}command to be used unless the cursor was at the first column of a new 3085*84d9c625SLionel Sambucline or it was preceded only by autoindent characters. 3086*84d9c625SLionel Sambuc@CO{Nvi} 3087*84d9c625SLionel Sambucpermits it to be used at any time during insert mode. 3088*84d9c625SLionel Sambuc@end deftypefn 3089*84d9c625SLionel Sambuc@cindex <erase> 3090*84d9c625SLionel Sambuc@deftypefn Input {} {<erase>} 3091*84d9c625SLionel Sambuc 3092*84d9c625SLionel Sambuc@cindex <control-H> 3093*84d9c625SLionel Sambuc@deftypefnx Input {} {<control-H>} 3094*84d9c625SLionel SambucErase the last character. 3095*84d9c625SLionel Sambuc@end deftypefn 3096*84d9c625SLionel Sambuc@cindex "<literal-next>" 3097*84d9c625SLionel Sambuc@deftypefn Input {} {<literal-next>} 3098*84d9c625SLionel Sambuc 3099*84d9c625SLionel SambucQuote the next character. 3100*84d9c625SLionel SambucThe next character will not be mapped (see the 3101*84d9c625SLionel Sambuc@CO{map} 3102*84d9c625SLionel Sambuccommand for more information) 3103*84d9c625SLionel Sambucor interpreted specially. 3104*84d9c625SLionel SambucA carat 3105*84d9c625SLionel Sambuc@PQ{^} 3106*84d9c625SLionel Sambuccharacter will be displayed immediately as a placeholder, 3107*84d9c625SLionel Sambucbut will be replaced by the next character. 3108*84d9c625SLionel Sambuc@end deftypefn 3109*84d9c625SLionel Sambuc@cindex <escape> 3110*84d9c625SLionel Sambuc@deftypefn Input {} {<escape>} 3111*84d9c625SLionel Sambuc 3112*84d9c625SLionel SambucIf on the colon command line, and the 3113*84d9c625SLionel Sambuc@OP{filec} 3114*84d9c625SLionel Sambucedit option is set, behave as described for that option. 3115*84d9c625SLionel SambucOtherwise, if on the colon command line, 3116*84d9c625SLionel Sambucexecute the command. 3117*84d9c625SLionel SambucOtherwise, if not on the colon command line, 3118*84d9c625SLionel Sambucresolve all text input into the file, and return to command mode. 3119*84d9c625SLionel Sambuc@end deftypefn 3120*84d9c625SLionel Sambuc@cindex "<line erase>" 3121*84d9c625SLionel Sambuc@deftypefn Input {} {<line erase>} 3122*84d9c625SLionel Sambuc 3123*84d9c625SLionel SambucErase the current line. 3124*84d9c625SLionel Sambuc@end deftypefn 3125*84d9c625SLionel Sambuc@cindex "<control-W>" 3126*84d9c625SLionel Sambuc@deftypefn Input {} {<control-W>} 3127*84d9c625SLionel Sambuc 3128*84d9c625SLionel Sambuc@cindex "<word erase>" 3129*84d9c625SLionel Sambuc@deftypefnx Input {} {<word erase>} 3130*84d9c625SLionel SambucErase the last word. 3131*84d9c625SLionel SambucThe definition of word is dependent on the 3132*84d9c625SLionel Sambuc@OP{altwerase} 3133*84d9c625SLionel Sambucand 3134*84d9c625SLionel Sambuc@OP{ttywerase} 3135*84d9c625SLionel Sambucoptions. 3136*84d9c625SLionel Sambuc@end deftypefn 3137*84d9c625SLionel Sambuc@cindex "<control-X>" 3138*84d9c625SLionel Sambuc@deftypefn Input {} {<control-X>[0-9A-Fa-f]+} 3139*84d9c625SLionel Sambuc 3140*84d9c625SLionel SambucInsert a character with the specified hexadecimal value into the text. 3141*84d9c625SLionel SambucThe value is delimited by any non-hexadecimal character or the input 3142*84d9c625SLionel Sambucof the maximum number of characters that can be translated into a single 3143*84d9c625SLionel Sambuccharacter value. 3144*84d9c625SLionel Sambuc@end deftypefn 3145*84d9c625SLionel Sambuc@cindex <interrupt> 3146*84d9c625SLionel Sambuc@deftypefn Input {} {<interrupt>} 3147*84d9c625SLionel Sambuc 3148*84d9c625SLionel SambucInterrupt text input mode, returning to command mode. 3149*84d9c625SLionel SambucIf the 3150*84d9c625SLionel Sambuc@LI{<interrupt>}character is used to interrupt inserting text into the file, 3151*84d9c625SLionel Sambucit is as if the 3152*84d9c625SLionel Sambuc@LI{<escape>}character was used; all text input up to the interruption is 3153*84d9c625SLionel Sambucresolved into the file. 3154*84d9c625SLionel Sambuc@end deftypefn 3155