home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2200 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  70.9 KB

  1. From: kirkenda@eecs.cs.pdx.edu (Steve Kirkendall)
  2. Newsgroups: alt.sources
  3. Subject: Elvis 1.4, part 1 of 8
  4. Message-ID: <825@pdxgate.UUCP>
  5. Date: 3 Dec 90 21:27:35 GMT
  6.  
  7. Elvis is a clone of vi/ex, the standard UNIX editor.  Elvis supports nearly
  8. all of the vi/ex commands, in both visual mode and colon mode.
  9.  
  10. Elvis runs under BSD UNIX, AT&T SysV UNIX, SCO Xenix, Minix, MS-DOS, Atari TOS,
  11. OS9/68000, and Coherent.  Ports to other operating systems are in progress;
  12. contact me before you start porting it to some other OS, because somebody else
  13. may have already done it for you.
  14.  
  15. Elvis is freely redistributable, in either source form or executable form.
  16. There are no restrictions on how you may use it.
  17.  
  18. The documentation will reside in a subdirectory called "doc".  On some systems,
  19. you may need to create this directory before you can extract the documentation.
  20. The "doc/*.man" files are UNIX-style man pages; they are meant to be processed
  21. by "nroff -man".  The "doc/*.doc" files are all chapters of the manual.  They
  22. have already been formatted, and they contain Epson-compatible escape sequences
  23. to control type styles.  A program called "refont" is included for stripping
  24. these out, if necessary.
  25.  
  26. The file named "Makefile.mix" is used for all systems except MS-DOS.  You
  27. should copy "Makefile.mix" to "Makefile", and then edit "Makefile" to select
  28. the appropriate group of settings for your system.
  29.  
  30.  
  31. Author: Steve Kirkendall
  32.  
  33. E-mail:    kirkenda@cs.pdx.edu
  34.  
  35. Snail    14407 SW Teal Blvd.  Apt.C
  36.  Mail:    Beaverton, OR   97005
  37.  
  38. Phone:    (503) 643-6980
  39. : ------------------------ CUT HERE --------------------
  40. test -d doc || mkdir doc || exit 2
  41.  
  42. if test -f README -a "$1" != -f
  43. then
  44. echo Will not overwrite README
  45. else
  46. echo Extracting README
  47. sed 's/^X//' >README <<\eof
  48. XElvis is a clone of vi/ex, the standard UNIX editor.  Elvis supports nearly
  49. Xall of the vi/ex commands, in both visual mode and colon mode.
  50. X
  51. XElvis runs under BSD UNIX, AT&T SysV UNIX, SCO Xenix, Minix, MS-DOS, Atari TOS,
  52. XOS9/68000, and Coherent.  Ports to other operating systems are in progress;
  53. Xcontact me before you start porting it to some other OS, because somebody else
  54. Xmay have already done it for you.
  55. X
  56. XElvis is freely redistributable, in either source form or executable form.
  57. XThere are no restrictions on how you may use it.
  58. X
  59. XThe documentation will reside in a subdirectory called "doc".  On some systems,
  60. Xyou may need to create this directory before you can extract the documentation.
  61. XThe "doc/*.man" files are UNIX-style man pages; they are meant to be processed
  62. Xby "nroff -man".  The "doc/*.doc" files are all chapters of the manual.  They
  63. Xhave already been formatted, and they contain Epson-compatible escape sequences
  64. Xto control type styles.  A program called "refont" is included for stripping
  65. Xthese out, if necessary.
  66. X
  67. XThe file named "Makefile.mix" is used for all systems except MS-DOS.  You
  68. Xshould copy "Makefile.mix" to "Makefile", and then edit "Makefile" to select
  69. Xthe appropriate group of settings for your system.
  70. X
  71. X
  72. XAuthor: Steve Kirkendall
  73. X
  74. XE-mail:    kirkenda@cs.pdx.edu
  75. X
  76. XSnail    14407 SW Teal Blvd.  Apt.C
  77. X Mail:    Beaverton, OR   97005
  78. X
  79. XPhone:    (503) 643-6980
  80. eof
  81. if test `wc -c <README` -ne 1379
  82. then
  83. echo README damaged!
  84. fi
  85. fi
  86.  
  87. if test -f KNOWN.BUGS -a "$1" != -f
  88. then
  89. echo Will not overwrite KNOWN.BUGS
  90. else
  91. echo Extracting KNOWN.BUGS
  92. sed 's/^X//' >KNOWN.BUGS <<\eof
  93. X(These are sorted by how irritating they are.  The worst bugs are at the top.)
  94. X
  95. X- It is impossible to edit or view the same file more than once.  It is
  96. X  also impossible to invoke Elvis twice with no arguments when in the same
  97. X  directory.  This is caused by the way the temp file is named based on ".",
  98. X  see function tmpstart() in tmp.c.
  99. X
  100. X- Inserting characters to make a line longer than BLKSIZE-1 (including the
  101. X  newline) causes a crash.  BLKSIZE is 1024 by default.  The shift-J and :join
  102. X  commands protect against this, but something like "9999a!<Esc>" will make
  103. X  Elvis misbehave.  Also, huge files (more than about 500k) cannot be edited.
  104. X
  105. X- autoindent is confusingly different from vi when editing typical
  106. X  indented C code - e.g. after <ESC>o<ESC>xxxxxxxxxxi (x's to column 1)
  107. X  the last i indents again.
  108. X
  109. X  ^U backspaces to the beginning of the line, but it should only backspace to
  110. X  the start of auto-indent.  (A second ^U could reasonably delete the indent
  111. X  too)
  112. X
  113. X- The :@ and :source commands share a single buffer.  This means that they
  114. X  can't call each other.  You can't run :source from within your .exrc file
  115. X  either, for the same reason.
  116. X
  117. X- Commands which delete text before the cursor, such as `dB', don't move the
  118. X  cursor, but they should.  
  119. X
  120. X- Using the substitute command, it is not possible to replace with multi-
  121. X  line text using the ^V^M construct in the replacement string.  Vi allows
  122. X  this as a special case.
  123. X
  124. X- The Elvis.prj file (used by Turbo-C under MS-DOS) does not force large model
  125. X  and the text segment is > 64K.
  126. X
  127. X- The visual "put" commands can't be repeated by hitting ".".
  128. X
  129. X- "!!ls %" doesn't expand %
  130. X
  131. X- Sideways scrolling is unacceptable for slow terminals.
  132. X
  133. X- The ":set number" option is missing, among other things.
  134. X
  135. X- In DOS, the default colors are not very good.
  136. eof
  137. if test `wc -c <KNOWN.BUGS` -ne 1818
  138. then
  139. echo KNOWN.BUGS damaged!
  140. fi
  141. fi
  142.  
  143. if test -f doc/intro.doc -a "$1" != -f
  144. then
  145. echo Will not overwrite doc/intro.doc
  146. else
  147. echo Extracting doc/intro.doc
  148. sed 's/^X//' >doc/intro.doc <<\eof
  149. X
  150. X     Elvis 1.4                  INTRODUCTION                    Page 1-1
  151. X
  152. X
  153. XE1.  INTRODUCTIONF
  154. X
  155. X        Elvis is  a  clone  of  vi/ex,  the standard UNIX editor.  Elvis
  156. X     supports nearly all of the vi/ex commands, in both visual mode  and
  157. X     colon mode.  
  158. X
  159. X        Like  vi/ex,  elvis stores most of the text in a temporary file,
  160. X     instead of RAM.  This allows it to edit files that are too large to 
  161. X     fit in a single process' data space.  
  162. X
  163. X        Elvis runs under BSD UNIX, AT&T SysV UNIX, Minix, MS-DOS,  Atari
  164. X     TOS, Coherent,  and OS9/68000.  The next version is expected to add
  165. X     OS/2, VMS, AmigaDos, and  MacOS.    Contact  me  before  you  start
  166. X     porting it to some other OS, because somebody else may have already 
  167. X     done it for you.  
  168. X
  169. X        Elvis  is  freely  redistributable,  in  either  source  form or
  170. X     executable form.  There are no restrictions on how you may use it.  
  171. X
  172. X
  173. X   E1.1  CompilingF
  174. X
  175. X        See the "Versions" section of this manual  for  instructions  on
  176. X     how to compile Elvis.  
  177. X
  178. X        If  you want to port Elvis to another O.S. or compiler, then you
  179. X     should read the "Portability" part of the "Internal" section.  
  180. X
  181. X
  182. X   E1.2  Overview of ElvisF
  183. X
  184. X        The user interface of elvis/vi/ex is weird.  There are two major 
  185. X     command modes in Elvis, and a few text input modes as well.    Each
  186. X     command  mode has a command which allows you to switch to the other
  187. X     mode.  
  188. X
  189. X        You will probably use the 4visual command mode5 most of the  time.
  190. X     This is the mode that elvis normally starts up in.  
  191. X
  192. X        In  visual  command mode, the entire screen is filled with lines
  193. X     of text from your file.  Each keystroke is interpretted as part  of
  194. X     a visual  command.    If  you  start  typing  text,  it will -1not-0 be
  195. X     inserted, it will be treated as part of a command.  To insert text, 
  196. X     you must first give an "insert text" command.  This will take  some
  197. X     getting used to.    (An alternative exists.  Lookup the "inputmode"
  198. X     option.) 
  199. X
  200. X        The 4colon mode5  is  quite  different.    Elvis  displays  a  ":"
  201. X     character on  the  bottom line of the screen, as a prompt.  You are
  202. X     then expected to type in a command line and hit the  <Return>  key.
  203. X     The  set of commands recognized in the colon mode is different from
  204. X     visual mode's.  
  205. X
  206. X
  207. X
  208. X
  209. X
  210. X
  211. X
  212. X
  213. X
  214. X
  215. eof
  216. if test `wc -c <doc/intro.doc` -ne 2383
  217. then
  218. echo doc/intro.doc damaged!
  219. fi
  220. fi
  221.  
  222. if test -f doc/visual.doc -a "$1" != -f
  223. then
  224. echo Will not overwrite doc/visual.doc
  225. else
  226. echo Extracting doc/visual.doc
  227. sed 's/^X//' >doc/visual.doc <<\eof
  228. X
  229. X     Elvis 1.4              VISUAL MODE COMMANDS                Page 2-1
  230. X
  231. X
  232. XE2.  VISUAL MODE COMMANDSF
  233. X
  234. X        Most visual mode commands are one keystroke long.  The following 
  235. X     table  lists  the  operation  performed by each keystroke, and also
  236. X     denotes any options or arguments that it accepts.  Notes at the end 
  237. X     of the table describe the notation used in this table.  
  238. X
  239. X        In addition to the keys listed  here,  your  keyboard's  "arrow"
  240. X     keys  will  be  interpretted  as  the  appropriate  cursor movement
  241. X     commands.  The same goes for <PgUp> and <PgDn>,  if  your  keyboard
  242. X     has them.    There  is a colon mode command (to be described later)
  243. X     which will allow you to define other keys, such as function keys.  
  244. X
  245. X        A tip: visual command mode looks a lot like text input mode.  If 
  246. X     you forget which mode you're in, just hit the <Esc> key.  If  elvis
  247. X     beeps, then you're in visual command mode.  If elvis does not beep, 
  248. X     then  you  were  in  input mode, but by hitting <Esc> you will have
  249. X     switched to visual command mode.  So, one  way  or  another,  after
  250. X     <Esc> elvis will be ready for a command.  
  251. X
  252. X-1command         description                                             type-0
  253. X        ^A      ---
  254. X        ^B      Move toward the top of the file by 1 screenful
  255. X        ^C      ---
  256. Xcount   ^D      scroll down <count> lines (default 1/2 screen)
  257. Xcount   ^E      scroll up <count> lines
  258. X        ^F      move toward the bottom of the file by 1 screenful
  259. X        ^G      show file status, and the current line #
  260. Xcount   ^H      move left, like h                                       MOVE
  261. X        ^I      ---
  262. Xcount   ^J      move down                                               MOVE
  263. X        ^K      ---
  264. X        ^L      redraw the screen
  265. Xcount   ^M      move to the front of the next line                      MOVE
  266. Xcount   ^N      move down                                               MOVE
  267. X        ^O      ---
  268. Xcount   ^P      move up                                                 MOVE
  269. X        ^Q      ---
  270. X        ^R      redraw the screen
  271. X        ^S      ---
  272. X        ^T      ---
  273. Xcount   ^U      scroll up <count> lines (default 1/2 screen)
  274. X        ^V      ---
  275. X        ^W      ---
  276. X        ^X      ---
  277. Xcount   ^Y      scroll down <count> lines
  278. X        ^Z      ---
  279. X        ESC     ---
  280. X        ^\      ---
  281. X        ^]      if the cursor is on a tag name, go to that tag
  282. X        ^^      switch to the previous file, like ":e #"
  283. X        ^_      ---
  284. Xcount   SPC     move right,like l                                       MOVE
  285. X         ! mv   run the selected lines thru an external filter program
  286. X         " key  select which cut buffer to use next
  287. Xcount    # +    increment a number                                      EDIT
  288. X         $      move to the rear of the current line                    MOVE
  289. X         %      move to the matching (){}[] character                   MOVE
  290. X
  291. X
  292. X
  293. X
  294. X
  295. X     Elvis 1.4              VISUAL MODE COMMANDS                Page 2-2
  296. X
  297. X
  298. Xcount    &      repeat the previous ":s//" command here                 EDIT
  299. X         ' key  move to a marked line                                   MOVE
  300. Xcount    (      move backward <count> sentences                         MOVE
  301. Xcount    )      move forward <count> sentences                          MOVE
  302. X         *      go to the next error in the errlist
  303. Xcount    +      move to the front of the next line                      MOVE
  304. Xcount    ,      repeat the previous [fFtT] but in the other direction   MOVE
  305. Xcount    -      move to the front of the preceding line                 MOVE
  306. Xcount    .      repeat the previous "edit" command
  307. X         / text search forward for a given regular expression           MOVE
  308. X         0      if not part of count, move to 1st char of this line     MOVE
  309. X         1      part of count
  310. X         2      part of count
  311. X         3      part of count
  312. X         4      part of count
  313. X         5      part of count
  314. X         6      part of count
  315. X         7      part of count
  316. X         8      part of count
  317. X         9      part of count
  318. X         : text run single EX cmd
  319. Xcount    ;      repeat the previous [fFtT] cmd                          MOVE
  320. X         < mv   shift text left                                         EDIT
  321. X         =      ---
  322. X         > mv   shift text right                                        EDIT
  323. X         ? text search backward for a given regular expression          MOVE
  324. X         @ key  execute the contents of a cut-buffer as VI commands
  325. Xcount    A inp  append at end of the line                               EDIT
  326. Xcount    B      move back Word                                          MOVE
  327. X         C inp  change text from the cursor through the end of the line EDIT
  328. X         D      delete text from the cursor through the end of the line EDIT
  329. Xcount    E      move end of Word                                        MOVE
  330. Xcount    F key  move leftward to a given character                      MOVE
  331. Xcount    G      move to line #<count> (default is the bottom line)      MOVE
  332. Xcount    H      move to home row (the line at the top of the screen)
  333. Xcount    I inp  insert at the front of the line (after indents)         EDIT
  334. Xcount    J      join lines, to form one big line                        EDIT
  335. X         K      look up keyword
  336. Xcount    L      move to last row (the line at the bottom of the screen)
  337. X         M      move to middle row
  338. X         N      repeat previous search, but in the opposite direction   MOVE
  339. Xcount    O inp  open up a new line above the current line               EDIT
  340. X         P      paste text before the cursor
  341. X         Q      quit to EX mode
  342. X         R inp  overtype                                                EDIT
  343. Xcount    S inp  change lines, like <count>cc
  344. Xcount    T key  move leftward *almost* to a given character             MOVE
  345. X         U      Undo all recent changes to the current line
  346. X         V      ---
  347. Xcount    W      move forward <count> Words                              MOVE
  348. Xcount    X      delete the character(s) to the left of the cursor       EDIT
  349. Xcount    Y      yank text line(s) (copy them into a cut buffer)
  350. X         Z Z    save the file & exit
  351. X         [ [    move back 1 section                                     MOVE
  352. X         \      ---
  353. X         ] ]    move forward 1 section                                  MOVE
  354. X         ^      move to the front of the current line (after indent)    MOVE
  355. X         _      ---
  356. X
  357. X
  358. X
  359. X
  360. X
  361. X     Elvis 1.4              VISUAL MODE COMMANDS                Page 2-3
  362. X
  363. X
  364. X         ` key  move to a marked character                              MOVE
  365. Xcount    a inp  insert text after the cursor                            EDIT
  366. Xcount    b      move back <count> words                                 MOVE
  367. X         c mv   change text                                             EDIT
  368. X         d mv   delete text                                             EDIT
  369. Xcount    e      move forward to the end of the current word             MOVE
  370. Xcount    f key  move rightward to a given character                     MOVE
  371. X         g      ---
  372. Xcount    h      move left                                               MOVE
  373. Xcount    i inp  insert text at the cursor                               EDIT
  374. Xcount    j      move down                                               MOVE
  375. Xcount    k      move up                                                 MOVE
  376. Xcount    l      move right                                              MOVE
  377. X         m key  mark a line or character
  378. X         n      repeat the previous search                              MOVE
  379. Xcount    o inp  open a new line below the current line                  EDIT
  380. X         p      paste text after the cursor
  381. X         q      ---
  382. Xcount    r key  replace <count> chars by a given character              EDIT
  383. Xcount    s inp  replace <count> chars with text from the user           EDIT
  384. Xcount    t key  move rightward *almost* to a given character            MOVE
  385. X         u      undo the previous edit command
  386. X         v      ---
  387. Xcount    w      move forward <count> words                              MOVE
  388. Xcount    x      delete the character that the cursor's on               EDIT
  389. X         y mv   yank text (copy it into a cut buffer)
  390. X         z key  scroll current line to the screen's +=top -=bottom .=middle
  391. Xcount    {      move back <count> paragraphs                            MOVE
  392. Xcount    |      move to column <count> (the leftmost column is 1)
  393. Xcount    }      move forward <count> paragraphs                         MOVE
  394. Xcount    ~      switch a character between uppercase & lowercase        EDIT
  395. X        DEL     ---
  396. X--------------------------------------------------------------------------------
  397. X
  398. Xcount   Many commands may be preceded by a count.  This is a sequence of digits
  399. X        representing a decimal number.  For most commands that use a count,
  400. X        the command is repeated <count> times.  The count is always optional,
  401. X        and usually defaults to 1.
  402. X
  403. Xkey     Some commands require two keystrokes.  The first key always determines
  404. X        which command is to be executed.  The second key is used as a parameter
  405. X        to the command.
  406. X
  407. Xmv      Six commands (! < > c d y) operate on text between the cursor and some
  408. X        other position.  To specify that other position, you are expected to
  409. X        follow the command keystroke with a movement command.  Also, you may
  410. X        have the command operate on the whole line that the cursor is on by
  411. X        typing the command key a second time.
  412. X
  413. Xinp     Many commands allow the user to interactively enter text.
  414. X
  415. XEDIT    These commands affect text, and may be repeated by the "." command.
  416. X
  417. XMOVE    These commands move the cursor, and may be used to specify the extent
  418. X        of a member of the "mv" class of commands.
  419. X
  420. X
  421. X
  422. X
  423. X
  424. X
  425. X
  426. X
  427. X     Elvis 1.4              VISUAL MODE COMMANDS                Page 2-4
  428. X
  429. X
  430. X   E2.1  Input ModeF
  431. X
  432. X        You  can't type text into your file directly from visual command
  433. X     mode.  Instead, you must first give a command which  will  put  you
  434. X     into input mode.  The commands to do this are A/C/I/O/R/S/a/i/o/s.  
  435. X
  436. X        The  S/s/C/c  commands  temporarily  place a $ at the end of the
  437. X     text that they are going to change.  
  438. X
  439. X        In input mode, all keystrokes are inserted into the text at  the
  440. X     cursor's position, except for the following: 
  441. X
  442. X                ^A      insert a copy of the last input text
  443. X                ^D      delete one indent character
  444. X                ^H      (backspace) erase the character before the cursor
  445. X                ^L      redraw the screen
  446. X                ^M      (carriage return) insert a newline (^J, linefeed)
  447. X                ^P      insert the contents of the cut buffer
  448. X                ^R      redraw the screen, like ^L
  449. X                ^T      insert an indent character
  450. X                ^U      backspace to the beginning of the line
  451. X                ^V      insert the following keystroke, even if special
  452. X                ^W      backspace to the beginning of the current word
  453. X                ^Z^Z    write the file & exit elvis
  454. X                ^[      (ESCape) exit from input mode, back to command mode
  455. X
  456. X        Also,  on  some  systems,  ^S  may  stop  output, ^Q may restart
  457. X     output, and ^C may interupt execution.    ^@  (the  NUL  character)
  458. X     cannot be inserted.  
  459. X
  460. X        The  R  visual  command  puts  you  in overtype mode, which is a
  461. X     slightly different form of input mode.  In overtype mode, each time 
  462. X     you insert a character, one of the old characters is  deleted  from
  463. X     the file.  
  464. X
  465. X
  466. X   E2.2  Arrow keys in Input ModeF
  467. X
  468. X        The  arrow  keys  can  be used to move the cursor in input mode.
  469. X     (This is an extension; the real Vi doesn't support  arrow  keys  in
  470. X     input  mode.)  The  <PgUp>,  <PgDn>, <Home>, and <End> keys work in
  471. X     input mode, too.  The <Delete> key deletes a  single  character  in
  472. X     input mode.  
  473. X
  474. X        The  best  thing about allowing arrow keys to work in input mode
  475. X     is that as long as you're in input mode,  Elvis  seems  to  have  a
  476. X     fairly ordinary  user interface.  With most other text editors, you
  477. X     are always in either insert mode or replace mode, and you  can  use
  478. X     the arrow  keys at any time to move the cursor.  Now, Elvis can act
  479. X     like that, too.  In fact, with the new "inputmode" option  and  the
  480. X     "control-Z  control-Z" input command, you may never have to go into
  481. X     visual command mode for simple edit sessions.  
  482. X
  483. X
  484. X
  485. X
  486. X
  487. X
  488. X
  489. X
  490. X
  491. X
  492. X
  493. X     Elvis 1.4              VISUAL MODE COMMANDS                Page 2-5
  494. X
  495. X
  496. X   E2.3  DigraphsF
  497. X
  498. X        Elvis supports digraphs as a way to enter non-ASCII  characters.
  499. X     A   digraph   is  a  character  which  is  composed  of  two  other
  500. X     characters.  For example, an apostrophe and the letter i  could  be
  501. X     defined  as  a  digraph  which  is  to  be stored & displayed as an
  502. X     accented i.  
  503. X
  504. X        There is no single standard for extended ASCII  character  sets.
  505. X     Elvis  can  be compiled to fill the digraph with values appropriate
  506. X     for either the IBM PC character set, or the LATIN-1  character  set
  507. X     used by  X windows, or neither.  (See the discussions of -DCS_IBMPC
  508. X     and -DCS_LATIN1 in the CFLAGS section of this manual.) You can view 
  509. X     or edit the digraph table via the ":digraph" colon command.  
  510. X
  511. X        Digraphs wil  not  be  recognized  until  you've  entered  ":set
  512. X     digraph".  
  513. X
  514. X        To  actually  use  a  digraph type the first character, then hit
  515. X     <Backspace>, and then type the second character.  Elvis  will  then
  516. X     substitute the non-ASCII character in their place.  
  517. X
  518. X
  519. X   E2.4  AbbreviationsF
  520. X
  521. X        Elvis can   expand   abbreviations  for  you.    You  define  an
  522. X     abbreviation with the :abbr command, and then whenever you type  in
  523. X     the  abbreviated  form  while in input mode, elvis will immediately
  524. X     the long form.  COBOL programmers should find this useful.  :-) 
  525. X
  526. X        Elvis  doesn't  perform  the  substitution  until  you  type   a
  527. X     non-alphanumeric character  to  mark  the  end of the word.  If you
  528. X     type a control-V before that non-alphanumeric character, then Elvis 
  529. X     will not perform the substitution.  
  530. X
  531. X
  532. X   E2.5  Auto-IndentF
  533. X
  534. X        With  the  ":set  autoindent"  option  turned  on,  Elvis   will
  535. X     automatically  insert  leading  whitespace at the beginning of each
  536. X     new line that you type in.  The leading whitespace is  copied  from
  537. X     the preceding line.  
  538. X
  539. X        To add  more leading whitespace, type control-T.  To remove some
  540. X     whitespace, type control-D.  
  541. X
  542. X        Elvis' autoindent mode isn't 100%  compatible  with  vi's.    In
  543. X     Elvis, 0^D and ^^D don't work, ^U can wipeout all indentation,  and 
  544. X     sometimes  Elvis will use a different amount of indentation than vi
  545. X     would.  
  546. X
  547. X
  548. X
  549. X
  550. X
  551. X
  552. X
  553. X
  554. X
  555. X
  556. X
  557. X
  558. eof
  559. if test `wc -c <doc/visual.doc` -ne 14869
  560. then
  561. echo doc/visual.doc damaged!
  562. fi
  563. fi
  564.  
  565. if test -f doc/ex.doc -a "$1" != -f
  566. then
  567. echo Will not overwrite doc/ex.doc
  568. else
  569. echo Extracting doc/ex.doc
  570. sed 's/^X//' >doc/ex.doc <<\eof
  571. X
  572. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-1
  573. X
  574. X
  575. XE3.  COLON MODE COMMANDSF
  576. X
  577. X        -1lines           command         arguments                    -0
  578. X        [line]          -1a-0ppend
  579. X                        -1ar-0gs            [files]
  580. X                        -1cc-0              [files]
  581. X                        -1cd-0              [directory]
  582. X        [line][,line]   -1c-0hange
  583. X                        -1chd-0ir           [directory]
  584. X        [line][,line]   -1co-0py            line
  585. X        [line][,line]   -1d-0elete          ["x]
  586. X                        -1di-0graph[!]      [XX [Y]]
  587. X                        -1e-0dit[!]         [file]
  588. X                        -1er-0rlist[!]      [errlist]
  589. X                        -1e-0x[!]           [file]
  590. X                        -1f-0ile            [file]
  591. X        [line][,line]   -1g-0lobal          /regexp/ command
  592. X        [line]          -1i-0nsert
  593. X        [line][,line]   -1j-0oin
  594. X        [line][,line]   -1l-0ist
  595. X                        -1mak-0e            [target]
  596. X                        -1ma-0p[!]          key mapped_to
  597. X        [line]          mar-1k-0            x
  598. X                        -1mk-0exrc
  599. X        [line][,line]   -1m-0ove            line
  600. X                        -1n-0ext[!]         [files]
  601. X                        -1N-0ext[!]
  602. X        [line][,line]   -1nu-0mber
  603. X                        -1pre-0vious[!]
  604. X        [line][,line]   -1p-0rint
  605. X        [line]          -1pu-0t             ["x]
  606. X                        -1q-0uit[!]
  607. X        [line]          -1r-0ead            file
  608. X                        -1rew-0ind[!]
  609. X                        -1se-0t             [options]
  610. X                        -1so-0urce          file
  611. X        [line][,line]   -1s-0ubstitute      /regexp/replacement/[p][g][c]
  612. X                        -1ta-0g[!]          tagname
  613. X        [line][,line]   -1t-0o              line
  614. X                        -1u-0ndo
  615. X                        -1unm-0ap[!]        key
  616. X                        -1ve-0rsion
  617. X        [line][,line]   -1v-0global         /regexp/ command
  618. X                        -1vi-0sual
  619. X                        -1wq-0
  620. X        [line][,line]   -1w-0rite[!]        [[>>]file]
  621. X                        -1x-0it[!]
  622. X        [line][,line]   -1y-0ank            ["x]
  623. X        [line][,line]   -1!-0               command
  624. X        [line][,line]   -1<-0
  625. X        [line][,line]   -1=-0
  626. X        [line][,line]   -1>-0
  627. X        [line][,line]   -1&-0
  628. X                        -1@-0               "x
  629. X
  630. X
  631. X
  632. X
  633. X
  634. X
  635. X
  636. X
  637. X
  638. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-2
  639. X
  640. X
  641. X        To  use colon mode commands, you must switch from visual command
  642. X     mode to colon command mode.  The visual mode commands  to  do  this
  643. X     are  ":"  for  a  single  colon command, or "Q" for many colon mode
  644. X     commands.  
  645. X
  646. X
  647. X   E3.1  Line SpecifiersF
  648. X
  649. X        Line specifiers are always optional.  The first  line  specifier
  650. X     of most  commands usually defaults to the current line.  The second
  651. X     line specifier usually defaults to be the same as  the  first  line
  652. X     specifier.  Exceptions are :write, :global, and :vglobal, which act 
  653. X     on all lines of the file by default, and :!, which acts on no lines 
  654. X     by default.  
  655. X
  656. X        Line  specifiers  consist  of  an  absolute  part and a relative
  657. X     part.  The absolute part of a  line  specifier  may  be  either  an
  658. X     explicit  line  number, a mark, a dot to denote the current line, a
  659. X     dollar sign to denote the last line of the file, or  a  forward  or
  660. X     backward search.  
  661. X
  662. X        An explicit line number is simply a decimal number, expressed as 
  663. X     a string of digits.  
  664. X
  665. X        A mark is typed in as an apostrophe followed by a letter.  Marks 
  666. X     must be  set before they can be used.  You can set a mark in visual
  667. X     command mode by typing "m" and a letter, or you can set it in colon 
  668. X     command mode via the "mark" command.  
  669. X
  670. X        A forward search is typed in as a regular expression  surrounded
  671. X     by slash  characters;  searching  begins  at  the  default line.  A
  672. X     backward search is typed in as a regular expression  surrounded  by
  673. X     question  marks;  searching  begins  at the line before the default
  674. X     line.  
  675. X
  676. X        If you omit the absolute part, then the default line is used.  
  677. X
  678. X        The relative part of a line specifier is typed as a "+"  or  "-"
  679. X     character followed  by a decimal number.  The number is added to or
  680. X     subtracted from the absolute part of the line specifier to  produce
  681. X     the final line number.  
  682. X
  683. X        As  a  special  case, the % character may be used to specify all
  684. X     lines of the file.  It is roughly equivelent to saying 1,$.    This
  685. X     can be a handy shortcut.  
  686. X
  687. X        Some examples: 
  688. X
  689. X            :p              print the current line
  690. X            :37p            print line 37
  691. X            :'gp            print the line which contains mark g
  692. X            :/foo/p         print the next line that contains "foo"
  693. X            :$p             print the last line of the file
  694. X            :20,30p         print lines 20 through 30
  695. X            :1,$p           print all lines of the file
  696. X            :%p             print all lines of the file
  697. X            :/foo/-2,+4p    print 5 lines around the next "foo"
  698. X
  699. X
  700. X
  701. X
  702. X
  703. X
  704. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-3
  705. X
  706. X
  707. X   E3.2  Text Entry CommandsF
  708. X
  709. X            [line] append
  710. X            [line][,line] change ["x]
  711. X            [line] insert
  712. X
  713. X        The -1a-0ppend command inserts text after the specified line.  
  714. X
  715. X        The -1i-0nsert command inserts text before the specified line.  
  716. X
  717. X        The  -1c-0hange command copies the range of lines into a cut buffer,
  718. X     deletes them, and inserts new text where the old text used to be.  
  719. X
  720. X        For all of these commands, you indicate  the  end  of  the  text
  721. X     you're inserting by hitting ^D or by entering a line which contains 
  722. X     only a period.  
  723. X
  724. X
  725. X   E3.3  Cut & Paste CommandsF
  726. X
  727. X            [line][,line] delete ["x]
  728. X            [line][,line] yank ["x]
  729. X            [line] put ["x]
  730. X            [line][,line] copy line
  731. X            [line][,line] to line
  732. X            [line][,line] move line
  733. X
  734. X        The  -1d-0elete  command  copies the specified range of lines into a
  735. X     cut buffer, and then deletes them.  
  736. X
  737. X        The -1y-0ank command copies the specified range of lines into a  cut
  738. X     buffer, but does *not* delete them.  
  739. X
  740. X        The  -1pu-0t  command  inserts  text  from  a  cut  buffer after the
  741. X     specified line.  
  742. X
  743. X        The -1co-0py and -1t-0o commands yank the specified range of  lines  and
  744. X     then immediately paste them after some other line.  
  745. X
  746. X        The  -1m-0ove  command deletes the specified range of lines and then
  747. X     immediately pastes them after some other line.  If the  destination
  748. X     line  comes  after  the  deleted  text,  then  it  will be adjusted
  749. X     automatically to account for the deleted lines.  
  750. X
  751. X
  752. X   E3.4  Display Text CommandsF
  753. X
  754. X            [line][,line] print
  755. X            [line][,line] list
  756. X            [line][,line] number
  757. X
  758. X        The -1p-0rint command displays the specified range of lines.  
  759. X
  760. X        The -1nu-0mber command displays the lines, with line numbers.  
  761. X
  762. X
  763. X
  764. X
  765. X
  766. X
  767. X
  768. X
  769. X
  770. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-4
  771. X
  772. X
  773. X        The -1l-0ist command also displays them, but it is careful  to  make
  774. X     control characters visible.  
  775. X
  776. X
  777. X   E3.5  Global Operations CommandsF
  778. X
  779. X            [line][,line] global /regexp/ command
  780. X            [line][,line] vglobal /regexp/ command
  781. X
  782. X        The  -1g-0lobal  command searches through the lines of the specified
  783. X     range (or through the whole file if  no  range  is  specified)  for
  784. X     lines that  contain  a given regular expression.  It then moves the
  785. X     cursor to each of these lines and runs some other command on them.  
  786. X
  787. X        The -1v-0global command is similar, but it searches for  lines  that
  788. X     -1don't-0 contain the regular expression.  
  789. X
  790. X
  791. X   E3.6  Line Editing CommandsF
  792. X
  793. X            [line][,line] join
  794. X            [line][,line] ! program
  795. X            [line][,line] <
  796. X            [line][,line] >
  797. X            [line][,line] substitute /regexp/replacement/[p][g][c]
  798. X            [line][,line] &
  799. X
  800. X        The  -1j-0oin  command  catenates  all  lines in the specified range
  801. X     together to form one big line.  If only a single line is specified, 
  802. X     then the following line is catenated onto it.  
  803. X
  804. X        The -1!-0 command runs an external filter  program,  and  feeds  the
  805. X     specified range  of  lines  to  it's  stdin.    The  lines are then
  806. X     replaced by the output of the filter.  A typical example  would  be
  807. X     ":'a,'z!sort" to sort the lines 'a,'z.  
  808. X
  809. X        The  -1<-0 and -1>-0 commands shift the specified range of lines left or
  810. X     right, normally by the width of 1 tab character.  The  "shiftwidth"
  811. X     option determines the shifting amount.  
  812. X
  813. X        The  -1s-0ubstitute  command  finds  the  regular expression in each
  814. X     line, and replaces it with the replacement text.   The  "p"  option
  815. X     causes the altered lines to be printed.  The "g" option permits all 
  816. X     instances  of  the  regular  expression  to  be  found  & replaced.
  817. X     (Without "g", only the first occurrence in each line is  replaced.)
  818. X     The "c" option asks for confirmation before each substitution.  
  819. X
  820. X        The   -1&-0  command  repeats  the  previous  substitution  command.
  821. X     Actually, "&" is equivelent to "s//~/" with  the  same  options  as
  822. X     last time.    It  searches for the last regular expression that you
  823. X     specified for any purpose, and replaces it with the the  same  text
  824. X     that was used in the previous substitution.  
  825. X
  826. X
  827. X
  828. X
  829. X
  830. X
  831. X
  832. X
  833. X
  834. X
  835. X
  836. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-5
  837. X
  838. X
  839. X   E3.7  Undo CommandF
  840. X
  841. X            undo
  842. X
  843. X        The -1u-0ndo command restores the file to the state it was in before 
  844. X     your most recent command which changed text.  
  845. X
  846. X
  847. X   E3.8  Configuration & Status CommandsF
  848. X
  849. X            map[!] [key mapped_to]
  850. X            unmap[!] key
  851. X            abbr [word expanded_form_of_word]
  852. X            unabbr word
  853. X            digraph[!] [XX [Y]]
  854. X            set [options]
  855. X            mkexrc
  856. X            [line] mark "x
  857. X            visual
  858. X            version
  859. X            [line][,line] =
  860. X            file [file]
  861. X            source file
  862. X            @ "x
  863. X
  864. X        The  -1ma-0p command allows you to configure Elvis to recognize your
  865. X     function keys, and treat them as though they transmitted some other 
  866. X     sequence of characters.  Normally this mapping is done only when in 
  867. X     the visual command mode, but with the [!] present it will map  keys
  868. X     under all  contexts.  When this command is given with no arguments,
  869. X     it prints a table showing all mappings currently in effect.    When
  870. X     called  with  two  arguments,  the  first is the sequence that your
  871. X     function key really sends, and the second is the sequence that  you
  872. X     want Elvis to treat it as having sent.  
  873. X
  874. X        The -1unm-0ap command removes key definitions that were made via the 
  875. X     map command.  
  876. X
  877. X        The   -1ab-0br   command   is   used   to  define/list  a  table  of
  878. X     abbreviations.  The table contains both the  abbreviated  form  and
  879. X     the fully  spelled-out form.  When you're in visual input mode, and
  880. X     you  type  in  the  abbreviated  form,  Elvis  will   replace   the
  881. X     abbreviated form  with  the  fully  spelled-out  form.    When this
  882. X     command is called without arguments, it lists the table;  with  two
  883. X     or  more  arguments, the first argument is taken as the abbreviated
  884. X     form, and the rest of the command line  is  the  fully-spelled  out
  885. X     form.  
  886. X
  887. X        The -1una-0bbr command deletes entries from the abbr table.  
  888. X
  889. X        The  -1di-0graph  command  allows you to display the set of digraphs
  890. X     that Elvis is using, or add/remove a digraph.  To list the  set  of
  891. X     digraphs, use  the  digraph  command  with  no arguments.  To add a
  892. X     digraph, you should give the digraph command two  arguments.    The
  893. X     first argument is the two ASCII characters that are to be combined; 
  894. X     the second  is  the  non-ASCII  character that they represent.  The
  895. X     non-ASCII character's most significant bit is automatically set  by
  896. X     the digraph  command,  unless  to  append a !  to the command name.
  897. X
  898. X
  899. X
  900. X
  901. X
  902. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-6
  903. X
  904. X
  905. X     Removal of a digraph is similar to adding a  digraph,  except  that
  906. X     you should leave off the second argument.  
  907. X
  908. X        The -1se-0t command allows you examine or set various options.  With 
  909. X     no  arguments,  it  displays  the  values of options that have been
  910. X     changed.  With the single argument "all" it displays the values  of
  911. X     all  options,  regardless of whether they've been explicitly set or
  912. X     not.  Otherwise, the arguments are treated as options to be set.  
  913. X
  914. X        The -1mk-0exrc command saves the current  configuration  to  a  file
  915. X     called ".exrc" in the current directory.  
  916. X
  917. X        The  mar-1k-0  command  defines  a named mark to refer to a specific
  918. X     place in the file.  This mark may be used later  to  specify  lines
  919. X     for other commands.  
  920. X
  921. X        The -1vi-0sual command puts the editor into visual mode.  Instead of 
  922. X     emulating ex, Elvis will start emulating vi.  
  923. X
  924. X        The  -1ve-0rsion  command  tells you that what version of Elvis this
  925. X     is.  
  926. X
  927. X        The -1=-0 command tells you what line  you  specified,  or,  if  you
  928. X     specified a range of lines, it will tell you both endpoints and the 
  929. X     number of lines included in the range.  
  930. X
  931. X        The  -1f-0ile command tells you the name of the file, whether it has
  932. X     been modified, the number of lines in the  file,  and  the  current
  933. X     line number.  You can also use it to change the name of the current 
  934. X     file.  
  935. X
  936. X        The  -1so-0urce command reads a sequence of colon mode commands from
  937. X     a file, and interprets them.  
  938. X
  939. X        The -1@-0 command executes  the  contents  of  a  cut-buffer  as  EX
  940. X     commands.  
  941. X
  942. X
  943. X   E3.9  Multiple File CommandsF
  944. X
  945. X            args [files]
  946. X            next[!] [files]
  947. X            Next[!]
  948. X            previous[!]
  949. X            rewind[!]
  950. X
  951. X        When  you  invoke  Elvis  from  your  shell's  command line, any
  952. X     filenames that you give to Elvis as arguments  are  stored  in  the
  953. X     args list.    The  -1ar-0gs command will display this list, or define a
  954. X     new one.  
  955. X
  956. X        The -1n-0ext command switches from the current file to the next  one
  957. X     in the args list.  You may specify a new args list here, too.  
  958. X
  959. X        The  -1N-0ext  and -1pre-0vious commands (they're really aliases for the
  960. X     same command) switch from the current file to the preceding file in 
  961. X     the args list.  
  962. X
  963. X
  964. X
  965. X
  966. X
  967. X
  968. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-7
  969. X
  970. X
  971. X        The -1rew-0ind command switches from the current file to  the  first
  972. X     file in the args list.  
  973. X
  974. X
  975. X   E3.10  Switching FilesF
  976. X
  977. X            edit[!] [file]
  978. X            tag[!] tagname
  979. X
  980. X        The  -1e-0dit command allows to switch from the current file to some
  981. X     other file.  This has nothing to do with  the  args  list,  by  the
  982. X     way.  
  983. X
  984. X        The  -1ta-0g  command  looks  up  a  given  tagname in a file called
  985. X     "tags".  This tells it which file the tag is in, and how to find it 
  986. X     in that file.  Elvis then switches to the tag's file and finds  the
  987. X     tag.  
  988. X
  989. X
  990. X   E3.11  Working with a CompilerF
  991. X
  992. X            cc [files]
  993. X            make [target]
  994. X            errlist[!] [errlist]
  995. X
  996. X        The -1cc-0 and -1mak-0e commands execute your compiler or "make" utility 
  997. X     and redirect  any  error messages into a file called "errlist".  By
  998. X     default, cc is run on the current  file.    (You  should  write  it
  999. X     before  running  cc.)  The  contents of the "errlist" file are then
  1000. X     scanned for error messages.  If an error message is found, then the 
  1001. X     cursor is moved to the line where the error was detected,  and  the
  1002. X     description of the error is displayed on the status line.  
  1003. X
  1004. X        After  you've fixed one error, the -1er-0rlist command will move the
  1005. X     cursor to the next error.  In visual command mode, hitting `*' will 
  1006. X     do this, too.  
  1007. X
  1008. X        You can also create an "errlist" file from outside of Elvis, and 
  1009. X     use "elvis -m" to start elvis and have  the  cursor  moved  to  the
  1010. X     first error.    Note  that you don't need to supply a filename with
  1011. X     "elvis -m" because the error messages always say which source  file
  1012. X     an error is in.  
  1013. X
  1014. X        Note: When you use errlist repeatedly to fix several errors in a 
  1015. X     single file, it will attempt to adjust the reported line numbers to 
  1016. X     allow for   lines  that  you  have  inserted  or  deleted.    These
  1017. X     adjustments are made with the assumption that you will work  though
  1018. X     the file from the beginning to the end.  
  1019. X
  1020. X
  1021. X   E3.12  Exit CommandsF
  1022. X
  1023. X            quit[!]
  1024. X            wq
  1025. X            xit
  1026. X
  1027. X
  1028. X
  1029. X
  1030. X
  1031. X
  1032. X
  1033. X
  1034. X     Elvis 1.4               COLON MODE COMMANDS                Page 3-8
  1035. X
  1036. X
  1037. X        The  -1q-0uit  command  exits  from  the  editor without saving your
  1038. X     file.  
  1039. X
  1040. X        The -1wq-0 command writes your file out, then then exits.  
  1041. X
  1042. X        The -1x-0it command is similar to the -1wq-0 command,  except  that  -1x-0it
  1043. X     won't bother to write your file if you haven't modified it.  
  1044. X
  1045. X
  1046. X   E3.13  File I/O CommandsF
  1047. X
  1048. X            [line] read file
  1049. X            [line][,line] write[!] [[>>]file]
  1050. X
  1051. X        The  -1r-0ead  command  gets  text  from another file and inserts it
  1052. X     after the specified line.   It  can  also  read  the  output  of  a
  1053. X     program;  simply  precede  the  program name by a '!' and use it in
  1054. X     place of the file name.  
  1055. X
  1056. X        The -1w-0rite command writes the whole file, or just part of it,  to
  1057. X     some other  file.    The !, if present, will permit the lines to be
  1058. X     written even if you've set the readonly option.  If you precede the 
  1059. X     filename by >> then the lines will be appended to the file.  
  1060. X
  1061. X
  1062. X   E3.14  Directory CommandsF
  1063. X
  1064. X            cd [directory]
  1065. X            chdir [directory]
  1066. X            shell
  1067. X
  1068. X        The -1cd-0 and -1chd-0ir commands (really two  names  for  one  command)
  1069. X     switch the current working directory.  
  1070. X
  1071. X        The -1sh-0ell command starts an interactive shell.  
  1072. X
  1073. X
  1074. X   E3.15  Debugging CommandsF
  1075. X
  1076. X            [line][,line] debug[!]
  1077. X            validate[!]
  1078. X
  1079. X        These  commands are only available if you compile Elvis with the
  1080. X     -DDEBUG flag.  
  1081. X
  1082. X        The de-1b-0ug command lists statistics for the blocks which  contain
  1083. X     the specified range  of  lines.    If  the  !  is present, then the
  1084. X     contents of those blocks is displayed, too.  
  1085. X
  1086. X        The -1va-0lidate  command  checks  certain  variables  for  internal
  1087. X     consistency.  Normally it doesn't output anything unless it detects 
  1088. X     a problem.    With  the  !,  though,  it will always produce *some*
  1089. X     output.  
  1090. X
  1091. X
  1092. X
  1093. X
  1094. X
  1095. X
  1096. X
  1097. X
  1098. X
  1099. eof
  1100. if test `wc -c <doc/ex.doc` -ne 19254
  1101. then
  1102. echo doc/ex.doc damaged!
  1103. fi
  1104. fi
  1105.  
  1106. if test -f doc/versions.doc -a "$1" != -f
  1107. then
  1108. echo Will not overwrite doc/versions.doc
  1109. else
  1110. echo Extracting doc/versions.doc
  1111. sed 's/^X//' >doc/versions.doc <<\eof
  1112. X
  1113. X     Elvis 1.4                    VERSIONS                     Page 12-1
  1114. X
  1115. X
  1116. XE12.  VERSIONSF
  1117. X
  1118. X        Elvis  currently  works  under BSD UNIX, AT&T System-V UNIX, SCO
  1119. X     XENIX, Minix, Coherent, MS-DOS,  Atari  TOS,  and  OS9/68k.    This
  1120. X     section  of the manual provides special information that applies to
  1121. X     each particular version of Elvis.  
  1122. X
  1123. X        For all versions except MS-DOS, the file  "Makefile.mix"  should
  1124. X     be  copied to "Makefile", and then edited to select the correct set
  1125. X     of options for your system.  There is more information  about  this
  1126. X     embedded in the file itself.  
  1127. X
  1128. X
  1129. X   E12.1  BSD UNIXF
  1130. X
  1131. X        Temporary files are stored in /tmp.  
  1132. X
  1133. X        Elvis doesn't  have  an  "expreserve" program yet.  Instead, you
  1134. X     should modify /etc/rc so that the temp files are not  deleted  when
  1135. X     the system is rebooted.  Find a line in /etc/rc which reads 
  1136. X
  1137. X            rm -rf /tmp/*
  1138. X
  1139. X        or something like that, and change it to read 
  1140. X
  1141. X            rm -rf /tmp/[^e]* /tmp/e[^l]* /tmp/el[^v]* /tmp/elv_*
  1142. X
  1143. X        If  you  do  not  have permission to modify /etc/rc, don't fret.
  1144. X     The above modification is only needed to allow you to recover  your
  1145. X     changes after a system crash.  You can still run Elvis without that 
  1146. X     modification,  and  you  can  still recover your changes when Elvis
  1147. X     crashes or when your dialup modem looses  the  carrier  signal,  or
  1148. X     something like  that.   A system crash is the only thing that could
  1149. X     hurt you.  
  1150. X
  1151. X        Both Elvis and the real Vi read initialization commands  from  a
  1152. X     file  called  ".exrc",  but the commands in that file might work on
  1153. X     one but not the other.  For example, "set keywordprg=man" will work 
  1154. X     for  Elvis,  but  Vi  will  complain  because  it  doesn't  have  a
  1155. X     "keywordprg" option.    If the warning messages annoy you, then you
  1156. X     can edit the config.h file to change the name of the initialization 
  1157. X     file ".exrc" to something else, such as ".elvisrc".  
  1158. X
  1159. X        If you use X windows, you  may  wish  to  add  "-DCS_LATIN1"  to
  1160. X     CFLAGS.   This will cause the digraph table and the flipcase option
  1161. X     to have  default  values  that  are  appropriate  for  the  LATIN-1
  1162. X     character set.  That's the standard character set for X.  
  1163. X
  1164. X
  1165. X   E12.2  System-V UNIXF
  1166. X
  1167. X        If  your  system uses terminfo instead of termcap, then you will
  1168. X     have to edit the LIBS setting in the Makefile.  Currently  it  says
  1169. X     "LIBS=-ltermcap",    but   you   may   have   to   change   it   to
  1170. X     "LIBS=-lterminfo" or "LIBS=-lterm" or something like that.  
  1171. X
  1172. X
  1173. X
  1174. X
  1175. X
  1176. X
  1177. X
  1178. X
  1179. X     Elvis 1.4                    VERSIONS                     Page 12-2
  1180. X
  1181. X
  1182. X        The /etc/rc  file  should  be  modified  as  described  for  BSD
  1183. X     systems, above.  The potential trouble with ".exrc" described above 
  1184. X     for BSD UNIX applies to System-V UNIX as well.  
  1185. X
  1186. X        Elvis uses control-C as the interrupt key, not Delete.  
  1187. X
  1188. X
  1189. X   E12.3  SCO XenixF
  1190. X
  1191. X        For Xenix-386,  you  can use the generic System-V settings.  You
  1192. X     may wish to add "-DCS_IBMPC" to CFLAGS, to have the  digraph  table
  1193. X     and  flipcase option start up in a mode that is appropriate for the
  1194. X     console.  
  1195. X     There is a separate group of settings for use with Xenix-286.    It
  1196. X     already has "-DCS_IBMPC" in CFLAGS.  
  1197. X
  1198. X        Because  Xenix  is  so  similar  to  System-V, everything I said
  1199. X     earlier about System-V applies to the Xenix version too.  
  1200. X
  1201. X
  1202. X   E12.4  MinixF
  1203. X
  1204. X        There are separate settings in  Makefile.mix  for  Minix-PC  and
  1205. X     Minix-ST.   The  differences  between  these  two  are  that the ST
  1206. X     version uses ".o" for  the  object  file  extension  where  the  PC
  1207. X     version  uses  ".s",  and  the  PC  version has some extra flags in
  1208. X     CFLAGS to reduce the size of Elvis.    The  PC  version  also  uses
  1209. X     tinytcap (instead of the full termcap) to make it smaller.  
  1210. X
  1211. X        Minix-PC  users  should  read  the CFLAGS section of this manual
  1212. X     very carefully.  You have some choices to make...  
  1213. X
  1214. X        The temporary files  are  stored  in  /usr/tmp.    The  /usr/tmp
  1215. X     directory  must  exist  before  you  run  Elvis,  and  it  must  be
  1216. X     readable/writable by everybody.  We use /usr/tmp  instead  of  /tmp
  1217. X     because  after a system crash or power failure, you can recover the
  1218. X     altered version of a file from the temporary file in /usr/tmp.   If
  1219. X     it  was  stored in /tmp, though, then it would be lost because /tmp
  1220. X     is probably located on the RAM disk.  
  1221. X
  1222. X        Elvis uses control-C as the interrupt key, not Delete.  
  1223. X
  1224. X
  1225. X   E12.5  CoherentF
  1226. X
  1227. X        Elvis was ported to Coherent by Esa Ahola.  
  1228. X
  1229. X        Elvis is too large to run under Coherent  unless  you  eliminate
  1230. X     some features via the CFLAGS setting.  The recommended settings, in 
  1231. X     Makefile.mix,  produce a working version of elvis which emulates Vi
  1232. X     faithfully, but lacks most of the extensions.  You should read  the
  1233. X     CFLAGS section of this manual carefully.  
  1234. X
  1235. X        You  can  probably  reduce the size of Elvis by using tinytcap.c
  1236. X     instead of -lterm.  This would allow you to keep most  features  of
  1237. X     Elvis, at  the  expense  of terminal independence.  (Tinytcap.c has
  1238. X     ANSI escape sequences hard-coded into it.) To  use  tinytcap,  just
  1239. X     add  "tinytcap.o"  to the "EXTRA=" line in the Makefile, and remove
  1240. X
  1241. X
  1242. X
  1243. X
  1244. X
  1245. X     Elvis 1.4                    VERSIONS                     Page 12-3
  1246. X
  1247. X
  1248. X     "-lterm" from the "LIBS=" line.  
  1249. X
  1250. X        The temporary files are stored in /tmp.  You should modify  your
  1251. X     /etc/rc file as described for BSD earlier.  
  1252. X
  1253. X
  1254. X   E12.6  MS-DOSF
  1255. X
  1256. X        Elvis  was  ported to MS-DOS by Guntram Blohm and Martin Patzel.
  1257. X     Dave  Lord  also  deserves  a  big  "thank  you"  for  exploring  a
  1258. X     compatibility glitch between DOS 4.01 and Elvis.  
  1259. X
  1260. X        Ideally,  Elvis  should be compiled with Microsoft C 5.1 and the
  1261. X     standard Microsoft Make utility, via the command "make  elvis.mak".
  1262. X     This will compile Elvis and all related utilities.  
  1263. X
  1264. X        If  you  have  Turbo-C,  then you can 4almost5 use the "Elvis.prj"
  1265. X     file to compile Elvis.    EYou  must  explicitly  force  Turbo-C  to
  1266. X     compile  it  with  the "medium" memoryF Emodel, and you must increase
  1267. X     the stack size to 16k.F Most of the related  programs  (ctags,  ref,
  1268. X     virec, refont, and wildcard) are  only one file long, so you should 
  1269. X     have no  trouble compiling them.  The "alias.c" file is meant to be
  1270. X     compiled once into an executable named "ex.exe".  You  should  then
  1271. X     copy "ex.exe" to "vi.exe", and "view.exe".  
  1272. X
  1273. X        Elvis stores  its  temporary  files  in  C:\tmp.  If this is not
  1274. X     satisfactory, then you should edit the CFLAGS line of your Makefile 
  1275. X     to change TMPDIR to something else before compiling.  You can  also
  1276. X     control  the name of the temp directory via an environment variable
  1277. X     named TMP or TEMP.  The directory must exist  before  you  can  run
  1278. X     Elvis.  
  1279. X
  1280. X        Normally,  the  TERM  environment variable should not be set, or
  1281. X     else it should be set to "pcbios".  This way, Elvis will make calls 
  1282. X     to BIOS to update the screen.  (If you don't like the  colors  that
  1283. X     the BIOS  interface  uses,  then  edit the attr[] table in pc.c.  A
  1284. X     ":color" command will be added eventually.) 
  1285. X
  1286. X        You may prefer to use  a  device  driver  such  as  ANSI.SYS  or
  1287. X     NNANSI.SYS,  for  speed; or you may NEED to use a device driver for
  1288. X     compatibility.  If so, you should install one of these  drivers  by
  1289. X     adding  "driver  = ansi.sys" (or whatever) to your CONFIG.SYS file,
  1290. X     and then you should define TERM to be either "ansi" or  "nansi"  by
  1291. X     adding  a  line  such as "set TERM=ansi" to your AUTOEXEC.BAT file.
  1292. X     You must then reboot for these changes to take effect.  After that, 
  1293. X     Elvis will notice the "TERM" setting and use the driver.  
  1294. X
  1295. X        Under MS-DOS, Elvis has an extra ":set" option  called  "pcbios"
  1296. X     which indicates whether the BIOS is being used directly.  This is a 
  1297. X     "read only" option; you can't use it to switch your interface style 
  1298. X     in the middle of an edit session.  
  1299. X
  1300. X        An extra  program,  called "wildcard", is needed for MS-DOS.  It
  1301. X     expands wildcard characters in file names.  
  1302. X
  1303. X
  1304. X
  1305. X
  1306. X
  1307. X
  1308. X
  1309. X
  1310. X
  1311. X     Elvis 1.4                    VERSIONS                     Page 12-4
  1312. X
  1313. X
  1314. X   E12.7  Atari TOSF
  1315. X
  1316. X        Elvis was ported to  Atari  TOS  by  Guntram  Blohm  and  Martin
  1317. X     Patzel.  It  is  very  similar  to the MS-DOS version.  It has only
  1318. X     been tested with the Mark Williams C compiler.  
  1319. X
  1320. X        The TERM environment variable is ignored;  the  ST  port  always
  1321. X     assumes that  TERM=vt52.   The SHELL (not COMSPEC!) variable should
  1322. X     be set to the name of a line-oriented shell.  
  1323. X
  1324. X        A simple shell in  included  with  elvis.    Its  source  is  in
  1325. X     "shell.c", and the name of the executable is "shell.ttp".  This was 
  1326. X     necessary because the standard Atari software doesn't offer any way 
  1327. X     to set environment variables.  The file "profile.sh" should contain 
  1328. X     a  set  of  instructions to be executed when the shell first starts
  1329. X     up.  An example of this file  is  included,  but  you  will  almost
  1330. X     certainly want to edit it right away to match your configuration.  
  1331. X
  1332. X        If  you  already have a command-line shell, then you'll probably
  1333. X     want to continue using it.  The shell that comes with Elvis is very 
  1334. X     limited.  
  1335. X
  1336. X        Currently, character  attributes  cannot  be  displayed  on  the
  1337. X     screen.   In  other  words, the "charattr" option doesn't work very
  1338. X     well.  Its ironic -- the only system that always  has  a  bitmapped
  1339. X     display is the only system that doesn't support multiple fonts!  
  1340. X
  1341. X
  1342. X   E12.8  OS9/68kF
  1343. X
  1344. X        Elvis was ported to OS9/68k by Peter Reinig.  
  1345. X
  1346. X        The  Makefile  is  currently configured to install elvis and the
  1347. X     related programs in /dd/usr/cmds If this this is unacceptable, then 
  1348. X     you  should  change  the  BIN  setting  to  some  other  directory.
  1349. X     Similarly,    it   expects   the   source   code   to   reside   in
  1350. X     /dd/usr/src/elvis; the ODIR setting is used to control this.  
  1351. X
  1352. X        Temporary files are stored  in  the  /dd/tmp  directory.    Your
  1353. X     /dd/startup  file  may  need  to  be  modified  to  prevent it from
  1354. X     deleting Elvis' temporary files.  
  1355. X
  1356. X        The program in alias.c is linked repeatedly to produce the "vi", 
  1357. X     "view", and "input" aliases for elvis.  Sadly, the  "ex"  alias  is
  1358. X     impossible to implement under OS9, because the shell has a built-in 
  1359. X     command by that name.  
  1360. X
  1361. X        For  some  purposes,  you  must  give  `make'  the  "-b" option.
  1362. X     Specifically, you need this  for  "make  -b  clean"  and  "make  -b
  1363. X     install".  
  1364. X
  1365. X
  1366. X
  1367. X
  1368. X
  1369. X
  1370. X
  1371. X
  1372. X
  1373. X
  1374. X
  1375. X
  1376. eof
  1377. if test `wc -c <doc/versions.doc` -ne 10854
  1378. then
  1379. echo doc/versions.doc damaged!
  1380. fi
  1381. fi
  1382.  
  1383. if test -f doc/cflags.doc -a "$1" != -f
  1384. then
  1385. echo Will not overwrite doc/cflags.doc
  1386. else
  1387. echo Extracting doc/cflags.doc
  1388. sed 's/^X//' >doc/cflags.doc <<\eof
  1389. X
  1390. X     Elvis 1.4                     CFLAGS                       Page 9-1
  1391. X
  1392. X
  1393. XE9.  CFLAGSF
  1394. X
  1395. X        Elvis  uses  many  preprocessor  symbols to control compilation.
  1396. X     Some of  these  control  the  sizes  of  buffers  and  such.    The
  1397. X     "-DNO_XXXX" options remove small sets of related features.  
  1398. X
  1399. X        Most  Elvis  users  will  probably  want  to  keep  all features
  1400. X     available.  Minix-PC users, though, will  have  to  sacrifice  some
  1401. X     sets because  otherwise  Elvis  would be too bulky to compile.  The
  1402. X     "asld" phase of the compiler craps out.  
  1403. X
  1404. X     -DM_SYSV, -DTOS, -DCOHERENT 
  1405. X            These flags tell the compiler that Elvis is  being  compiled
  1406. X            for  System-V  UNIX,  Atari  TOS, or Coherent, respectively.
  1407. X            For other systems, the config.h file can generally figure it 
  1408. X            out automatically.  
  1409. X
  1410. X     -DDATE=4string5 
  1411. X            DATE should be defined to be  a  string  constant.    It  is
  1412. X            printed  by  the :version command as the compilation date of
  1413. X            the program.  
  1414. X
  1415. X            It is only used in cmd1.c, and even there you may  leave  it
  1416. X            undefined without causing an urp.  
  1417. X
  1418. X     -DNBUFS=4number5 
  1419. X            Elvis  keeps  most  of your text in a temporary file; only a
  1420. X            small amount is actually stored in RAM.   This  flag  allows
  1421. X            you  to  control  how  much of the file can be in RAM at any
  1422. X            time.  The default is 5 blocks.  (See  the  -DBLKSIZE  flag,
  1423. X            below.) 
  1424. X
  1425. X            More  RAM  allows  global changes to happen a little faster.
  1426. X            If you're just making many small changes in one section of a 
  1427. X            file, though, extra RAM won't help much.  
  1428. X
  1429. X     -DBLKSIZE=4number5 
  1430. X            This  controls  the  size  of   blocks   that   Elvis   uses
  1431. X            internally.   The  value  of BLKSIZE must be a power of two.
  1432. X            The default value is 1024, which allows you to edit files up 
  1433. X            to almost 512K bytes long.  Every time you  double  BLKSIZE,
  1434. X            you quadruple the size of a text file that Elvis can handle, 
  1435. X            but you also cause the temporary file to grow faster.  
  1436. X
  1437. X     -DTMPDIR=4string5 
  1438. X            This sets the default value of the "directory" option, which 
  1439. X            specifies where  the  temporary  files  should  reside.  The
  1440. X            value of TMPDIR must be a string,  so  be  sure  your  value
  1441. X            includes the quote characters on each end.  
  1442. X
  1443. X     -DEXRC=4str5, -DHMEXRC=4str5, -DSYSEXRC=4str5, -DEXINIT=4str5 
  1444. X            This  lets  you  control  the  names  of  the initialization
  1445. X            files.  Their values must be strings, so  be  careful  about
  1446. X            quoting.  
  1447. X
  1448. X
  1449. X
  1450. X
  1451. X
  1452. X
  1453. X
  1454. X
  1455. X
  1456. X     Elvis 1.4                     CFLAGS                       Page 9-2
  1457. X
  1458. X
  1459. X            EXRC  is  the name of the initialization file in the current
  1460. X            directory.  Its default value is ".exrc" on UNIX systems  --
  1461. X            the same  as  the  real  vi.    For other systems, check the
  1462. X            config.h file.  
  1463. X
  1464. X            HMEXRC is the name of the initialization file in  your  home
  1465. X            directory.  By  default, it is the same as EXRC.  Elvis will
  1466. X            automatically prepend the name of  your  home  directory  to
  1467. X            HMEXRC at run time, so don't give a full path name.  
  1468. X
  1469. X            SYSEXRC  is  the  name of a system-wide initialization file.
  1470. X            It has no default value; if you don't define a value for it, 
  1471. X            then the code that supports  SYSEXRC  just  isn't  compiled.
  1472. X            The value of SYSEXRC should be a full pathname, in quotes.  
  1473. X
  1474. X            EXINIT  is  the  name  of  an  environment variable that can
  1475. X            contain initialization commands.   Normally,  its  value  is
  1476. X            "EXINIT".  
  1477. X
  1478. X     -DKEYWORDPRG=4string5 
  1479. X            This  flag  determines the default value of the "keywordprg"
  1480. X            option.  Its value must be a string,  so  be  careful  about
  1481. X            quoting.   The default value of this flag is "ref", which is
  1482. X            a C reference program.  
  1483. X
  1484. X     -DCC_COMMAND=4string5 -DMAKE_COMMAND=4string5 -DERRLIST=4string5 
  1485. X            These control the  names  of  the  C  compiler,  the  "make"
  1486. X            utility, and  the error output file, respectively.  They are
  1487. X            only used if -DNO_ERRLIST is not given.  
  1488. X
  1489. X     -DMAXMAPS=4number5 
  1490. X            This controls the capacity of the key map table.  
  1491. X
  1492. X     -DMAXRCLEN=4number5 
  1493. X            This determines how large a .exrc file can be  (measured  in
  1494. X            bytes).  The  default  is  1000 bytes.  If you increase this
  1495. X            value significantly, then you may  need  to  allocate  extra
  1496. X            memory for  the  stack.    See  the  "CHMEM"  setting in the
  1497. X            Makefile.  
  1498. X
  1499. X     -DSHELL=4string5 
  1500. X            This is the default value of the "shell" option,  and  hence
  1501. X            the default  shell  used  from  within  Elvis.    This  only
  1502. X            controls the  default;  the  value  you  give  here  may  be
  1503. X            overridden  at  run-time  by setting an environment variable
  1504. X            named SHELL (or COMSPEC for MS-DOS).  Its value  must  be  a
  1505. X            string constant, so be careful about quoting.  
  1506. X
  1507. X     -DTAGS=4string5 
  1508. X            This  sets the name of the "tags" file, which is used by the
  1509. X            :tag command.  Its value must be a string  constant,  so  be
  1510. X            careful about quoting.  
  1511. X
  1512. X     -DCS_IBMPC 
  1513. X            The  digraph  table  and flipcase option will normally start
  1514. X            out empty.  However, if you add -DCS_IBMPC or -DCS_LATIN1 to 
  1515. X            your CFLAGS, then they will start  out  filled  with  values
  1516. X            that are appropriate for the IBM PC character set or the ISO 
  1517. X
  1518. X
  1519. X
  1520. X
  1521. X
  1522. X     Elvis 1.4                     CFLAGS                       Page 9-3
  1523. X
  1524. X
  1525. X            Latin-1 character set, respectively.  
  1526. X
  1527. X     -DDEBUG 
  1528. X            This  adds  the  ":debug" and ":validate" commands, and also
  1529. X            adds many internal consistency checks.    It  increases  the
  1530. X            size of the ".text" segment by about 6K.  
  1531. X
  1532. X     -DCRUNCH 
  1533. X            This  flag  removes some non-critical code, so that Elvis is
  1534. X            smaller.  For example,  it  removes  a  short-cut  from  the
  1535. X            regexp package,  so  that  text  searches are slower.  Also,
  1536. X            screen updates are not as efficient.  A  couple  of  obscure
  1537. X            features are disabled by this, too.  
  1538. X
  1539. X     -DNO_MKEXRC 
  1540. X            This  removes  the  ":mkexrc" command, so you have to create
  1541. X            any .exrc files manually.  The size  of  the  .text  segment
  1542. X            will be reduced by about 600 bytes.  
  1543. X
  1544. X     -DNO_CHARATTR 
  1545. X            Permanently disables  the charattr option.  This reduces the
  1546. X            size of your ".text" segment by about 850 bytes.  
  1547. X
  1548. X     -DNO_RECYCLE 
  1549. X            Normally, Elvis will recycle space (from the tmp file) which 
  1550. X            contains totally obsolete text.   This  flag  disables  this
  1551. X            recycling.   Without recycling, the ".text" segment is about
  1552. X            1K smaller than it would otherwise  be,  but  the  tmp  file
  1553. X            grows much  faster.  If you have a lot of free space on your
  1554. X            harddisk, but Elvis is too bulky to run with recycling, then 
  1555. X            try it without recycling.  
  1556. X
  1557. X            When using a version of Elvis that has  been  compiled  with
  1558. X            -DNO_RECYCLE,  you  should  be  careful to avoid making many
  1559. X            small changes to a file because each individual change  will
  1560. X            cause the  tmp  file  to  grow  by at least 1k.  Hitting "x"
  1561. X            thirty times counts as  thirty  changes,  but  typing  "30x"
  1562. X            counts as  one  change.   Also, you should occasionally do a
  1563. X            ":w" followed by a ":e" to start with a fresh tmp file.  
  1564. X
  1565. X     -DNO_SENTENCE 
  1566. X            Leaves out the "(" and ")" visual mode commands.  Also,  the
  1567. X            "[[",  "]]",  "{", and "}" commands will not recognize *roff
  1568. X            macros.  The sections and paragraphs options go away.   This
  1569. X            saves about 650 bytes in the ".text" segment.  
  1570. X
  1571. X     -DNO_CHARSEARCH 
  1572. X            Leaves   out  the  visual  commands  which  locate  a  given
  1573. X            character in the current line: "f", "t", "F", "T",  ","  and
  1574. X            ";".  This saves about 900 bytes.  
  1575. X
  1576. X     -DNO_EXTENSIONS 
  1577. X            Leaves out the "K" and "#" visual commands.  Also, the arrow 
  1578. X            keys will  no  longer work in input mode.  (Other extensions
  1579. X            are  either  inherent  in  the  design  of  elvis,  or   are
  1580. X            controlled  by  more  specific  flags, or are too tiny to be
  1581. X            worth removing.) This saves about 250 bytes.  
  1582. X
  1583. X
  1584. X
  1585. X
  1586. X
  1587. X
  1588. X     Elvis 1.4                     CFLAGS                       Page 9-4
  1589. X
  1590. X
  1591. X     -DNO_MAGIC 
  1592. X            Permanently  disables  the  "magic"  option,  so  that  most
  1593. X            meta-characters   in   a   regular   expression   are  *NOT*
  1594. X            recognized.  This saves about 3k of  space  in  the  ".text"
  1595. X            segment,  because the complex regular expression code can be
  1596. X            replaced by much simpler code.  
  1597. X
  1598. X     -DNO_SHOWMODE 
  1599. X            Permanently disables the "showmode" option, saving about 250 
  1600. X            bytes.  
  1601. X
  1602. X     -DNO_CURSORSHAPE 
  1603. X            Normally, Elvis tries to adjust the shape of the cursor as a 
  1604. X            reminder of which mode you're in.  The -DNO_CURSORSHAPE flag 
  1605. X            disables this, saving about 150 bytes.  
  1606. X
  1607. X     -DNO_DIGRAPH 
  1608. X            To allow  entry  of  non-ASCII  characters,  Elvis  supports
  1609. X            digraphs.  A digraph is a single (non-ASCII) character which 
  1610. X            is   entered   as   a   combination  of  two  other  (ASCII)
  1611. X            characters.   If  you  don't   need   to   input   non-ASCII
  1612. X            characters,  or  if  your  keyboard supports a better way of
  1613. X            entering non-ASCII characters,  then  you  can  disable  the
  1614. X            digraph code and save about 450 bytes.  
  1615. X
  1616. X     -DNO_ERRLIST 
  1617. X            Elvis   adds  a  ":errlist"  command,  which  is  useful  to
  1618. X            programmers.  If  you  don't  need  this  feature,  you  can
  1619. X            disable it  via the -DNO_ERRLIST flag.  This will reduce the
  1620. X            .text segment by about 900 bytes, and the  .bss  segment  by
  1621. X            about 300 bytes.  
  1622. X
  1623. X     -DNO_ABBR 
  1624. X            The -DNO_ABBR flag disables the ":abbr" command, and reduces 
  1625. X            the size of Elvis by about 600 bytes.  
  1626. X
  1627. X     -DNO_OPTCOLS 
  1628. X            When  Elvis  displays  the  current options settings via the
  1629. X            ":set"  command,  the  options  are  normally  sorted   into
  1630. X            columns.   The  -DNO_OPTCOLS  flag  causes the options to be
  1631. X            sorted across  the  rows,  which  is  much  simpler.     The
  1632. X            -DNO_OPTCOLS flag will reduce the size of your .text segment 
  1633. X            by about 500 bytes.  
  1634. X
  1635. X     -DNO_MODELINE 
  1636. X            This removes all support for modelines.  
  1637. X
  1638. X
  1639. X
  1640. X
  1641. X
  1642. X
  1643. X
  1644. X
  1645. X
  1646. X
  1647. X
  1648. X
  1649. X
  1650. X
  1651. X
  1652. X
  1653. eof
  1654. if test `wc -c <doc/cflags.doc` -ne 11052
  1655. then
  1656. echo doc/cflags.doc damaged!
  1657. fi
  1658. fi
  1659.  
  1660. if test -f doc/differ.doc -a "$1" != -f
  1661. then
  1662. echo Will not overwrite doc/differ.doc
  1663. else
  1664. echo Extracting doc/differ.doc
  1665. sed 's/^X//' >doc/differ.doc <<\eof
  1666. X
  1667. X     Elvis 1.4      DIFFERENCES BETWEEN ELVIS & BSD VI/EX       Page 7-1
  1668. X
  1669. X
  1670. XE7.  DIFFERENCES BETWEEN ELVIS & BSD VI/EXF
  1671. X
  1672. X
  1673. X   E7.1  ExtensionsF
  1674. X
  1675. X   :mkexrc
  1676. X   :mk
  1677. X
  1678. X        This  EX  command saves the current :set and :map configurations
  1679. X     in the ".exrc" file in your current directory.  
  1680. X
  1681. X   :Next
  1682. X   :previous
  1683. X   :N
  1684. X   :pre
  1685. X
  1686. X        These commands move backwards through the args list.  
  1687. X
  1688. X   zz
  1689. X
  1690. X        In visual command mode, the (lowercase) "zz" command will center 
  1691. X     the current line on the screen, like "z=".  
  1692. X
  1693. X   .
  1694. X
  1695. X        The default count value for  .  is  the  same  as  the  previous
  1696. X     command which  . is meant to repeat.  However, you can supply a new
  1697. X     count if you wish.  For example, after "3dw",  "."  will  delete  3
  1698. X     words, but "5." will delete 5 words.  
  1699. X
  1700. X   ".
  1701. X
  1702. X        The  text  which was most recently input (via a "cw" command, or
  1703. X     something similar) is saved in a cut buffer called ". (which  is  a
  1704. X     pretty hard name to write in an English sentence).  
  1705. X
  1706. X   K
  1707. X
  1708. X        In  visual command mode, you can move the cursor onto a word and
  1709. X     press shift-K to have Elvis run a reference program  to  look  that
  1710. X     word up.   This command alone is worth the price of admission!  See
  1711. X     the ctags and ref programs.  
  1712. X
  1713. X   #
  1714. X
  1715. X        In visual command mode, you can move the cursor  onto  a  number
  1716. X     and then  hit ## or #+ to increment that number by 1.  To increment
  1717. X     it by a larger amount, type in the increment value  before  hitting
  1718. X     the initial  #.    The  number  can  also  be decremented or set by
  1719. X     hitting #- or #=, respectively.  
  1720. X
  1721. X   input
  1722. X
  1723. X        You can backspace past the beginning of the line.  
  1724. X
  1725. X
  1726. X
  1727. X
  1728. X
  1729. X
  1730. X
  1731. X
  1732. X
  1733. X     Elvis 1.4      DIFFERENCES BETWEEN ELVIS & BSD VI/EX       Page 7-2
  1734. X
  1735. X
  1736. X        The arrow keys work in input mode.  
  1737. X
  1738. X        If you type control-A, then the text that you input last time is 
  1739. X     inserted.  You will remain in input mode, so you can backspace over 
  1740. X     part of it, or add more to it.  (This is sort of like control-@  on
  1741. X     the real vi, except that control-A really works.) 
  1742. X
  1743. X        Control-P will insert the contents of the cut buffer.  
  1744. X
  1745. X        Real  vi  can  only  remember up to 128 characters of input, but
  1746. X     Elvis can remember any amount.  
  1747. X
  1748. X        The ^T and ^D keys can adjust the indent of  a  line  no  matter
  1749. X     where the cursor happens to be in that line.  
  1750. X
  1751. X        You  can  save your file and exit Elvis directly from input mode
  1752. X     by hitting control-Z twice.  
  1753. X
  1754. X        Elvis supports digraphs as a way to enter non-ASCII characters.  
  1755. X
  1756. X   :set inputmode
  1757. X   :se im
  1758. X
  1759. X        If you set this flag in your .exrc file, then elvis  will  start
  1760. X     up in input mode instead of visual command mode.  
  1761. X
  1762. X   :set charattr
  1763. X   :se ca
  1764. X
  1765. X        Elvis  can  display  "backslash-f" style character attributes on
  1766. X     the screen as you edit.  The following example shows the recognized 
  1767. X     atributes: 
  1768. X
  1769. X            normal \fBboldface\fR \fIitalics\fR \fUunderlined\fR normal
  1770. X
  1771. X        NOTE: you must compile elvis without the -DNO_CHARATTR flag  for
  1772. X     this to work.  
  1773. X
  1774. X   :set sync
  1775. X   :se sy
  1776. X
  1777. X        After  a  crash, you can usually recover the altered form of the
  1778. X     file from the temporary file that Elvis uses.  With the sync option 
  1779. X     turned on, the odds are shifted a little more in your favor because 
  1780. X     Elvis will perform a sync() call after each change has been written 
  1781. X     to the temporary file.  
  1782. X
  1783. X   cursor shape
  1784. X
  1785. X        Elvis changes the shape of the cursor  to  indicate  which  mode
  1786. X     you're  in, if your terminal's termcap entry includes the necessary
  1787. X     capabilities.  
  1788. X
  1789. X   :set hideformat
  1790. X   :se hf
  1791. X
  1792. X
  1793. X
  1794. X
  1795. X
  1796. X
  1797. X
  1798. X
  1799. X     Elvis 1.4      DIFFERENCES BETWEEN ELVIS & BSD VI/EX       Page 7-3
  1800. X
  1801. X
  1802. X        This option hides format control lines.  (They are displayed  on
  1803. X     the screen as blank lines.) 
  1804. X
  1805. X   :errlist
  1806. X   *
  1807. X   elvis -m
  1808. X
  1809. X        Elvis  is  clever  enough to parse the error messages emitted by
  1810. X     many compilers.  To use  this  feature,  you  should  collect  your
  1811. X     compiler's  error messages into a file called "errlist"; elvis will
  1812. X     read this file,  determine  which  source  file  caused  the  error
  1813. X     messages,  start  editing  that  file,  move the cursor to the line
  1814. X     where the error was detected, and display the error message on  the
  1815. X     status line.  Nifty!  
  1816. X
  1817. X
  1818. X   E7.2  OmissionsF
  1819. X
  1820. X        The replace  mode  is  a hack.  It doesn't save the text that it
  1821. X     overwrites.  
  1822. X
  1823. X        Long lines are displayed differently -- where the real vi  would
  1824. X     wrap  a  long  line  onto  several rows of the screen, Elvis simply
  1825. X     displays part of the line, and allows  you  to  scroll  the  screen
  1826. X     sideways to see the rest of it.  
  1827. X
  1828. X        The ":preserve"  and ":recover" commands are missing.  So is the
  1829. X     -r flag.  I've never had a good  reason  to  use  ":preserve",  and
  1830. X     since  ":recover"  is used so rarely I decided to implement it as a
  1831. X     separate program.  There's no need to load the recovery  code  into
  1832. X     memory every time you edit a file, I figured.  
  1833. X
  1834. X        LISP support is missing.  
  1835. X
  1836. X        Due  to  naming  conventions used for the temporary files, Elvis
  1837. X     can be creating no more that one new  file  per  directory  at  any
  1838. X     given time.  Any number of existing files can be edited at the same 
  1839. X     time on multitasking computer systems, but only one new file can be 
  1840. X     created simultaneously per directory.  To relieve this problem, you 
  1841. X     would have to edit tmp.c and virec.c This is expected to be done in 
  1842. X     version 1.5 
  1843. X
  1844. X        Autoindent mode acts a little different from the real vi.  It is 
  1845. X     still  quite  useful,  but  if you frequently use both vi and elvis
  1846. X     then the differences may be  annoying.    Autoindent  is  -1gradually-0
  1847. X     improving.  
  1848. X
  1849. X        The  visual  "put"  command  cannot be repeated by hitting the .
  1850. X     key.  
  1851. X
  1852. X
  1853. X
  1854. X
  1855. X
  1856. X
  1857. X
  1858. X
  1859. X
  1860. X
  1861. X
  1862. X
  1863. X
  1864. eof
  1865. if test `wc -c <doc/differ.doc` -ne 5908
  1866. then
  1867. echo doc/differ.doc damaged!
  1868. fi
  1869. fi
  1870.  
  1871. exit 0
  1872. -------------------------------------------------------------------------------
  1873. Steve Kirkendall     kirkenda@cs.pdx.edu      Grad student at Portland State U.
  1874.