home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / 1_1_contri / usd / 15_vi / vi_chars < prev    next >
Encoding:
Text File  |  1986-05-30  |  24.7 KB  |  618 lines

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