Annotation of 43BSDReno/share/doc/usd/15.vi/vi.chars, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted
                      5: .\" provided that the above copyright notice and this paragraph are
                      6: .\" duplicated in all such forms and that any documentation,
                      7: .\" advertising materials, and other materials related to such
                      8: .\" distribution and use acknowledge that the software was developed
                      9: .\" by the University of California, Berkeley.  The name of the
                     10: .\" University may not be used to endorse or promote products derived
                     11: .\" from this software without specific prior written permission.
                     12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     14: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     15: .\"
                     16: .\"    @(#)vi.chars    6.2 (Berkeley) 11/27/89
                     17: .\"
                     18: .bd S 3
                     19: ..pn 21
                     20: .de iP
                     21: .IP "\fB\\$1\fR" \\$2
                     22: ..
                     23: .SH
                     24: Appendix: character functions
                     25: .PP
                     26: This appendix gives the uses the editor makes of each character.  The
                     27: characters are presented in their order in the \s-2ASCII\s0 character
                     28: set:  Control characters come first, then most special characters, then
                     29: the digits, upper and then lower case characters.
                     30: .PP
                     31: For each character we tell a meaning it has as a command and any meaning it
                     32: has during an insert.
                     33: If it has only meaning as a command, then only this is discussed.
                     34: Section numbers in parentheses indicate where the character is discussed;
                     35: a `f' after the section number means that the character is mentioned
                     36: in a footnote.
                     37: .iP "^@" 15
                     38: Not a command character.
                     39: If typed as the first character of an insertion it is replaced with the
                     40: last text inserted, and the insert terminates.  Only 128 characters are
                     41: saved from the last insert; if more characters were inserted the mechanism
                     42: is not available.
                     43: A \fB^@\fR cannot be part of the file due to the editor implementation
                     44: (7.5f).
                     45: .iP "^A" 15
                     46: Unused.
                     47: .iP "^B" 15
                     48: Backward window.
                     49: A count specifies repetition.
                     50: Two lines of continuity are kept if possible (2.1, 6.1, 7.2).
                     51: .iP "^C" 15
                     52: Unused.
                     53: .iP "^D" 15
                     54: As a command, scrolls down a half-window of text.  
                     55: A count gives the number of (logical) lines to scroll, and is remembered
                     56: for future \fB^D\fR and \fB^U\fR commands (2.1, 7.2).
                     57: During an insert, backtabs over \fIautoindent\fR white space at the beginning
                     58: of a line (6.6, 7.5); this white space cannot be backspaced over.
                     59: .iP "^E" 15
                     60: Exposes one more line below the current screen in the file, leaving
                     61: the cursor where it is if possible.
                     62: (Version 3 only.)
                     63: .iP "^F" 15
                     64: Forward window.  A count specifies repetition.
                     65: Two lines of continuity are kept if possible (2.1, 6.1, 7.2).
                     66: .iP "^G" 15
                     67: Equivalent to \fB:f\fR\s-2CR\s0, printing the current file, whether
                     68: it has been modified, the current line number and the number of lines
                     69: in the file, and the percentage of the way through the file that you
                     70: are.
                     71: .iP "^H (\fR\s-2BS\s0\fP)" 15
                     72: Same as
                     73: .B "left arrow" .
                     74: (See
                     75: .B h ).
                     76: During an insert, eliminates the last input character, backing over it
                     77: but not erasing it; it remains so you can see what you typed if you
                     78: wish to type something only slightly different (3.1, 7.5).
                     79: .iP "^I\ (\fR\s-2TAB\s0\fP)" 15
                     80: Not a command character.
                     81: When inserted it prints as some
                     82: number of spaces.
                     83: When the cursor is at a tab character it rests at the last of the spaces
                     84: which represent the tab.
                     85: The spacing of tabstops is controlled by the \fItabstop\fR option (4.1, 6.6).
                     86: .iP "^J\ (\fR\s-2LF\s0\fP)" 15
                     87: Same as
                     88: .B "down arrow"
                     89: (see
                     90: .B j ).
                     91: .iP "^K" 15
                     92: Unused.
                     93: .iP "^L" 15
                     94: The \s-2ASCII\s0 formfeed character, this causes the screen to be cleared
                     95: and redrawn.  This is useful after a transmission error, if characters
                     96: typed by a program other than the editor scramble the screen,
                     97: or after output is stopped by an interrupt (5.4, 7.2f).
                     98: .iP "^M\ (\fR\s-2CR\s0\fP)" 15
                     99: A carriage return advances to the next line, at the first non-white position
                    100: in the line.  Given a count, it advances that many lines (2.3).
                    101: During an insert, a \s-2CR\s0 causes the insert to continue onto
                    102: another line (3.1).
                    103: .iP "^N" 15
                    104: Same as
                    105: .B "down arrow"
                    106: (see
                    107: .B j ).
                    108: .iP "^O" 15
                    109: Unused.
                    110: .iP "^P" 15
                    111: Same as
                    112: .B "up arrow"
                    113: (see
                    114: .B k ).
                    115: .iP "^Q" 15
                    116: Not a command character.
                    117: In input mode,
                    118: .B ^Q
                    119: quotes the next character, the same as
                    120: .B ^V ,
                    121: except that some teletype drivers will eat the
                    122: .B ^Q
                    123: so that the editor never sees it.
                    124: .iP "^R" 15
                    125: Redraws the current screen, eliminating logical lines not corresponding
                    126: to physical lines (lines with only a single @ character on them).
                    127: On hardcopy terminals in \fIopen\fR mode, retypes the current line
                    128: (5.4, 7.2, 7.8).
                    129: .iP "^S" 15
                    130: Unused.  Some teletype drivers use
                    131: .B ^S
                    132: to suspend output until
                    133: .B ^Q is pressed.
                    134: .iP "^T" 15
                    135: Not a command character.
                    136: During an insert, with \fIautoindent\fR set and at the beginning of the
                    137: line, inserts \fIshiftwidth\fR white space.
                    138: .iP "^U" 15
                    139: Scrolls the screen up, inverting \fB^D\fR which scrolls down.  Counts work as
                    140: they do for \fB^D\fR, and the previous scroll amount is common to both.
                    141: On a dumb terminal, \fB^U\fR will often necessitate clearing and redrawing
                    142: the screen further back in the file (2.1, 7.2).
                    143: .iP "^V" 15
                    144: Not a command character.
                    145: In input mode, quotes the next character so that it is possible
                    146: to insert non-printing and special characters into the file (4.2, 7.5).
                    147: .iP "^W" 15
                    148: Not a command character.
                    149: During an insert, backs up as \fBb\fR would in command mode; the deleted
                    150: characters remain on the display (see \fB^H\fR) (7.5).
                    151: .iP "^X" 15
                    152: Unused.
                    153: .iP "^Y" 15
                    154: Exposes one more line above the current screen, leaving the cursor where
                    155: it is if possible.  (No mnemonic value for this key; however, it is next
                    156: to \fB^U\fR which scrolls up a bunch.)
                    157: (Version 3 only.)
                    158: .iP "^Z" 15
                    159: If supported by the Unix system,
                    160: stops the editor, exiting to the top level shell.
                    161: Same as \fB:stop\fP\s-2CR\s0.
                    162: Otherwise, unused.
                    163: .iP "^[\ (\fR\s-2ESC\s0\fP)" 15
                    164: Cancels a partially formed command, such as a \fBz\fR when no following
                    165: character has yet been given; terminates inputs on the last line (read
                    166: by commands such as \fB: /\fR and \fB?\fR); ends insertions of new text
                    167: into the buffer.
                    168: If an \s-2ESC\s0 is given when quiescent in command state, the editor
                    169: rings the bell or flashes the screen.  You can thus hit \s-2ESC\s0 if
                    170: you don't know what is happening till the editor rings the bell.
                    171: If you don't know if you are in insert mode you can type \s-2ESC\s0\fBa\fR,
                    172: and then material to be input; the material will be inserted correctly
                    173: whether or not you were in insert mode when you started (1.5, 3.1, 7.5).
                    174: .iP "^\e" 15
                    175: Unused.
                    176: .iP "^]" 15
                    177: Searches for the word which is after the cursor as a tag.  Equivalent
                    178: to typing \fB:ta\fR, this word, and then a \s-2CR\s0.
                    179: Mnemonically, this command is ``go right to'' (7.3).
                    180: .iP "^\(ua" 15
                    181: Equivalent to \fB:e #\fR\s-2CR\s0, returning to the previous position
                    182: in the last edited file, or editing a file which you specified if you
                    183: got a `No write since last change diagnostic' and do not want to have
                    184: to type the file name again (7.3).
                    185: (You have to do a \fB:w\fR before \fB^\(ua\fR
                    186: will work in this case.  If you do not wish to write the file you should
                    187: do \fB:e!\ #\fR\s-2CR\s0 instead.)
                    188: .iP "^_" 15
                    189: Unused.
                    190: Reserved as the command character for the
                    191: Tektronix 4025 and 4027 terminal.
                    192: .iP "\fR\s-2SPACE\s0\fP" 15
                    193: Same as
                    194: .B "right arrow"
                    195: (see
                    196: .B l ).
                    197: .iP "!" 15
                    198: An operator, which processes lines from the buffer with reformatting commands.
                    199: Follow \fB!\fR with the object to be processed, and then the command name
                    200: terminated by \s-2CR\s0.  Doubling \fB!\fR and preceding it by a count
                    201: causes count lines to be filtered; otherwise the count
                    202: is passed on to the object after the \fB!\fR.  Thus \fB2!}\fR\fIfmt\fR\s-2CR\s0
                    203: reformats the next two paragraphs by running them through the program
                    204: \fIfmt\fR.  If you are working on \s-2LISP\s0,
                    205: the command \fB!%\fR\fIgrind\fR\s-2CR\s0,*
                    206: .FS
                    207: *Both
                    208: .I fmt
                    209: and
                    210: .I grind
                    211: are Berkeley programs and may not be present at all installations.
                    212: .FE
                    213: given at the beginning of a
                    214: function, will run the text of the function through the \s-2LISP\s0 grinder
                    215: (6.7, 7.3).
                    216: To read a file or the output of a command into the buffer use \fB:r\fR (7.3).
                    217: To simply execute a command use \fB:!\fR (7.3).
                    218: .tr "
                    219: .iP  15
                    220: Precedes a named buffer specification.  There are named buffers \fB1\-9\fR
                    221: used for saving deleted text and named buffers \fBa\-z\fR into which you can
                    222: place text (4.3, 6.3)
                    223: .tr 
                    224: .iP "#" 15
                    225: The macro character which, when followed by a number, will substitute
                    226: for a function key on terminals without function keys (6.9).
                    227: In input mode, 
                    228: if this is your erase character, it will delete the last character
                    229: you typed in input mode, and must be preceded with a \fB\e\fR to insert
                    230: it, since it normally backs over the last input character you gave.
                    231: .iP "$" 15
                    232: Moves to the end of the current line.  If you \fB:se list\fR\s-2CR\s0,
                    233: then the end of each line will be shown by printing a \fB$\fR after the
                    234: end of the displayed text in the line.  Given a count, advances to the
                    235: count'th following end of line; thus \fB2$\fR advances to the end of the
                    236: following line.
                    237: .iP "%" 15
                    238: Moves to the parenthesis or brace \fB{ }\fR which balances the parenthesis
                    239: or brace at the current cursor position.
                    240: .iP "&" 15
                    241: A synonym for \fB:&\fR\s-2CR\s0, by analogy with the
                    242: .I ex
                    243: .B &
                    244: command.
                    245: .iP "\(aa" 15
                    246: When followed by a \fB\(aa\fR returns to the previous context at the
                    247: beginning of a line.  The previous context is set whenever the current
                    248: line is moved in a non-relative way.
                    249: When followed by a letter \fBa\fR\-\fBz\fR, returns to the line which
                    250: was marked with this letter with a \fBm\fR command, at the first non-white
                    251: character in the line. (2.2, 5.3).
                    252: When used with an operator such as \fBd\fR, the operation takes place
                    253: over complete lines; if you use \fB\(ga\fR, the operation takes place
                    254: from the exact marked place to the current cursor position within the
                    255: line.
                    256: .iP "(" 15
                    257: Retreats to the beginning of a
                    258: sentence, or to the beginning of a \s-2LISP\s0 s-expression
                    259: if the \fIlisp\fR option is set.
                    260: A sentence ends at a \fB. !\fR or \fB?\fR which is followed by either
                    261: the end of a line or by two spaces.  Any number of closing \fB) ] "\fR
                    262: and \fB\(aa\fR characters may appear after the \fB. !\fR or \fB?\fR,
                    263: and before the spaces or end of line.  Sentences also begin
                    264: at paragraph and section boundaries
                    265: (see \fB{\fR and \fB[[\fR below).
                    266: A count advances that many sentences (4.2, 6.8).
                    267: .iP ")" 15
                    268: Advances to the beginning of a sentence.
                    269: A count repeats the effect.
                    270: See \fB(\fR above for the definition of a sentence (4.2, 6.8).
                    271: .iP "*" 15
                    272: Unused.
                    273: .iP "+" 15
                    274: Same as \s-2CR\s0 when used as a command.
                    275: .iP "," 15
                    276: Reverse of the last \fBf F t\fR or \fBT\fR command, looking the other way
                    277: in the current line.  Especially useful after hitting too many \fB;\fR
                    278: characters.  A count repeats the search.
                    279: .iP "\-" 15
                    280: Retreats to the previous line at the first non-white character.
                    281: This is the inverse of \fB+\fR and \s-2RETURN\s0.
                    282: If the line moved to is not on the screen, the screen is scrolled, or
                    283: cleared and redrawn if this is not possible.
                    284: If a large amount of scrolling would be required the screen is also cleared
                    285: and redrawn, with the current line at the center (2.3).
                    286: .iP "\&." 15
                    287: Repeats the last command which changed the buffer.  Especially useful
                    288: when deleting words or lines; you can delete some words/lines and then
                    289: hit \fB.\fR to delete more and more words/lines.
                    290: Given a count, it passes it on to the command being repeated.  Thus after
                    291: a \fB2dw\fR, \fB3.\fR deletes three words (3.3, 6.3, 7.2, 7.4).
                    292: .iP "/" 15
                    293: Reads a string from the last line on the screen, and scans forward for
                    294: the next occurrence of this string.  The normal input editing sequences may
                    295: be used during the input on the bottom line; an returns to command state
                    296: without ever searching.
                    297: The search begins when you hit \s-2CR\s0 to terminate the pattern;
                    298: the cursor moves to the beginning of the last line to indicate that the search
                    299: is in progress; the search may then
                    300: be terminated with a \s-2DEL\s0 or \s-2RUB\s0, or by backspacing when
                    301: at the beginning of the bottom line, returning the cursor to
                    302: its initial position.
                    303: Searches normally wrap end-around to find a string
                    304: anywhere in the buffer.
                    305: .IP
                    306: When used with an operator the enclosed region is normally affected.
                    307: By mentioning an
                    308: offset from the line matched by the pattern you can force whole lines
                    309: to be affected.  To do this give a pattern with a closing
                    310: a closing \fB/\fR and then an offset \fB+\fR\fIn\fR or \fB\-\fR\fIn\fR.
                    311: .IP
                    312: To include the character \fB/\fR in the search string, you must escape
                    313: it with a preceding \fB\e\fR.
                    314: A \fB\(ua\fR at the beginning of the pattern forces the match to occur
                    315: at the beginning of a line only; this speeds the search.  A \fB$\fR at
                    316: the end of the pattern forces the match to occur at the end of a line
                    317: only.
                    318: More extended pattern matching is available, see section 7.4;
                    319: unless you set \fBnomagic\fR in your \fI\&.exrc\fR file you will have
                    320: to preceed the characters \fB. [ *\fR and \fB~\fR in the search pattern
                    321: with a \fB\e\fR to get them to work as you would naively expect (1.5, 2,2,
                    322: 6.1, 7.2, 7.4).
                    323: .iP "0" 15
                    324: Moves to the first character on the current line.
                    325: Also used, in forming numbers, after an initial \fB1\fR\-\fB9\fR.
                    326: .iP "1\-9" 15
                    327: Used to form numeric arguments to commands (2.3, 7.2).
                    328: .iP ":" 15
                    329: A prefix to a set of commands for file and option manipulation and escapes
                    330: to the system.  Input is given on the bottom line and terminated with
                    331: an \s-2CR\s0, and the command then executed.  You can return to where
                    332: you were by hitting \s-2DEL\s0 or \s-2RUB\s0 if you hit \fB:\fR accidentally
                    333: (see primarily 6.2 and 7.3).
                    334: .iP ";" 15
                    335: Repeats the last single character find which used \fBf F t\fR or \fBT\fR.
                    336: A count iterates the basic scan (4.1).
                    337: .iP "<" 15
                    338: An operator which shifts lines left one \fIshiftwidth\fR, normally 8
                    339: spaces.  Like all operators, affects lines when repeated, as in
                    340: \fB<<\fR.  Counts are passed through to the basic object, thus \fB3<<\fR
                    341: shifts three lines (6.6, 7.2).
                    342: .iP "=" 15
                    343: Reindents line for \s-2LISP\s0, as though they were typed in with \fIlisp\fR
                    344: and \fIautoindent\fR set (6.8).
                    345: .iP ">" 15
                    346: An operator which shifts lines right one \fIshiftwidth\fR, normally 8
                    347: spaces.  Affects lines when repeated as in \fB>>\fR.  Counts repeat the
                    348: basic object (6.6, 7.2).
                    349: .iP "?" 15
                    350: Scans backwards, the opposite of \fB/\fR.  See the \fB/\fR description
                    351: above for details on scanning (2.2, 6.1, 7.4).
                    352: .iP "@" 15
                    353: A macro character (6.9).  If this is your kill character, you must escape it with a \e
                    354: to type it in during input mode, as it normally backs over the input you
                    355: have given on the current line (3.1, 3.4, 7.5).
                    356: .iP "A" 15
                    357: Appends at the end of line, a synonym for \fB$a\fR (7.2).
                    358: .iP "B" 15
                    359: Backs up a word, where words are composed of non-blank sequences, placing
                    360: the cursor at the beginning of the word.  A count repeats the effect
                    361: (2.4).
                    362: .iP "C" 15
                    363: Changes the rest of the text on the current line; a synonym for \fBc$\fR.
                    364: .iP "D" 15
                    365: Deletes the rest of the text on the current line; a synonym for \fBd$\fR.
                    366: .iP "E" 15
                    367: Moves forward to the end of a word, defined as blanks and non-blanks,
                    368: like \fBB\fR and \fBW\fR.  A count repeats the effect.
                    369: .iP "F" 15
                    370: Finds a single following character, backwards in the current line.
                    371: A count repeats this search that many times (4.1).
                    372: .iP "G" 15
                    373: Goes to the line number given as preceding argument, or the end of the
                    374: file if no preceding count is given.  The screen is redrawn with the
                    375: new current line in the center if necessary (7.2).
                    376: .iP "H" 15
                    377: .B "Home arrow" .
                    378: Homes the cursor to the top line on the screen.  If a count is given,
                    379: then the cursor is moved to the count'th line on the screen.
                    380: In any case the cursor is moved to the first non-white character on the
                    381: line.  If used as the target of an operator, full lines are affected
                    382: (2.3, 3.2).
                    383: .iP "I" 15
                    384: Inserts at the beginning of a line; a synonym for \fB\(uai\fR.
                    385: .iP "J" 15
                    386: Joins together lines, supplying appropriate white space: one space between
                    387: words, two spaces after a \fB.\fR, and no spaces at all if the first
                    388: character of the joined on line is \fB)\fR.  A count causes that many
                    389: lines to be joined rather than the default two (6.5, 7.1f).
                    390: .iP "K" 15
                    391: Unused.
                    392: .iP "L" 15
                    393: Moves the cursor to the first non-white character of the last line on
                    394: the screen.  With a count, to the first non-white of the count'th line
                    395: from the bottom.  Operators affect whole lines when used with \fBL\fR
                    396: (2.3).
                    397: .iP "M" 15
                    398: Moves the cursor to the middle line on the screen, at the first non-white
                    399: position on the line (2.3).
                    400: .iP "N" 15
                    401: Scans for the next match of the last pattern given to
                    402: \fB/\fR or \fB?\fR, but in the reverse direction; this is the reverse
                    403: of \fBn\fR.
                    404: .iP "O" 15
                    405: Opens a new line above the current line and inputs text there up to an
                    406: \s-2ESC\s0.  A count can be used on dumb terminals to specify a number
                    407: of lines to be opened; this is generally obsolete, as the \fIslowopen\fR
                    408: option works better (3.1).
                    409: .iP "P" 15
                    410: Puts the last deleted text back before/above the cursor.  The text goes
                    411: back as whole lines above the cursor if it was deleted as whole lines.
                    412: Otherwise the text is inserted between the characters before and at the
                    413: cursor.  May be preceded by a named buffer specification \fB"\fR\fIx\fR
                    414: to retrieve the contents of the buffer; buffers \fB1\fR\-\fB9\fR contain
                    415: deleted material, buffers \fBa\fR\-\fBz\fR are available for general
                    416: use (6.3).
                    417: .iP "Q" 15
                    418: Quits from \fIvi\fR to \fIex\fR command mode.  In this mode, whole lines
                    419: form commands, ending with a \s-2RETURN\s0.  You can give all the \fB:\fR
                    420: commands; the editor supplies the \fB:\fR as a prompt (7.7).
                    421: .iP "R" 15
                    422: Replaces characters on the screen with characters you type (overlay fashion).
                    423: Terminates with an \s-2ESC\s0.
                    424: .iP "S" 15
                    425: Changes whole lines, a synonym for \fBcc\fR.  A count substitutes for
                    426: that many lines.  The lines are saved in the numeric buffers, and erased
                    427: on the screen before the substitution begins.
                    428: .iP "T" 15
                    429: Takes a single following character, locates the character before the
                    430: cursor in the current line, and places the cursor just after that character.
                    431: A count repeats the effect.  Most useful with operators such as \fBd\fR
                    432: (4.1).
                    433: .iP "U" 15
                    434: Restores the current line to its state before you started changing it
                    435: (3.5).
                    436: .iP "V" 15
                    437: Unused.
                    438: .iP "W" 15
                    439: Moves forward to the beginning of a word in the current line,
                    440: where words are defined as sequences of blank/non-blank characters.
                    441: A count repeats the effect (2.4).
                    442: .iP "X" 15
                    443: Deletes the character before the cursor.  A count repeats the effect,
                    444: but only characters on the current line are deleted.
                    445: .iP "Y" 15
                    446: Yanks a copy of the current line into the unnamed buffer, to be put back
                    447: by a later \fBp\fR or \fBP\fR; a very useful synonym for \fByy\fR. 
                    448: A count yanks that many lines.  May be preceded by a buffer name to put
                    449: lines in that buffer (7.4).
                    450: .iP "ZZ" 15
                    451: Exits the editor.
                    452: (Same as \fB:x\fP\s-2CR\s0.)
                    453: If any changes have been made, the buffer is written out to the current file.
                    454: Then the editor quits.
                    455: .iP "[[" 15
                    456: Backs up to the previous section boundary.  A section begins at each
                    457: macro in the \fIsections\fR option,
                    458: normally a `.NH' or `.SH' and also at lines which which start
                    459: with a formfeed \fB^L\fR.  Lines beginning with \fB{\fR also stop \fB[[\fR;
                    460: this makes it useful for looking backwards, a function at a time, in C
                    461: programs.  If the option \fIlisp\fR is set, stops at each \fB(\fR at the
                    462: beginning of a line, and is thus useful for moving backwards at the top
                    463: level \s-2LISP\s0 objects. (4.2, 6.1, 6.6, 7.2).
                    464: .iP "\e" 15
                    465: Unused.
                    466: .iP "]]" 15
                    467: Forward to a section boundary, see \fB[[\fR for a definition (4.2, 6.1,
                    468: 6.6, 7.2).
                    469: .iP "\(ua" 15
                    470: Moves to the first non-white position on the current line (4.4).
                    471: .iP "_" 15
                    472: Unused.
                    473: .iP "\(ga" 15
                    474: When followed by a \fB\(ga\fR returns to the previous context.
                    475: The previous context is set whenever the current
                    476: line is moved in a non-relative way.
                    477: When followed by a letter \fBa\fR\-\fBz\fR, returns to the position which
                    478: was marked with this letter with a \fBm\fR command.
                    479: When used with an operator such as \fBd\fR, the operation takes place
                    480: from the exact marked place to the current position within the line;
                    481: if you use \fB\(aa\fR, the operation takes place over complete lines
                    482: (2.2, 5.3).
                    483: .iP "a" 15
                    484: Appends arbitrary text after the current cursor position; the insert
                    485: can continue onto multiple lines by using \s-2RETURN\s0 within the insert.
                    486: A count causes the inserted text to be replicated, but only if the inserted
                    487: text is all on one line.
                    488: The insertion terminates with an \s-2ESC\s0 (3.1, 7.2).
                    489: .iP "b" 15
                    490: Backs up to the beginning of a word in the current line.  A word is a
                    491: sequence of alphanumerics, or a sequence of special characters.
                    492: A count repeats the effect (2.4).
                    493: .iP "c" 15
                    494: An operator which changes the following object, replacing it with the
                    495: following input text up to an \s-2ESC\s0.  If more than part of a single
                    496: line is affected, the text which is changed away is saved in the numeric named
                    497: buffers.  If only part of the current line is affected, then the last
                    498: character to be changed away is marked with a \fB$\fR.
                    499: A count causes that many objects to be affected, thus both
                    500: \fB3c)\fR and \fBc3)\fR change the following three sentences (7.4).
                    501: .iP "d" 15
                    502: An operator which deletes the following object.  If more than part of
                    503: a line is affected, the text is saved in the numeric buffers.
                    504: A count causes that many objects to be affected; thus \fB3dw\fR is the
                    505: same as \fBd3w\fR (3.3, 3.4, 4.1, 7.4).
                    506: .iP "e" 15
                    507: Advances to the end of the next word, defined as for \fBb\fR and \fBw\fR.
                    508: A count repeats the effect (2.4, 3.1).
                    509: .iP "f" 15
                    510: Finds the first instance of the next character following the cursor on
                    511: the current line.  A count repeats the find (4.1).
                    512: .iP "g" 15
                    513: Unused.
                    514: .sp
                    515: Arrow keys
                    516: .B h ,
                    517: .B j ,
                    518: .B k ,
                    519: .B l ,
                    520: and
                    521: .B H .
                    522: .iP "h" 15
                    523: .B "Left arrow" .
                    524: Moves the cursor one character to the left.
                    525: Like the other arrow keys, either
                    526: .B h ,
                    527: the
                    528: .B "left arrow"
                    529: key, or one of the synonyms (\fB^H\fP) has the same effect.
                    530: On v2 editors, arrow keys on certain kinds of terminals
                    531: (those which send escape sequences, such as vt52, c100, or hp)
                    532: cannot be used.
                    533: A count repeats the effect (3.1, 7.5).
                    534: .iP "i" 15
                    535: Inserts text before the cursor, otherwise like \fBa\fR (7.2).
                    536: .iP "j" 15
                    537: .B "Down arrow" .
                    538: Moves the cursor one line down in the same column.
                    539: If the position does not exist,
                    540: .I vi
                    541: comes as close as possible to the same column.
                    542: Synonyms include
                    543: .B ^J
                    544: (linefeed) and
                    545: .B ^N .
                    546: .iP "k" 15
                    547: .B "Up arrow" .
                    548: Moves the cursor one line up.
                    549: .B ^P
                    550: is a synonym.
                    551: .iP "l" 15
                    552: .B "Right arrow" .
                    553: Moves the cursor one character to the right.
                    554: \s-2SPACE\s0 is a synonym.
                    555: .iP "m" 15
                    556: Marks the current position of the cursor in the mark register which is
                    557: specified by the next character \fBa\fR\-\fBz\fR.  Return to this position
                    558: or use with an operator using \fB\(ga\fR or \fB\(aa\fR (5.3).
                    559: .iP "n" 15
                    560: Repeats the last \fB/\fR or \fB?\fR scanning commands (2.2).
                    561: .iP "o" 15
                    562: Opens new lines below the current line; otherwise like \fBO\fR (3.1).
                    563: .iP "p" 15
                    564: Puts text after/below the cursor; otherwise like \fBP\fR (6.3).
                    565: .iP "q" 15
                    566: Unused.
                    567: .iP "r" 15
                    568: Replaces the single character at the cursor with a single character you
                    569: type.  The new character may be a \s-2RETURN\s0; this is the easiest
                    570: way to split lines.  A count replaces each of the following count characters
                    571: with the single character given; see \fBR\fR above which is the more
                    572: usually useful iteration of \fBr\fR (3.2).
                    573: .iP "s" 15
                    574: Changes the single character under the cursor to the text which follows
                    575: up to an \s-2ESC\s0; given a count, that many characters from the current
                    576: line are changed.  The last character to be changed is marked with \fB$\fR
                    577: as in \fBc\fR (3.2).
                    578: .iP "t" 15
                    579: Advances the cursor upto the character before the next character typed.
                    580: Most useful with operators such as \fBd\fR and \fBc\fR to delete the
                    581: characters up to a following character.  You can use \fB.\fR to delete
                    582: more if this doesn't delete enough the first time (4.1).
                    583: .iP "u" 15
                    584: Undoes the last change made to the current buffer.  If repeated, will
                    585: alternate between these two states, thus is its own inverse. When used
                    586: after an insert which inserted text on more than one line, the lines are
                    587: saved in the numeric named buffers (3.5).
                    588: .iP "v" 15
                    589: Unused.
                    590: .iP "w" 15
                    591: Advances to the beginning of the next word, as defined by \fBb\fR (2.4).
                    592: .iP "x" 15
                    593: Deletes the single character under the cursor.  With a count deletes
                    594: deletes that many characters forward from the cursor position, but only
                    595: on the current line (6.5).
                    596: .iP "y" 15
                    597: An operator, yanks the following object into the unnamed temporary buffer.
                    598: If preceded by a named buffer specification, \fB"\fR\fIx\fR, the text
                    599: is placed in that buffer also.  Text can be recovered by a later \fBp\fR
                    600: or \fBP\fR (7.4).
                    601: .iP "z" 15
                    602: Redraws the screen with the current line placed as specified by the following
                    603: character: \s-2RETURN\s0 specifies the top of the screen, \fB.\fR the
                    604: center of the screen, and \fB\-\fR at the bottom of the screen.
                    605: A count may be given after the \fBz\fR and before the following character
                    606: to specify the new screen size for the redraw.
                    607: A count before the \fBz\fR gives the number of the line to place in the
                    608: center of the screen instead of the default current line. (5.4)
                    609: .iP "{" 15
                    610: Retreats to the beginning of the beginning of the preceding paragraph.
                    611: A paragraph begins at each macro in the \fIparagraphs\fR option, normally
                    612: `.IP', `.LP', `.PP', `.QP' and `.bp'.
                    613: A paragraph also begins after a completely
                    614: empty line, and at each section boundary (see \fB[[\fR above) (4.2, 6.8,
                    615: 7.6).
                    616: .iP "|" 15
                    617: Places the cursor on the character in the column specified
                    618: by the count (7.1, 7.2).
                    619: .iP "}" 15
                    620: Advances to the beginning of the next paragraph.  See \fB{\fR for the
                    621: definition of paragraph (4.2, 6.8, 7.6).
                    622: .iP "~" 15
                    623: Unused.
                    624: .iP "^?\ (\s-2\fRDEL\fP\s0)" 15
                    625: Interrupts the editor, returning it to command accepting state (1.5,
                    626: 7.5)
                    627: .bp
                    628: \&.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.