home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / STVI369G.ZIP / STEVIE.MM < prev    next >
Text File  |  1990-05-01  |  27KB  |  760 lines

  1. .\" $Header: /nw/tony/src/stevie/src/RCS/stevie.mm,v 3.69 89/08/13 11:44:04 tony Exp $
  2. .\"
  3. .\" Documentation for STEVIE. Process with nroff using the mm macros.
  4. .\"
  5. .nr Hu 1
  6. .SA 1
  7. .TL
  8. STEVIE - An Aspiring VI Clone
  9. .sp
  10. User Reference - 3.69a
  11. .AU "Tony Andrews"
  12. .AF ""
  13. .MT 4
  14. .PH "'STEVIE''User Reference'"
  15. .PF "''- \\\\nP -''"
  16. .H 1 "Overview"
  17. STEVIE is an editor designed to mimic the interface of the UNIX
  18. editor 'vi'. The name (ST Editor for VI Enthusiasts) comes from the fact that
  19. the editor was first written for the Atari ST. The current version also supports
  20. UNIX, Minix (ST), MS-DOS, and OS/2, but I've left
  21. the name intact for now.
  22. .P
  23. This program is the result of many late nights of hacking over the last
  24. couple of years.
  25. The first version was written by Tim Thompson and posted
  26. to USENET. From there, I reworked the data structures completely, added
  27. LOTS of features, and generally improved the overall performance in the
  28. process.
  29. .P
  30. I've labelled STEVIE an 'aspiring' vi clone as a warning to those who
  31. may expect too much. On the whole, the editor is pretty complete.
  32. Nearly all of the visual mode commands are supported.
  33. And several of the more important 'ex' commands are supported as well.
  34. I've tried hard to
  35. capture the feel of vi by getting the little things right.
  36. Making lines
  37. wrap correctly, supporting true operators, and even getting the cursor to
  38. land on the right place for tabs are all a pain, but really help make
  39. the editor feel right.
  40. I've tried to resist the temptation to deviate from the behavior
  41. of vi, even where I disagree with the original design.
  42. .P
  43. The biggest problem remaining has to do with the fact that the edit buffer
  44. is maintained entirely in memory, limiting the size of files that can
  45. be edited in some environments.
  46. Other missing features include named buffers and macros.
  47. Performance is generally reasonable, although the screen update code
  48. could be more efficient.
  49. This is generally only visible on fairly slow systems.
  50. .P
  51. STEVIE may be freely distributed. The source isn't copyrighted or
  52. restricted in any way. If you pass the program along, please include all
  53. the documentation and, if practical, the source as well. I'm not fanatical
  54. about this, but I tried to make STEVIE fairly portable and I'd like to
  55. see as many people have access to the source as possible.
  56. .P
  57. The remainder of this document describes the operation of the editor.
  58. This is intended as a reference for users already familiar with the real
  59. vi editor.
  60. .H 1 "Starting the Editor"
  61. The following command line forms are supported:
  62. .VL 20
  63. .LI "stevie [file ...]"
  64. Edit the specified file(s)
  65. .LI "stevie -t tag"
  66. Start at the location of the given tag
  67. .LI "stevie + file"
  68. Edit file starting at end
  69. .LI "stevie +n file"
  70. Edit file starting a line number 'n'
  71. .LI "stevie +/pat file"
  72. Edit file starting at pattern 'pat'
  73. .LE
  74. .P
  75. If multiple files are given on the command line (using the first form),
  76. the ":n" command goes to the next file, ":N" goes backward in the list,
  77. and ":rew" can be used to rewind back to the start of the file list.
  78. .H 1 "Set Command Options"
  79. The ":set" command works as usual to set parameters. Each parameter has
  80. a long and an abbreviated name, either of which may be used. Boolean
  81. parameters are set as in:
  82. .sp
  83. .ti +5
  84. set showmatch
  85. .sp
  86. or cleared by:
  87. .sp
  88. .ti +5
  89. set noshowmatch
  90. .sp
  91. Numeric parameters are set as in:
  92. .sp
  93. .ti +5
  94. set scroll=5
  95. .sp
  96. Several parameters may be set with a single command:
  97. .sp
  98. .ti +5
  99. set novb sm report=1
  100. .P
  101. To see the status of all parameters use ":set all". Typing ":set" with
  102. no arguments will show only those parameters that have been changed.
  103. The supported parameters, their names, abbreviations, defaults,
  104. and descriptions are shown below:
  105. .VL 12
  106. .LI autoindent
  107. Short: ai, Default: noai, Type: Boolean
  108. .br
  109. When in insert mode, start new lines at the same column as the prior
  110. line. Unlike vi, you can backspace over the indentation.
  111. .LI backup
  112. Short: bk, Default: nobk, Type: Boolean
  113. .br
  114. Leave a backup on file writes.
  115. (During file writes, a backup is always kept for
  116. safety anyway, until the write is completed.
  117. At that point, the 'backup' parameter
  118. determines whether the backup file is deleted.)
  119. .LI color
  120. Short: co, Default: system-dependent, Type: Numeric
  121. .br
  122. Change the screen color (video attributes).
  123. There is a system-dependent mapping between numbers and colors.
  124. (For instance, in MSDOS we use the BIOS-type attributes for
  125. CGA or monochrome screens in alphanumeric mode.)
  126. .LI errorbells
  127. Short: eb, Default: noeb, Type: Boolean
  128. .br
  129. Ring bell when error messages are shown.
  130. .LI ignorecase
  131. Short: ic, Default: noic, Type: Boolean
  132. .br
  133. Ignore case in string searches.
  134. .LI lines
  135. Short: lines, Default: lines=25, Type: Numeric
  136. .br
  137. Number of physical lines on the screen. The default value
  138. and possible settings depend on the host machine.
  139. The default value is 25 on most systems.
  140. .LI list
  141. Short: list, Default: nolist, Type: Boolean
  142. .br
  143. Show tabs and newlines graphically.
  144. .LI modelines
  145. Short: ml, Default: noml, Type: Boolean
  146. .br
  147. Enable processing of modelines in files.
  148. .LI number
  149. Short: nu, Default: nonu, Type: Boolean
  150. .br
  151. Display lines on the screen with their line numbers.
  152. .LI report
  153. Short: report, Default: report=5, Type: Numeric
  154. .br
  155. Minimum number of lines to report operations on.
  156. .LI return
  157. Short: cr, Default: cr, Type: Boolean
  158. .br
  159. End lines with cr-lf when writing files.
  160. .LI scroll
  161. Short: scroll, Default: scroll=12, Type: Numeric
  162. .br
  163. Number of lines to scroll for ^D & ^U.
  164. .LI showmatch
  165. Short: sm, Default: nosm, Type: Boolean
  166. .br
  167. When a ), }, or ] is typed, show the matching (, {, or [ if
  168. it's on the current screen by moving the cursor there briefly.
  169. .LI showmode
  170. Short: mo, Default: nomo, Type: Boolean
  171. .br
  172. Show on status line when in insert mode.
  173. .LI tabstop
  174. Short: ts, Default: ts=8, Type: Numeric
  175. .br
  176. Number of spaces in a tab.
  177. .LI tagstack
  178. Short: tg, Default: notg, Type: Boolean
  179. .br
  180. If set, the tag command :ta is "stacked";
  181. that is, the place from which it was called is pushed onto a stack.
  182. A new command ":untag" goes back to that place, and pops the tag stack.
  183. .LI terse
  184. Short: terse, Default: noterse, Type: Boolean
  185. .br
  186. This option is currently ignored.
  187. It is provided only for compatibility with vi.
  188. .LI tildeop
  189. Short: to, Default: noto, Type: Boolean
  190. .br
  191. If set, tilde is an operator. Otherwise, tilde acts as normal.
  192. .LI wrapscan
  193. Short: ws, Default: ws, Type: Boolean
  194. .br
  195. String searches wrap around the ends of the file.
  196. .LI vbell
  197. Short: vb, Default: vb, Type: Boolean
  198. .br
  199. Use a visual bell, if possible. (novb for audible bell)
  200. .LE
  201. .P
  202. The EXINIT environment variable can be used to modify the default values
  203. on startup as in:
  204. .sp
  205. .ti +5
  206. setenv EXINIT="set sm ts=4"
  207. .P
  208. In environments (e.g. OS/2 or TOS) where lines are normally terminated by
  209. CR-LF, the 'return' parameter allows files to be written with only a LF
  210. terminator (if the parameter is cleared).
  211. This parameter is ignored on UNIX systems.
  212. .P
  213. The 'lines' parameter tells the editor how many lines there are on the screen.
  214. This is useful on systems like the ST (or OS/2 machines with an EGA adapter)
  215. where various screen resolutions may be
  216. used. By using the 'lines' parameter, different screen sizes can be easily
  217. handled.
  218. .H 1 "Colon Commands"
  219. Several of the normal 'vi' colon commands are supported by STEVIE.
  220. Some commands may be preceded by a
  221. line range specification.
  222. For commands that accept a range of lines,
  223. the following address forms are supported:
  224. .DS 1
  225. addr
  226. addr + number
  227. addr - number
  228. .DE
  229. where 'addr' may be one of the following:
  230. .DS 1
  231. a line number
  232. a mark (as in 'a or 'b)
  233. \'.' (the current line)
  234. \'$' (the last line)
  235. .DE
  236. .P
  237. An address range of "%" is accepted as an abbreviation of "1,$".
  238. .H 2 "Mode Lines"
  239. Mode lines are a little-known, but often useful, feature of vi.
  240. To use this feature, special strings are placed in the first or
  241. last five lines in a file.
  242. When the file is edited, these strings are detected and processed
  243. as though typed as a colon command.
  244. One instance where this can be useful is to set the "tabstop"
  245. parameter on a per-file basis.
  246. The following are examples of mode lines:
  247. .DS 1
  248. vi:set ts=4 noai:
  249. ex:45:
  250. .DE
  251. .P
  252. Mode lines are characterized by the string "vi" or "ex" followed
  253. by a command surrounded by colons. Other text may appear on the
  254. line, and multiple mode lines may be present. No guarantee is
  255. made regarding the order in which multiple mode lines will be
  256. processed.
  257. .P
  258. The processing of mode lines is enabled by setting the "ml"
  259. parameter. This should be done in the "EXINIT" environment
  260. variable, so that mode line processing is enabled as soon
  261. as the editor begins.
  262. By default, mode lines are disabled for security reasons.
  263. .H 2 "The Global Command"
  264. A limited form of the global command is supported, accepting the
  265. following command form:
  266. .DS 1
  267. g/pattern/X
  268. .DE
  269. where X may be either 'd' or 'p' to delete or print lines that match
  270. the given pattern.
  271. If a line range is given, only those lines are checked for a match
  272. with the pattern.
  273. If no range is given, all lines are checked.
  274. .P
  275. If the trailing command character is omitted, 'p' is assumed.
  276. In this case, the trailing slash is also optional.
  277. The current version of the editor does not support the undo operation
  278. following the deletion of lines with the global command.
  279. .H 2 "The Substitute Command"
  280. The substitute command provides a powerful mechanism for making more
  281. complex substitutions than can be done directly from visual mode.
  282. The general form of the command is:
  283. .DS 1
  284. s/pattern/replacement/g
  285. .DE
  286. Each line in the given range (or the current line, if no range was
  287. given) is scanned for the given regular expression.
  288. When found, the string that matched the pattern is replaced with
  289. the given replacement string.
  290. If the replacement string is null, each matching pattern string is
  291. deleted.
  292. .P
  293. The trailing 'g' is optional and, if present, indicates that multiple
  294. occurrences of 'pattern' on a line should all be replaced.
  295. .P
  296. Some special sequences are recognized in the replacement string. The
  297. ampersand character is replaced by the entire pattern that was matched.
  298. For example, the following command could be used to put all occurrences
  299. of 'foo' or 'bar' within double quotes:
  300. .DS 1
  301. 1,$s/foo|bar/"&"/g
  302. .DE
  303. .P
  304. The special sequence "\\n" where 'n' is a digit from 1 to 9, is replaced
  305. by the string the matched the corresponding parenthesized expression in
  306. the pattern. The following command could be used to swap the first two
  307. parameters in calls to the C function "foo":
  308. .DS 1
  309. 1,$s/foo\\\\(([^,]*),([^,]*),/foo(\\\\2,\\\\1,/g
  310. .DE
  311. .P
  312. Like the global command, substitutions can't be undone with this
  313. version of the editor.
  314. .H 2 "File Manipulation Commands"
  315. The following table shows the supported file manipulation commands as
  316. well as some other 'ex' commands that aren't described elsewhere:
  317. .DS CB
  318. :w        write the current file
  319. :wq        write and quit
  320. :x        write (if necessary) and quit
  321. ZZ        same as ":x"
  322.  
  323. :e file        edit the named file
  324. :e!        re-edit the current file, discarding changes
  325. :e #        edit the alternate file
  326.  
  327. :w file        write the buffer to the named file
  328. :x,yw file    write lines x through y to the named file
  329. :r file        read the named file into the buffer
  330.  
  331. :n        edit the next file
  332. :N        edit the previous file
  333. :rew        rewind the file list
  334.  
  335. :f        show the current file name
  336. :f name        change the current file name
  337. :x=        show the line number of address 'x'
  338.  
  339. :ta tag        go to the named tag
  340. ^]        like ":ta" using the current word as the tag
  341. :untag        go back to place from which ":ta" was called
  342.  
  343. :help        display a command summary
  344. :ve        show the version number
  345.  
  346. :sh        run an interactive shell
  347. :!cmd        run a command
  348. .DE
  349. .P
  350. The commands above work pretty much like they do in 'vi'. Most of the
  351. commands support a '!' suffix (if appropriate) to discard any pending
  352. changes.
  353. .H 1 Help Facility
  354. The ":help" command can also be invoked with the <HELP> key on the Atari
  355. ST and the F1 key on MSDOS and OS/2 PCs.
  356. This actually displays a pretty complete summary of the real vi with
  357. unsupported features indicated appropriately.
  358. Certain features controlled by "set" parameters will have varied displays
  359. on the Help screens, to correspond to the current
  360. setting of their parameters.
  361. .P
  362. The help screens (there are multiple screens) can be traversed
  363. using "reasonable" keystrokes.  For instance, any key that would take you
  364. "down" in the vi editor, will take you to the next help screen in
  365. the help facility.  Similarly, "up" commands will take you to
  366. the previous screen. 
  367. The screens are numbered, and any numeric key will take you to
  368. the corresponding screen.
  369. The first screen (screen 0) is a table of contents for the
  370. help screens.
  371. .H 1 "String Searches"
  372. String searches are supported, as in vi, accepting the usual regular
  373. expression syntax. This was done using a modified form of
  374. Henry Spencer's regular expression
  375. library. I added code outside the library to support
  376. the '\\<' and '\\>' extensions.
  377. The parameter "ignorecase" can be set to ignore case in all string searches.
  378. .H 1 "Operators"
  379. The vi operators (d, c, y, !, <, and >) work as true operators.
  380. The tilde command may also be used as an operator if the parameter "tildeop"
  381. has been set. By default, this parameter is not set.
  382. .H 1 "Tags"
  383. Tags are implemented and a fairly simple version of 'ctags' is supplied
  384. with the editor. The current version of ctags will find functions and
  385. macros following a specific (but common) form.  See 'ctags.doc' for a
  386. complete discussion.
  387. .P
  388. A non-standard but useful variant of tags is the "stacking" of calls to
  389. the ':ta' command.
  390. When tag-stacking is enabled (with ':set tg'), stevie remembers
  391. (and stacks) the position from which any tag call is made.
  392. In this mode, a new ':untag' command returns to the remembered position
  393. and pops the stack.
  394. Also while in the tagstack mode, the Ctrl-^ keystroke has a somewhat
  395. different effect.  Before it switches to edit the alternate file
  396. (its normal function), it checks to see if the tag stack is empty,
  397. and does an ':untag' if not empty.
  398. .H 1 "System-Specific Comments"
  399. The following sections provide additional relevant information for the
  400. systems to which STEVIE has been ported.
  401. (WARNING: If you compile Stevie for, or port Stevie to,
  402. your favorite environment, don't forget to edit ENV.H
  403. to correspond to the target environment.)
  404. .H 2 "Atari ST"
  405. .H 3 "TOS"
  406. The editor has been tested in all three resolutions, although low and
  407. high res. are less tested than medium. The 50-line high res. mode can
  408. be used by setting the 'lines' parameter to 50. Alternatively, the
  409. environment variable 'LINES' can be set. The editor doesn't actively
  410. set the number of lines on the screen. It just operates using the number
  411. of lines it was told.
  412. .P
  413. The arrow keys, as well as the <INSERT>, <HELP>, and <UNDO> keys are
  414. all mapped appropriately.
  415. .H 3 "Minix"
  416. The editor is pretty much the same under Minix, but many of the
  417. keyboard mappings aren't yet supported.
  418. .H 2 "UNIX"
  419. The editor has been ported to UNIX System V release 3 as well as 4.2 BSD.
  420. This was done
  421. mainly to get some profiling data so I haven't put much effort into
  422. doing the UNIX version right.
  423. While the termcap routines are supported, the editor is still fairly
  424. picky about the capabilities it wants and makes little effort to
  425. do clever things with less intelligent terminals.
  426. .H 2 "OS/2"
  427. This port was done because the editor that comes with the OS/2 developer's
  428. kit really stinks. Make sure 'ansi' mode is on (using the 'ansi' command).
  429. The OS/2 console driver doesn't support insert/delete line, so STEVIE
  430. bypasses the driver and makes the appropriate system calls directly.
  431. This is all done in the system-specific part of the editor so the kludge
  432. is at least localized.
  433. .P
  434. The arrow keys, page up/down and home/end all do what
  435. you'd expect. The function keys are hard-coded to some useful macros until
  436. I can get true support for macros into the editor. The current mappings
  437. are:
  438. .DS 1
  439. F1    Help
  440. F2    Next file (:n)             \h'|3.3i'Shift-F2  discard changes (:n!)
  441. F3    Previous file (:N)         \h'|3.3i'Shift-F3  discard changes (:N!)
  442. F4    Alternate file (:e #)      \h'|3.3i'Shift-F4  discard changes (:e! #)
  443. F5    Rewind file list (:rew)    \h'|3.3i'Shift-F5  discard changes (:rew!)
  444. F6    Next function (]])         \h'|3.3i'Shift-F6  Prev. function ([[)
  445. F8    Global subst. (:1,$s/)
  446. F9    Convert cdecl to English   \h'|3.3i'Shift-F9  Convert English to cdecl
  447. F10   Save & quit (:x)           \h'|3.3i'Shift-F10 discard changes (:q!)
  448. .DE
  449. .P
  450. Function keys F9 and Shift-F9 assume the presence of the cdecl program.
  451. .H 2 "MSDOS"
  452. STEVIE has been ported to MSDOS 3.3 using
  453. (1) the Microsoft C compiler, version 5.1, and
  454. (2) the Borland Turbo C compiler, version 2.0.
  455. .P
  456. The keyboard mappings are the same as for OS/2.
  457. The only problem with the PC version is that the inefficiency of
  458. the screen update code becomes painfully apparent on slower machines.
  459. (In Rev 3.69a, there are a couple of ways in which screen I/O
  460. is significantly speeded up.)
  461. .P
  462. There are two DOS versions:
  463. one that uses an extended console driver,
  464. and another that uses the BIOS directly.
  465. The extended-console-driver version works well with "nansi.sys",
  466. which is widely available shareware.
  467. It does not work well with the "ANSI.SYS" driver included as part of
  468. MSDOS (at least through the 3.30 version).
  469. In order to be independent of the console driver,
  470. you may compile with BIOS #defined;
  471. this uses the BIOS as the exclusive screen I/O mechanism.
  472. (Note that it is somewhat slower than nansi.sys.)
  473. .P
  474. The color settings are the video attributes for the alphanumeric modes
  475. of the CGA and monochrome displays.
  476. While these make most sense in binary or hex, they must be entered
  477. in decimal.  The reference table below gives a few common values:
  478. .DS 1
  479. 07    White on black          Initial default
  480. 23    White on blue
  481. 30    Bright yellow on blue   My favorite
  482. .DE
  483. .H 1 "Missing Features"
  484. .AL
  485. .LI
  486. The ability to edit files larger than the available memory.
  487. This isn't a problem on the machines I use, but it hits the
  488. Minix-PC people pretty hard.
  489. .LI
  490. Macros with support for function keys.
  491. .LI
  492. More "set" options.
  493. .LI
  494. Many others...
  495. .LE
  496. .H 1 "Known Bugs and Problems"
  497. .AL
  498. .LI
  499. The yank buffer uses statically allocated memory, so large yanks
  500. will fail. If a delete spans an area larger than the yank buffer,
  501. the program asks
  502. for confirmation before proceeding. That way, if you were moving text,
  503. you don't get screwed by the limited yank buffer. You just have to move
  504. smaller chunks at a time. All the internal buffers (yank, redo, etc.)
  505. need to be reworked to allocate memory dynamically. The 'undo' buffer
  506. is now dynamically allocated, so any change can be undone.
  507. .LI
  508. If you stay in insert mode for a long time, the insert buffer can overflow.
  509. The editor will print a message and dump you back into command mode.
  510. .LI
  511. The current version of the substitute and global commands
  512. (i.e. ":s/foo/bar" or ":g/foo/d") can't
  513. be undone.
  514. This is due to the current design of the undo code.
  515. To undo these
  516. commands would generally involve unreasonable amounts of memory.
  517. .LI
  518. Several other less bothersome glitches...
  519. .LE
  520. .SK
  521. .H 1 "Conclusion"
  522. The editor has reached a pretty stable state, and performs well on
  523. the systems I use it on, so I'm pretty much in maintenance mode now.
  524. There's still plenty to be done; the screen update code is still pretty
  525. inefficient and the yank/put code is still primitive.
  526. I'm still interested in bug reports, and I do still add a new feature
  527. from time to time, but the rate of change is way down now.
  528. .P
  529. I'd like to thank Tim Thompson for writing the original version of the
  530. editor. His program was well structured and quite readable. Thanks for
  531. giving me a good base to work with.
  532. Thanks also to many users of STEVIE who have sent in their changes.
  533. Many of the changes I've received aren't portable to all the systems
  534. I support, but I'm working to get portable implementations integrated
  535. into the editor where possible.
  536. .P
  537. If you're reading this file, but didn't get the source code for STEVIE,
  538. it can be had by sending a disk with return postage to the address given
  539. below. I can write disks for the Atari ST (SS or DS) or MSDOS (360K or
  540. 1.2M). Please be sure to include the return postage. I don't intend to
  541. make money from this program, but I don't want to lose any either.
  542. .DS 1
  543. Tony Andrews        UUCP: onecom!wldrdg!tony
  544. 5902E Gunbarrel Ave.
  545. Boulder, CO 80301
  546. .DE
  547. .DS 1
  548. 3.69a Additions from
  549. Dave Tutelman           UUCP: pegasus.att.com!dmt
  550. Larry Shurr (The BIOS implementation)
  551. .DE
  552. .SK
  553. .HU "Character Function Summary"
  554. The following list describes the meaning of each character that's used
  555. by the editor. In some cases characters have meaning in both command and
  556. insert mode; these are all described.
  557. .SP 2
  558. .VL 8
  559. .LI ^@
  560. The null character. Not used in any mode. This character may not
  561. be present in the file, as is the case with vi.
  562. .LI ^B
  563. Backward one screen.
  564. .LI ^D
  565. Scroll the window down one half screen.
  566. .LI ^E
  567. Scroll the screen up one line.
  568. .LI ^F
  569. Forward one screen.
  570. .LI ^G
  571. Same as ":f" command. Displays file information.
  572. .LI ^H
  573. (Backspace) Moves cursor left one space in command mode.
  574. In insert mode, erases the last character typed.
  575. .LI ^J
  576. Move the cursor down one line.
  577. .LI ^L
  578. Clear and redraw the screen.
  579. .LI ^M
  580. (Carriage return) Move to the first non-white character
  581. in the next line. In insert mode, a carriage return opens a new
  582. line for input.
  583. .LI ^N
  584. Move the cursor down a line.
  585. .LI ^P
  586. Move the cursor up a line.
  587. .LI ^U
  588. Scroll the window up one half screen.
  589. .LI ^Y
  590. Scroll the screen down one line.
  591. .LI ^[
  592. Escape cancels a pending command in command mode, and is used to
  593. terminate insert mode.
  594. .LI ^]
  595. Moves to the tag whose name is given by the word in which the cursor
  596. resides.
  597. .LI ^`
  598. Same as ":e #" if supported (system-dependent).
  599. .LI SPACE
  600. Move the cursor right on column.
  601. .LI !
  602. The filter operator always operates on a range of lines, passing the
  603. lines as input to a program, and replacing them with the output of the
  604. program. The shorthand command "!!" can be used to filter a number of
  605. lines (specified by a preceding count). The command "!" is replaced
  606. by the last command used, so "!!!<RETURN>" runs the given number of
  607. lines through the last specified command.
  608. .LI $
  609. Move to the end of the current line.
  610. .LI %
  611. If the cursor rests on a paren '()', brace '{}', or bracket '[]',
  612. move to the matching one.
  613. .LI \'
  614. Used to move the cursor to a previously marked position, as
  615. in 'a or 'b. The cursor moves to the start of the marked line. The
  616. special mark '' refers to the "previous context".
  617. .LI +
  618. Same as carriage return, in command mode.
  619. .LI ,
  620. Reverse of the last t, T, f, or F command.
  621. .LI -
  622. Move to the first non-white character in the previous line.
  623. .LI .
  624. Repeat the last edit command.
  625. .LI /
  626. Start of a forward string search command. String searches may be
  627. optionally terminated with a closing slash. To search for a slash
  628. use '\\/' in the search string.
  629. .LI 0
  630. Move to the start of the current line. Also used within counts.
  631. .LI 1-9
  632. Used to add 'count' prefixes to commands.
  633. .LI :
  634. Prefix character for "ex" commands.
  635. .LI ;
  636. Repeat last t, T, f, or F command.
  637. .LI <
  638. The 'left shift' operator.
  639. .LI >
  640. The 'right shift' operator.
  641. .LI ?
  642. Same as '/', but search backward.
  643. .LI A
  644. Append at the end of the current line.
  645. .LI B
  646. Backward one blank-delimited word.
  647. .LI C
  648. Change the rest of the current line.
  649. .LI D
  650. Delete the rest of the current line.
  651. .LI E
  652. End of the end of a blank-delimited word.
  653. .LI F
  654. Find a character backward on the current line.
  655. .LI G
  656. Go to the given line number (end of file, by default).
  657. .LI H
  658. Move to the first non-white char. on the top screen line.
  659. .LI I
  660. Insert before the first non-white char. on the current line.
  661. .LI J
  662. Join two lines.
  663. .LI L
  664. Move to the first non-white char. on the bottom screen line.
  665. .LI M
  666. Move to the first non-white char. on the middle screen line.
  667. .LI N
  668. Reverse the last string search.
  669. .LI O
  670. Open a new line above the current line, and start inserting.
  671. .LI P
  672. Put the yank/delete buffer before the current cursor position.
  673. .LI R
  674. Replace characters until an "escape" character is received.
  675. Similar to insert mode, but replaces instead of inserting.
  676. Typing a newline in replace mode is the same as in insert mode,
  677. but replacing continues on the new line.
  678. .LI T
  679. Reverse search 'upto' the given character.
  680. .LI U
  681. Restore the current line to its state before you started changing it.
  682. .LI W
  683. Move forward one blank-delimited word.
  684. .LI X
  685. Delete one character before the cursor.
  686. .LI Y
  687. Yank the current line. Same as 'yy'.
  688. .LI ZZ
  689. Exit from the editor, saving changes if necessary.
  690. .LI [[
  691. Move backward one C function.
  692. .LI ]]
  693. Move forward one C function.
  694. .LI ^
  695. Move to the first non-white on the current line.
  696. .LI `
  697. Move to the given mark, as with '. The distinction between the two
  698. commands is important when used with operators. I support the
  699. difference correctly. If you don't know what I'm talking about,
  700. don't worry, it won't matter to you.
  701. .LI a
  702. Append text after the cursor.
  703. .LI b
  704. Back one word.
  705. .LI c
  706. The change operator.
  707. .LI d
  708. The delete operator.
  709. .LI e
  710. Move to the end of a word.
  711. .LI f
  712. Find a character on the current line.
  713. .LI h
  714. Move left one column.
  715. .LI i
  716. Insert text before the cursor.
  717. .LI j
  718. Move down one line.
  719. .LI k
  720. Move up one line.
  721. .LI l
  722. Move right one column.
  723. .LI m
  724. Set a mark at the current position (e.g. ma or mb).
  725. .LI n
  726. Repeat the last string search.
  727. .LI o
  728. Open a new line and start inserting text.
  729. .LI p
  730. Put the yank/delete buffer after the cursor.
  731. .LI r
  732. Replace a character.
  733. .LI s
  734. Replace characters.
  735. .LI t
  736. Move forward 'upto' the given character on the current line.
  737. .LI u
  738. Undo the last edit.
  739. .LI w
  740. Move forward one word.
  741. .LI x
  742. Delete the character under the cursor.
  743. .LI y
  744. The yank operator.
  745. .LI z
  746. Redraw the screen with the current line at the top (zRETURN),
  747. the middle (z.), or the bottom (z-).
  748. .LI |
  749. Move to the column given by the preceding count.
  750. .LI ~
  751. Invert the case of the current character (if alpha) and move to the right.
  752. If the parameter "tildeop" is set, this command functions as an operator.
  753. .LE
  754. .de TX
  755. .ce
  756. STEVIE - User Guide
  757. .sp
  758. ..
  759. .TC
  760.