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