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