home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / stevie.lha / stevie.doc < prev   
Text File  |  1988-12-01  |  12KB  |  435 lines

  1.  
  2.         STEVIE - Simply Try this Editor for VI Enthusiasts
  3.  
  4.              Quick Reference Card
  5.  
  6.                   by
  7.  
  8.               Tony Andrews And G. R. (Fred) Walter
  9.  
  10. STEVIE may be freely distributed. The source isn't copyrighted or
  11. restricted in any way. If you pass the program along, please include all
  12. the documentation and, if practical, the source as well.
  13.  
  14. STEVIE used to stand for 'ST Editor for VI Enthusiasts', however since this
  15. editor is used on more machines than just ST's the acronym was changed.
  16.  
  17. Starting the Editor
  18. -------------------
  19.  
  20. The following command line forms are supported:
  21.  
  22.     vi [file ...]        Edit the specified file(s)
  23.  
  24.     vi -t tag        Start at location of the given tag
  25.  
  26.     vi + file        Edit file starting at end
  27.  
  28.     vi +n file        Edit file starting a line number 'n'
  29.  
  30.     vi +/pat file        Edit file starting at pattern 'pat'
  31.  
  32. If multiple files are given on the command line (using the first form),
  33. the ":n" command goes to the next file, ":p" goes backward in the list,
  34. and ":rew" can be used to rewind back to the start of the file list.
  35.  
  36. Set Command Options
  37. -------------------
  38.  
  39. The ":set" command works as usual to set parameters. Each parameter has
  40. a long and an abbreviated name, either of which may be used. Boolean
  41. parameters are set as in:
  42.  
  43.     set showmatch
  44.  
  45. or cleared by:
  46.  
  47.     set noshowmatch
  48.  
  49. Numeric parameters are set as in:
  50.  
  51.     set scroll=5
  52.  
  53. Several parameters may be set with a single command:
  54.  
  55.     set novb sm report=1
  56.  
  57. To see the status of all parameters use ":set all". Typing ":set" with
  58. no arguments will show only those parameters that have been changed.
  59. The supported parameters, their names, defaults, and descriptions are
  60. shown below:
  61.  
  62. Full Name    Short    Default        Description
  63. ------------------------------------------------------------------------------
  64. vbell        vb    vb        Use visual bell (novb for audible bell)
  65. showmatch    sm    nosm        Showmatch mode
  66. wrapscan    ws    ws        Wrapscan (searches cross file start/end)
  67. errorbells    eb    noeb        Ring bell when error messages are shown
  68. showmode    mo    nomo        Show on status line when in insert mode
  69. backup        bk    nobk        Leave backup in *.bak on file writes
  70. return        cr    cr        End lines with cr-lf when writing
  71. list        list    nolist        Show tabs and newlines graphically
  72.  
  73. scroll        scroll    12        Number of lines to scroll for ^D and ^U
  74. tabstop        ts    8        Number of spaces in a tab
  75. report        report    5        Min # of lines to report operations on
  76. lines        lines    25        Number of lines on the screen
  77.  
  78.  
  79. The EXINIT environment variable can be used to modify the default values
  80. on startup as in:
  81.  
  82.         setenv EXINIT="set sm ts=4"
  83.  
  84. The 'backup' parameter, if set, causes the editor to retain a backup of any
  85. files that are written. During file writes, a backup is always kept for
  86. safety until the write is completed. At that point, the 'backup' parameter
  87. determines whether the backup file is deleted.
  88.  
  89. In environments (e.g. OS/2 or TOS) where lines are normally terminated by
  90. CR-LF, the 'return' parameter allows files to be written with only a LF
  91. terminator (if the parameter is cleared).
  92.  
  93. The 'lines' parameter tells the editor how many lines there are on the screen.
  94. This is useful on systems like the ST where various screen resolutions may be
  95. used. By using the 'lines' parameter, different screen sizes can be easily
  96. handled. On the Amiga system window resizes are atomatically detected and
  97. acted upon. It is suggested that one's window be larger than 2 rows and 5
  98. columns.
  99.  
  100.  
  101. File Manipulation Commands
  102. --------------------------
  103.  
  104. :w        write the current file
  105. :wq        write and quit
  106. :x        write (if necessary) and quit
  107. ZZ        same as ":x"
  108.  
  109. :e file        edit the named file
  110. :e!        re-edit the current file, discarding any changes
  111. :e #        edit the alternate file
  112.  
  113. :w file        write the buffer to the named file
  114. :x,y w file    write lines x through y to the named file
  115. :r file        read the named file into the buffer
  116.  
  117. :n        edit the next file
  118. :p        edit the previous file
  119. :rew        rewind the file list
  120.  
  121. :f        show the current file name
  122. :f name        change the current file name
  123.  
  124. :ta tag        go to the named tag
  125. ^]        like ":ta" using the current word as the tag
  126.  
  127. :help        display a command summary
  128.  
  129. The ":help" command can also be invoke with the <HELP> key on the Atari ST
  130. or the Amiga. This actually displays a pretty complete summary of the real vi
  131. with unsupported features indicated appropriately.
  132.  
  133. The commands above work pretty much like they do in 'vi'. Most of the
  134. commands support a '!' suffix (if appropriate) to discard any pending
  135. changes.
  136.  
  137. When writing just part of the buffer, the following address forms are
  138. supported:
  139.  
  140.         addr [+- number]
  141.  
  142. where 'addr' may be one of the following:
  143.  
  144.         a line number
  145.         a mark (as in 'a or 'b)
  146.         '.' (the current line)
  147.         '$' (the last line)
  148.  
  149.  
  150. String Searches
  151. ---------------
  152.  
  153. String searches are supported, as in vi, accepting the usual regular
  154. expression syntax. This was done using Henry Spencer's regular expression
  155. library without modification. Tony Andrews added code outside the library to
  156. support the '\<' and '\>' extensions.
  157.  
  158. Operators
  159. ---------
  160.  
  161. The vi operators (d, c, y, <, and >) work as true operators.
  162.  
  163. Tags
  164. ----
  165.  
  166. Tags are implemented.
  167.  
  168. System-Specific Comments
  169. ------------------------
  170.  
  171. The following sections provide additional relevant information for the
  172. systems to which STEVIE has been ported.
  173.  
  174. Atari ST
  175. --------
  176.  
  177. The editor has been tested in all three resolutions, although low and
  178. high res. are less tested than medium. The 50-line high res. mode can
  179. be used by setting the 'lines' parameter to 50. Alternatively, the
  180. environment variable 'LINES' can be set. The editor doesn't actively
  181. set the number of lines on the screen. It just operates using the number
  182. of lines it was told.
  183.  
  184. The arrow keys, as well as the <INSERT>, <HELP>, and <UNDO> keys are
  185. all mapped appropriately.
  186.  
  187. UNIX
  188. ----
  189.  
  190. The editor has been ported to UNIX System V release 3. This was done
  191. mainly to get some profiling data so I haven't put much effort into
  192. doing the UNIX version right. It's hard-coded for ansi-style escape
  193. sequences and doesn't use the termcap/terminfo routines at all.
  194.  
  195. OS/2
  196. ----
  197.  
  198. This port was done because the editor that comes with the OS/2 developer's
  199. kit really sucks. Make sure 'ansi' mode is on (using the 'ansi' command).
  200. The OS/2 ansi driver doesn't support insert/delete line, so the display
  201. updates are a little rough, but the editor is fast enough that it isn't
  202. too bothersome. The arrow keys are NOT mapped, so they don't currently do
  203. anything reasonable.
  204.  
  205. BSD 4.3
  206. -------
  207.  
  208. This port was done so it could be worked on in a main-frame enviroment.
  209.  
  210. Amiga
  211. -----
  212.  
  213. The arrow keys and the help key are supported, as is window re-sizing.
  214. It is strongly suggested that you not try to type in console commands
  215. (alt-esc in some keymaps, plus the appropriate other keys) since STEVIE
  216. captures all console input. If you do type alt-esc then typing '|' will
  217. return you to STEVIE.
  218.  
  219. Missing Features
  220. ----------------
  221.  
  222. 1. Macros with support for function keys.
  223.  
  224. 2. More "set" options.
  225.  
  226. 3. Auto-indent.
  227.  
  228. 4. Many others...
  229.  
  230. Known Bugs and Problems
  231. -----------------------
  232.  
  233. 1. The yank buffer uses statically allocated memory, so yanks of more than
  234.    5K of text will fail. If a delete spans more than 5K, the program asks
  235.    for confirmation before proceeding. That way, if you were moving text,
  236.    you don't get screwed by the limited yank buffer. You just have to move
  237.    smaller chunks at a time. All the internal buffers (yank, redo, etc.)
  238.    need to be reworked to allocate memory dynamically.
  239.  
  240. 2. If you stay in insert mode for a long time (around 5K's worth of
  241.    characters, including newlines) the insert buffer can overflow.
  242.    When this happens you lose your ability to automatically undo the text just
  243.    inserted and the redo/undo/(undo of undo) buffers are reset to the
  244.    current position.
  245.  
  246. 3. Several other less bothersome glitches...
  247.  
  248. Character Function Summary
  249. --------------------------
  250.  
  251. The following list describes the meaning of each character that's used
  252. by the editor. In some cases characters have meaning in both command and
  253. insert mode; these are all described.
  254.  
  255. ^@    The null character. Not used in any mode. This character may not
  256.     be present in the file, as is the case with vi.
  257.  
  258. ^B    Backward one screen.
  259.  
  260. ^D    Scroll the window down one half screen.
  261.  
  262. ^E    Scroll the screen up one line.
  263.  
  264. ^F    Forward one screen.
  265.  
  266. ^G    Same as ":f" command. Displays file information.
  267.  
  268. ^H (BS)    Moves cursor left one space in command mode. In insert mode, erases
  269.     the last character typed.
  270.  
  271. ^J    Move the cursor down one line.
  272.  
  273. ^L    Clear and redraw the screen.
  274.  
  275. ^M (CR)    Move to the first non-white character in the next line. In insert
  276.     mode, a carriage return opens a new line for input.
  277.  
  278. ^N    Move the cursor down a line.
  279.  
  280. ^P    Move the cursor up a line.
  281.  
  282. ^U    Scroll the window up one half screen.
  283.  
  284. ^V    Indicates that the next character is should be treated as entered
  285.     and not modified (used to enter control characters, etc.).
  286.  
  287. ^Y    Scroll the screen down one line.
  288.  
  289. ^[    Escape cancels a pending command in command mode, and is used to
  290.     terminate insert mode.
  291.  
  292. ^]    Moves to the tag whose name is given by the word in which the cursor
  293.     resides.
  294.  
  295. ^`    Same as ":e #" if supported (system-dependent).
  296.  
  297. SPACE    Move the cursor right on column.
  298.  
  299. $    Move to the end of the current line.
  300.  
  301. %    If the cursor rests on a paren '()', brace '{}', or bracket '[]',
  302.     move to the matching one.
  303.  
  304. '    Used to move the cursor to a previously marked position, as in
  305.     'a or 'b. The cursor moves to the start of the marked line. The
  306.     special mark '' refers to the "previous context".
  307.  
  308. +    Same as carriage return, in command mode.
  309.  
  310. ,    Reverse of the last t, T, f, or F command.
  311.  
  312. -    Move to the first non-white character in the previous line.
  313.  
  314. .    Repeat the last edit command.
  315.  
  316. /    Start of a forward string search command. String searches may be
  317.     optionally terminated with a closing slash. To search for a slash
  318.     use '\/' in the search string.
  319.  
  320. 0    Move to the start of the current line. Also used within counts.
  321.  
  322. 1-9    Used to add 'count' prefixes to commands.
  323.  
  324. :    Prefix character for "ex" commands.
  325.  
  326. ;    Repeat last t, T, f, or F command.
  327.  
  328. <    The 'left shift' operator.
  329.  
  330. >    The 'right shift' operator.
  331.  
  332. ?    Same as '/', but search backward.
  333.  
  334. A    Append at the end of the current line.
  335.  
  336. B    Backward one blank-delimited word.
  337.  
  338. C    Change the rest of the current line.
  339.  
  340. D    Delete the rest of the current line.
  341.  
  342. E    End of the end of a blank-delimited word.
  343.  
  344. F    Find a character backward on the current line.
  345.  
  346. G    Go to the given line number (end of file, by default).
  347.  
  348. H    Move to the first non-white char. on the top screen line.
  349.  
  350. I    Insert before the first non-white char. on the current line.
  351.  
  352. J    Join two lines.
  353.  
  354. L    Move to the first non-white char. on the bottom screen line.
  355.  
  356. M    Move to the first non-white char. on the middle screen line.
  357.  
  358. N    Reverse the last string search.
  359.  
  360. O    Open a new line above the current line, and start inserting.
  361.  
  362. P    Put the yank/delete buffer before the current cursor position.
  363.  
  364. T    Reverse search 'upto' the given character.
  365.  
  366. W    Move forward one blank-delimited word.
  367.  
  368. X    Delete one character before the cursor.
  369.  
  370. Y    Yank the current line. Same as 'yy'.
  371.  
  372. ZZ    Exit from the editor, saving changes if necessary.
  373.  
  374. [[    Move backward one C function.
  375.  
  376. ]]    Move forward one C function.
  377.  
  378. ^    Move to the first non-white on the current line.
  379.  
  380. `    Move to the given mark, as with '. The distinction between the two
  381.     commands is important when used with operators. I support the
  382.     difference correctly. If you don't know what I'm talking about,
  383.     don't worry, it won't matter to you.
  384.  
  385. ~       Switch case of character under cursor.
  386.  
  387. a    Append text after the cursor.
  388.  
  389. b    Back one word.
  390.  
  391. c    The change operator.
  392.  
  393. d    The delete operator.
  394.  
  395. e    Move to the end of a word.
  396.  
  397. f    Find a character on the current line.
  398.  
  399. h    Move left one column.
  400.  
  401. i    Insert text before the cursor.
  402.  
  403. j    Move down one line.
  404.  
  405. k    Move up one line.
  406.  
  407. l    Move right one column.
  408.  
  409. m    Set a mark at the current position (e.g. ma or mb).
  410.  
  411. n    Repeat the last string search.
  412.  
  413. o    Open a new line and start inserting text.
  414.  
  415. p    Put the yank/delete buffer after the cursor.
  416.  
  417. r    Replace a character.
  418.  
  419. s    Replace characters.
  420.  
  421. t    Move forward 'upto' the given character on the current line.
  422.  
  423. u    Undo the last edit.
  424.  
  425. w    Move forward one word.
  426.  
  427. x    Delete the character under the cursor.
  428.  
  429. y    The yank operator.
  430.  
  431. z    Redraw the screen with the current line at the top (zRETURN),
  432.     the middle (z.), or the bottom (z-).
  433.  
  434. |    Move to the column given by the preceding count.
  435.