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

  1. From: kirkenda@eecs.cs.pdx.edu (Steve Kirkendall)
  2. Newsgroups: alt.sources
  3. Subject: Elvis 1.4, part 2 of 8
  4. Message-ID: <826@pdxgate.UUCP>
  5. Date: 3 Dec 90 21:28:20 GMT
  6.  
  7. : ------------------------ CUT HERE --------------------
  8. test -d doc || mkdir doc || exit 2
  9.  
  10. if test -f doc/cutbufs.doc -a "$1" != -f
  11. then
  12. echo Will not overwrite doc/cutbufs.doc
  13. else
  14. echo Extracting doc/cutbufs.doc
  15. sed 's/^X//' >doc/cutbufs.doc <<\eof
  16. X
  17. X     Elvis 1.4                   CUT BUFFERS                    Page 6-1
  18. X
  19. X
  20. XE6.  CUT BUFFERSF
  21. X
  22. X        When  elvis  deletes  text, it stores that text in a cut buffer.
  23. X     This happens in both  visual  mode  and  EX  mode.    There  is  no
  24. X     practical limit to how much text a cut buffer can hold.  
  25. X
  26. X        There  are  36  cut buffers: 26 named buffers ("a through "z), 9
  27. X     anonymous buffers ("1 through "9), and 1 extra cut buffer (".).  
  28. X
  29. X        In EX mode, the :move and :copy commands use  a  cut  buffer  to
  30. X     temporarily hold the text to be moved/copied.  
  31. X
  32. X
  33. X   E6.1  FillingF
  34. X
  35. X        In  visual  mode,  text is copied into a cut buffer when you use
  36. X     the d, y, c, C, or s commands.  
  37. X
  38. X        By default, the text goes into the "1 buffer.    The  text  that
  39. X     used to be in "1 gets shifted into "2, "2 gets shifted into "3, and 
  40. X     so on.  The text that used to be in "9 is lost.  This way, the last 
  41. X     9 things you deleted are still accessible.  
  42. X
  43. X        You  can also put the text into a named buffer -- "a through "z.
  44. X     To do this, you should type the buffer's name  (two  keystrokes:  a
  45. X     double-quote  and a lowercase letter) before the d/y/c/C/s command.
  46. X     When you do this, "1 through "9 are not affected by the cut.  
  47. X
  48. X        You can append text to one of the named buffers.   To  do  this,
  49. X     type  the  buffer's  name  in  uppercase  (a  double-quote  and  an
  50. X     uppercase letter) before the d/y/c/C/s command.  
  51. X
  52. X        The ". buffer is special.  It isn't affected  by  the  d/y/c/C/s
  53. X     command.   Instead,  it  stores the text that you typed in the last
  54. X     time you were in input mode.  It is used to implement the .  visual
  55. X     command, and ^A in input mode.  
  56. X
  57. X        In EX mode (also known as colon mode), the :delete, :change, and 
  58. X     :yank commands  all  copy  text into a cut buffer.  Like the visual
  59. X     commands, these EX commands normally use the "1 buffer, but you can 
  60. X     use one of the named buffers by giving its name after the  command.
  61. X     For example, 
  62. X
  63. X            :20,30y a
  64. X
  65. X        will copy lines 20 through 30 into cut buffer "a.  
  66. X
  67. X        You  can't  directly  put  text  into  the  ". buffer, or the "2
  68. X     through "9 buffers.  
  69. X
  70. X
  71. X
  72. X
  73. X
  74. X
  75. X
  76. X
  77. X
  78. X
  79. X
  80. X
  81. X
  82. X
  83. X     Elvis 1.4                   CUT BUFFERS                    Page 6-2
  84. X
  85. X
  86. X   E6.2  Pasting from a Cut BufferF
  87. X
  88. X        There are two styles of pasting: line-mode  and  character-mode.
  89. X     If  a  cut  buffer  contains whole lines (from a command like "dd")
  90. X     then line-mode pasting is used; if it contains partial lines  (from
  91. X     a command  like  "dw") then character-mode pasting is used.  The EX
  92. X     commands always cut whole lines.  
  93. X
  94. X        Character-mode pasting causes the text to be inserted  into  the
  95. X     line that the cursor is on.  
  96. X
  97. X        Line-mode  pasting inserts the text on a new line above or below
  98. X     the line that the cursor is on.  It  doesn't  affect  the  cursor's
  99. X     line at all.  
  100. X
  101. X        In  visual  mode,  the  p  and P commands insert text from a cut
  102. X     buffer.   Uppercase  P  will  insert  it  before  the  cursor,  and
  103. X     lowercase p  will  insert  it  after  the  cursor.  Normally, these
  104. X     commands will paste from the "1 buffer, but  you  can  specify  any
  105. X     other buffer to paste from.  Just type its name (a double-quote and 
  106. X     another character) before you type the P or p.  
  107. X
  108. X        In  EX  mode,  the (pu)t command pastes text after a given line.
  109. X     To paste from a buffer other that "1,  enter  its  name  after  the
  110. X     command.  
  111. X
  112. X
  113. X   E6.3  MacrosF
  114. X
  115. X        The  contents  of a named cut buffer can be executed as a series
  116. X     of ex/vi commands.  
  117. X
  118. X        To put the instructions into the  cut  buffer,  you  must  first
  119. X     insert  them  into  the file, and then delete them into a named cut
  120. X     buffer.  
  121. X
  122. X        To execute a cut buffer's contents as EX  commands,  you  should
  123. X     give the  EX  command "@" and the name of the buffer.  For example,
  124. X     :@z will execute "z as a series of EX commands.  
  125. X
  126. X        To execute a cut  buffer's  contents  as  visual  commands,  you
  127. X     should  give  the visual command "@" and the letter of the buffer's
  128. X     name.  The  visual  "@"  command  is  different  from  the  EX  "@"
  129. X     command.  They interpret the cut buffer's contents differently.  
  130. X
  131. X        The visual  @  command can be rather finicky.  Each character in
  132. X     the buffer is interpretted  as  a  keystroke.    If  you  load  the
  133. X     instructions  into  the  cut  buffer  via  a "zdd command, then the
  134. X     newline character at the end of the line will be executed just like 
  135. X     any other character, so the cursor would be moved down 1 line.   If
  136. X     you don't want the cursor to move down 1 line at the end of each @z 
  137. X     command,  then  you  should  load  the  cut  buffer  by saying 0"zD
  138. X     instead.  
  139. X
  140. X        Although cut buffers may hold any amount of text, elvis can only 
  141. X     -1execute-0 small buffers.  For EX mode, the buffer is limited to about 
  142. X     1k bytes.  For visual mode, the  buffer  is  limited  to  about  80
  143. X     bytes.   If  a  buffer is too large to execute, an error message is
  144. X
  145. X
  146. X
  147. X
  148. X
  149. X     Elvis 1.4                   CUT BUFFERS                    Page 6-3
  150. X
  151. X
  152. X     displayed.  
  153. X
  154. X        You can't nest @ commands.  You can't run @ commands  from  your
  155. X     .exrc file, or any other :source file either.  Similarly, you can't 
  156. X     run a  :source  command from within an @ command.  Hopefully, these
  157. X     restrictions will be lifted in a later version.  
  158. X
  159. X
  160. X   E6.4  The Effect of Switching FilesF
  161. X
  162. X        When elvis first starts up, all cut buffers are empty.  When you 
  163. X     switch to a different file (via the :n or :e commands perhaps)  the
  164. X     9 anonymous cut buffers are emptied again, but the other 27 buffers 
  165. X     retain their text.  
  166. X
  167. X
  168. X
  169. X
  170. X
  171. X
  172. X
  173. X
  174. X
  175. X
  176. X
  177. X
  178. X
  179. X
  180. X
  181. X
  182. X
  183. X
  184. X
  185. X
  186. X
  187. X
  188. X
  189. X
  190. X
  191. X
  192. X
  193. X
  194. X
  195. X
  196. X
  197. X
  198. X
  199. X
  200. X
  201. X
  202. X
  203. X
  204. X
  205. X
  206. X
  207. X
  208. X
  209. X
  210. X
  211. X
  212. X
  213. X
  214. eof
  215. if test `wc -c <doc/cutbufs.doc` -ne 5872
  216. then
  217. echo doc/cutbufs.doc damaged!
  218. fi
  219. fi
  220.  
  221. if test -f doc/options.doc -a "$1" != -f
  222. then
  223. echo Will not overwrite doc/options.doc
  224. else
  225. echo Extracting doc/options.doc
  226. sed 's/^X//' >doc/options.doc <<\eof
  227. X
  228. X     Elvis 1.4                     OPTIONS                      Page 5-1
  229. X
  230. X
  231. XE5.  OPTIONSF
  232. X
  233. X        Options may be set or examined via the colon command "set".  The 
  234. X     values of options will affect the operation of later commands.  
  235. X
  236. X        For convenience, options have both a long descriptive name and a 
  237. X     short name  which  is  easy  to  type.    You  may  use either name
  238. X     interchangably.  I like the short names, myself.  
  239. X
  240. X-1long name       short   type    default         meaning                       -0
  241. Xautoindent      ai      Bool    noai            auto-indent during input
  242. Xautoprint       ap      Bool    ap              in EX, print the current line
  243. Xautowrite       aw      Bool    noaw            auto-write when switching files
  244. Xcharattr        ca      Bool    noca            interpret \fX sequences?
  245. Xcc              cc      Str     cc="cc -c"      name of the C compiler
  246. Xcolumns         co      Num     co=80           width of the screen
  247. Xdigraph         dig     Bool    nodig           recognize digraphs?
  248. Xdirectory       dir     Str     dir="/usr/tmp"  where tmp files are kept
  249. Xedcompatible    ed      Bool    noed            remember ":s//" options
  250. Xerrorbells      eb      Bool    eb              ring bell on error
  251. Xexrefresh       er      Bool    er              write lines indiviually in EX
  252. Xflipcase        fc      Str     fc=""           non-ASCII chars flipped by ~
  253. Xhideformat      hf      Bool    hf              hide text formatter commands
  254. Xignorecase      ic      Bool    noic            upper/lowercase match in search
  255. Xinputmode       im      Bool    noim            start vi in insert mode?
  256. Xkeytime         kt      Num     kt=2            timeout for mapped key entry
  257. Xkeywordprg      kp      Str     kp="ref"        full pathname of shift-K prog
  258. Xlines           ln      Num     ln=25           number of lines on the screen
  259. Xlist            li      Bool    noli            display lines in "list" mode
  260. Xmagic           ma      Bool    ma              use regular expression in search
  261. Xmake            mk      Str     mk="make"       name of the "make" program
  262. Xmodeline        ml      Bool    noml            are modelines processed?
  263. Xparagraphs      pa      Str     pa="PPppIPLPQP" names of "paragraph" nroff cmd
  264. Xreadonly        ro      Bool    noro            prevent overwriting of orig file
  265. Xreport          re      Num     re=5            report when 5 or more changes
  266. Xscroll          sc      Num     sc=12           scroll amount for ^U and ^D
  267. Xsections        se      Str     se="NHSHSSSEse" names of "section" nroff cmd
  268. Xshell           sh      Str     sh="/bin/sh"    full pathname of the shell
  269. Xshowmatch       sm      Bool    nosm            show matching ()[]{}
  270. Xshowmode        smd     Bool    nosmd           say when we're in input mode
  271. Xshiftwidth      sw      Num     sw=8            shift amount for < and >
  272. Xsidescroll      ss      Num     ss=8            amount of sideways scrolling
  273. Xsync            sy      Bool    nosy            call sync() often
  274. Xtabstop         ts      Num     ts=8            width of tab characters
  275. Xterm            te      Str     te="$TERM"      name of the termcap entry
  276. Xvbell           vb      Bool    vb              use visible alternative to bell
  277. Xwarn            wa      Bool    wa              warn for ! if file modified
  278. Xwrapmargin      wm      Num     wm=0            wrap long lines in input mode
  279. Xwrapscan        ws      Bool    ws              at EOF, searches wrap to line 1
  280. X
  281. X        There are three types of options:  Bool,  string,  and  numeric.
  282. X     Boolean  options  are made TRUE by giving the name of the option as
  283. X     an argument to the "set" command; they are made FALSE by  prefixing
  284. X     the name  with  "no".    For  example,  "set  autoindent" makes the
  285. X     autoindent option TRUE, and "set noautoindent" makes it FALSE.  
  286. X
  287. X
  288. X
  289. X
  290. X
  291. X
  292. X
  293. X
  294. X     Elvis 1.4                     OPTIONS                      Page 5-2
  295. X
  296. X
  297. X        To change the value of a string  or  numeric  option,  pass  the
  298. X     "set"  command  the name of the option, followed by an "=" sign and
  299. X     the option's new value.  For example, "set tabstop=8" will give the 
  300. X     tabstop option a value of 8.  For string options, you  may  enclose
  301. X     the new value in quotes.  
  302. X
  303. X
  304. X   E5.1  AutoIndentF
  305. X
  306. X        During  input  mode, the autoindent option will cause each added
  307. X     line to begin with the same amount of  leading  whitespace  as  the
  308. X     line above  it.    Without  autoindent,  added  lines are initially
  309. X     empty.  
  310. X
  311. X
  312. X   E5.2  AutoPrintF
  313. X
  314. X        This option only affects EX mode.  If the autoprint  option  on,
  315. X     and either the cursor has moved to a different line or the previous 
  316. X     command modified the file, then Elvis will print the current line.  
  317. X
  318. X
  319. X   E5.3  AutoWriteF
  320. X
  321. X        When  you're  editing one file and decide to switch to another -
  322. X     via the :tag command, or :next command, perhaps - if  your  current
  323. X     file  has  been  modified,  then Elvis will normally print an error
  324. X     message and refuse to switch.  
  325. X
  326. X        However, if the autowrite option is on, then  Elvis  will  write
  327. X     the modified version of the current file and successfully switch to 
  328. X     the new file.  
  329. X
  330. X
  331. X   E5.4  CCF
  332. X
  333. X        The :cc  command runs the C compiler.  This option should be set
  334. X     to the name of your compiler.  
  335. X
  336. X
  337. X   E5.5  CharAttrF
  338. X
  339. X        Many text formatting programs allow you to designate portions of 
  340. X     your text to be underlined, italicized, or  boldface  by  embedding
  341. X     the special  strings  \fU,  \fI, and \fB in your text.  The special
  342. X     string \fR marks the end of underlined or boldface text.  
  343. X
  344. X        Elvis normally treats those special strings just like any  other
  345. X     text.  
  346. X
  347. X        However, if the charattr option is on, then Elvis will interpret 
  348. X     those  special strings correctly, to display underlined or boldface
  349. X     text on the screen.  (This only works, of course, if your  terminal
  350. X     can  display underlined and boldface, and if the TERMCAP entry says
  351. X     how to do it.) 
  352. X
  353. X
  354. X
  355. X
  356. X
  357. X
  358. X
  359. X
  360. X     Elvis 1.4                     OPTIONS                      Page 5-3
  361. X
  362. X
  363. X   E5.6  COlumnsF
  364. X
  365. X        This is a "read only" option.  You can't change its  value,  but
  366. X     you can have Elvis print it.  It shows how wide your screen is.  
  367. X
  368. X
  369. X   E5.7  DIGraphF
  370. X
  371. X        This  option  is used to enable/disable recognition of digraphs.
  372. X     The default value is nodigraph, which means that digraphs will  not
  373. X     be recognized.  
  374. X
  375. X
  376. X   E5.8  DIRectoryF
  377. X
  378. X        Elvis stores text in temporary files.  This option allows you to 
  379. X     control which  directory those temporary files will appear in.  The
  380. X     default is /usr/tmp.  
  381. X
  382. X        This option can only be set in a .exrc file; after  that,  elvis
  383. X     will  have  already  started  making  temporary files in some other
  384. X     directory, so it would be too late.  
  385. X
  386. X
  387. X   E5.9  EDcompatibleF
  388. X
  389. X        This     option     affects     the     behaviour     of     the
  390. X     ":s/regexp/text/options" command.    It  is normally off (:se noed)
  391. X     which causes all of the  substitution  options  to  be  off  unless
  392. X     explicitly given.  
  393. X
  394. X        However, with edcompatible on (:se ed), the substitution command 
  395. X     remembers which  options  you  used  last time.  Those same options
  396. X     will continue to be used until you change them.    In  edcompatible
  397. X     mode,  when  you explicitly give the name of a substitution option,
  398. X     you will toggle the state of that option.  
  399. X
  400. X        This all seems very strange to me, but  its  implementation  was
  401. X     almost  free  when  I added the ":&" command to repeat the previous
  402. X     substitution, so there it is.  
  403. X
  404. X
  405. X   E5.10  ErrorBellsF
  406. X
  407. X        Elvis normally rings a bell when you do something wrong.    This
  408. X     option lets you disable the bell.  
  409. X
  410. X
  411. X   E5.11  ExRefreshF
  412. X
  413. X        The EX  mode  of Elvis writes many lines to the screen.  You can
  414. X     make Elvis either write each line to the screen separately, or save 
  415. X     up many lines and write them all at once.  
  416. X
  417. X        The exrefresh option is normally on, so each line is written  to
  418. X     the screen separately.  
  419. X
  420. X
  421. X
  422. X
  423. X
  424. X
  425. X
  426. X     Elvis 1.4                     OPTIONS                      Page 5-4
  427. X
  428. X
  429. X        You  may wish to turn the exrefresh option off (:se noer) if the
  430. X     "write" system call is costly on your machine, or if you're using a 
  431. X     windowing environment.  (Windowing environments scroll text  a  lot
  432. X     faster when you write many lines at once.) 
  433. X
  434. X        This option has no effect in visual command mode or input mode.  
  435. X
  436. X
  437. X   E5.12  FlipCaseF
  438. X
  439. X        The  flipcase  option  allows  you  to control how the non-ASCII
  440. X     characters are altered by the "~" command.  
  441. X
  442. X        The string is divided into pairs of characters.    When  "~"  is
  443. X     applied  to  a non-ASCII character, Elvis looks up the character in
  444. X     the flipcase string to see which pair it's in, and replaces  it  by
  445. X     the other character of the pair.  
  446. X
  447. X
  448. X   E5.13  HideFormatF
  449. X
  450. X        Many  text  formatters  require  you to embed format commands in
  451. X     your text, on lines  that  start  with  a  "."  character.    Elvis
  452. X     normally  displays  these  lines  like  any  other text, but if the
  453. X     hideformat option is on, then format lines are displayed  as  blank
  454. X     lines.  
  455. X
  456. X
  457. X   E5.14  IgnoreCaseF
  458. X
  459. X        Normally,  when  Elvis  searches  for  text, it treats uppercase
  460. X     letters as being different for lowercase letters.  
  461. X
  462. X        When the ignorecase option is on, uppercase  and  lowercase  are
  463. X     treated as equal.  
  464. X
  465. X
  466. X   E5.15  InputModeF
  467. X
  468. X        This  option  allows  you to have Elvis start up in insert mode.
  469. X     You can still exit insert mode at any time by hitting the ESC  key,
  470. X     as usual.  Usually, this option would be set in your ".exrc" file.  
  471. X
  472. X
  473. X   E5.16  KeyTimeF
  474. X
  475. X        The   arrow  keys  of  most  terminals  send  a  multi-character
  476. X     sequence.  It takes a measurable amount of time for these sequences 
  477. X     to be transmitted.  The keytime option allows you  to  control  the
  478. X     maximum  amount  of time to allow for an arrow key (or other mapped
  479. X     key) to be received in full.  
  480. X
  481. X        The default keytime value  is  2.    Because  of  the  way  UNIX
  482. X     timekeeping  works,  the  actual  amount  of time allowed will vary
  483. X     slightly, but it will always be between 1 and 2 seconds.  
  484. X
  485. X
  486. X
  487. X
  488. X
  489. X
  490. X
  491. X
  492. X     Elvis 1.4                     OPTIONS                      Page 5-5
  493. X
  494. X
  495. X        If you set keytime to 1, then the actual amount of time  allowed
  496. X     will be  between  0  and  1  second.   This will generally make the
  497. X     keyboard's response be a little faster (mostly for  the  ESC  key),
  498. X     but  on those occasions where the time allowed happens to be closer
  499. X     to 0 than 1 second, Elvis may fail to  allow  enough  time  for  an
  500. X     arrow key's sequence to be received fully.  Ugh.  
  501. X
  502. X        As a special case, you can set keytime to 0 to disable this time 
  503. X     limit stuff  altogether.    The  big problem here is: If your arrow
  504. X     keys' sequences start with an ESC, then every time you hit your ESC 
  505. X     key Elvis will wait...  and wait...  to see if maybe that  ESC  was
  506. X     part of an arrow key's sequence.  
  507. X
  508. X        NOTE:  this  option is a generalization of the timeout option of
  509. X     the real vi.  
  510. X
  511. X
  512. X   E5.17  KeywordPrgF
  513. X
  514. X        Elvis has a special keyword lookup feature.  You move the cursor 
  515. X     onto a word, and hit shift-K, and Elvis  uses  another  program  to
  516. X     look up the word and display information about it.  
  517. X
  518. X        This option says which program gets run.  
  519. X
  520. X        The  default  value  of this option is "ref", which is a program
  521. X     that looks up the definition of a function in C.  It looks  up  the
  522. X     function name in a file called "refs" which is created by ctags.  
  523. X
  524. X        You  can subtitute other programs, such as an English dictionary
  525. X     program or the online manual.  Elvis runs the  program,  using  the
  526. X     keyword as its only argument.  The program should write information 
  527. X     to stdout.   The program's exit status should be 0, unless you want
  528. X     Elvis to print "<<< failed >>>".  
  529. X
  530. X
  531. X   E5.18  LiNesF
  532. X
  533. X        This "read only" option shows how many lines you screen has.  
  534. X
  535. X
  536. X   E5.19  LIstF
  537. X
  538. X        In nolist mode (the default), elvis displays text in a  "normal"
  539. X     manner  --  with  tabs expanded to an appropriate number of spaces,
  540. X     etc.  
  541. X
  542. X        However, sometimes it is useful to have tab characters displayed 
  543. X     differently.  In list mode, tabs are displayed as "^I", and  a  "$"
  544. X     is displayed at the end of each line.  
  545. X
  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. X     Elvis 1.4                     OPTIONS                      Page 5-6
  559. X
  560. X
  561. X   E5.20  MAgicF
  562. X
  563. X        The  search  mechanism in Elvis can accept "regular expressions"
  564. X     -- strings in which certain characters have special meaning.  
  565. X
  566. X        The magic option is normally on, which causes  these  characters
  567. X     to be treated specially.  
  568. X
  569. X        If you turn the magic option off (:se noma), then all characters 
  570. X     except ^ and $ are treated literally.  ^ and $ retain their special 
  571. X     meanings regardless of the setting of magic.  
  572. X
  573. X
  574. X   E5.21  MaKeF
  575. X
  576. X        The :make command runs your "make" program.  This option defines 
  577. X     the name of your "make" program.  
  578. X
  579. X
  580. X   E5.22  ModeLineF
  581. X
  582. X        Elvis supports   modelines.     Modelines  are  lines  near  the
  583. X     beginning or end of your text file which contain "ex:yowza:", where 
  584. X     "yowza" is any EX command.  A typical "yowza"  would  be  something
  585. X     like "set ts=4 ca kp=spell".  
  586. X
  587. X        Normally  these  lines are ignored, for security reasons, but if
  588. X     you have  "set  modeline"  in  your  .exrc  file  then  "yowza"  is
  589. X     executed.  
  590. X
  591. X
  592. X   E5.23  PAragraphsF
  593. X
  594. X        The  {  and  }  commands  move the cursor forward or backward in
  595. X     increments of one paragraph.  Paragraphs may be separated by  blank
  596. X     lines, or  by  a "dot" command of a text formatter.  Different text
  597. X     formatters use different "dot" commands.  This option allows you to 
  598. X     configure Elvis to work with your text formatter.  
  599. X
  600. X        It is assumed that your formatter uses commands that start  with
  601. X     a  "."  character  at  the front of a line, and then have a one- or
  602. X     two-character command name.  
  603. X
  604. X        The value of the paragraphs option is a  string  in  which  each
  605. X     pair  of  characters  is one possible form of your text formatter's
  606. X     paragraph command.  
  607. X
  608. X
  609. X   E5.24  ReadOnlyF
  610. X
  611. X        Normally, Elvis will let you write back any file  to  which  you
  612. X     have write  permission.    If you don't have write permission, then
  613. X     you can only write the changed version of the file to  a  -1different-0
  614. X     file.  
  615. X
  616. X
  617. X
  618. X
  619. X
  620. X
  621. X
  622. X
  623. X
  624. X     Elvis 1.4                     OPTIONS                      Page 5-7
  625. X
  626. X
  627. X        If  you  set  the  readonly  option, then Elvis will pretend you
  628. X     don't have write permission to -1any-0 file you edit.    It  is  useful
  629. X     when  you  really  only mean to use Elvis to look at a file, not to
  630. X     change it.  This way you can't change it accidentally.  
  631. X
  632. X        This option is normally off, unless you use the "view" alias  of
  633. X     Elvis.  "View" is like "vi" except that the readonly option is on.  
  634. X
  635. X
  636. X   E5.25  REportF
  637. X
  638. X        Commands in  Elvis  may  affect  many  lines.  For commands that
  639. X     affect a lot of lines, Elvis will output a message saying what  was
  640. X     done and  how  many lines were affected.  This option allows you to
  641. X     define what "a lot of lines" means.   The  default  is  5,  so  any
  642. X     command  which  affects  5 or more lines will cause a message to be
  643. X     shown.  
  644. X
  645. X
  646. X   E5.26  SCrollF
  647. X
  648. X        The ^U and ^D keys normally scroll backward or forward by half a 
  649. X     screenful, but this is adjustable.  The value of this  option  says
  650. X     how many lines those keys should scroll by.  
  651. X
  652. X
  653. X   E5.27  SEctionsF
  654. X
  655. X        The  [[  and  ]] commands move the cursor backward or forward in
  656. X     increments of 1  section.    Sections  may  be  delimited  by  a  {
  657. X     character  in  column  1  (which is useful for C source code) or by
  658. X     means of a text formatter's "dot" commands.  
  659. X
  660. X        This option allows you to configure Elvis to work with your text 
  661. X     formatter's "section" command, in exectly the  same  way  that  the
  662. X     paragraphs  option  makes it work with the formatter's "paragraphs"
  663. X     command.  
  664. X
  665. X
  666. X   E5.28  SHellF
  667. X
  668. X        When Elvis forks  a  shell  (perhaps  for  the  :!    or  :shell
  669. X     commands) this  is  the  program  that is uses as a shell.  This is
  670. X     "/bin/sh" by default, unless you have set the  SHELL  (or  COMSPEC,
  671. X     for  MS-DOS)  environment variable, it which case the default value
  672. X     is copied from the environment.  
  673. X
  674. X
  675. X   E5.29  ShiftWidthF
  676. X
  677. X        The < and > commands shift text left or right  by  some  uniform
  678. X     number of  columns.    The  shiftwidth option defines that "uniform
  679. X     number".  The default is 8.  
  680. X
  681. X
  682. X
  683. X
  684. X
  685. X
  686. X
  687. X
  688. X
  689. X
  690. X     Elvis 1.4                     OPTIONS                      Page 5-8
  691. X
  692. X
  693. X   E5.30  ShowMatchF
  694. X
  695. X        With showmatch set, in input mode every time you hit one of )}], 
  696. X     Elvis will momentarily move the cursor to the matching ({[.  
  697. X
  698. X
  699. X   E5.31  ShowMoDeF
  700. X
  701. X        In visual mode, it is easy  to  forget  whether  you're  in  the
  702. X     visual command  mode or input/replace mode.  Normally, the showmode
  703. X     option is off, and you haven't a clue as to which mode  you're  in.
  704. X     If  you  turn the showmode option on, though, a little message will
  705. X     appear in the lower right-hand corner of your screen,  telling  you
  706. X     which mode you're in.  
  707. X
  708. X
  709. X   E5.32  SideScrollF
  710. X
  711. X        For long lines, Elvis scrolls sideways.  (This is different from 
  712. X     the  real  vi,  which wraps a single long line onto several rows of
  713. X     the screen.) 
  714. X
  715. X        To minimize the number of scrolls needed, Elvis moves the screen 
  716. X     sideways by several characters at a time.  The value of this option 
  717. X     says how many characters' widths to scroll at a time.  
  718. X
  719. X        Generally, the faster your screen can be redrawn, the lower  the
  720. X     value you will want in this option.  
  721. X
  722. X
  723. X   E5.33  SYncF
  724. X
  725. X        If  the system crashes during an edit session, then most of your
  726. X     work can be recovered from the temporary file that  elvis  uses  to
  727. X     store changes.   However, sometimes the OS will not copy changes to
  728. X     the hard disk immediately, so recovery might not be possible.   The
  729. X     [no]sync option lets you control this.  
  730. X
  731. X        In  nosync mode (which is the default, for UNIX), elvis lets the
  732. X     operating system control when data is written to the disk.  This is 
  733. X     generally faster.  
  734. X
  735. X        In sync mode (which is the default, for  MS-DOS),  elvis  forces
  736. X     all changes  out  to  disk  every  time you make a change.  This is
  737. X     generally safer, but slower.  It can also be a rather rude thing to 
  738. X     do on a multi-user system.  
  739. X
  740. X
  741. X   E5.34  TabStopF
  742. X
  743. X        Tab characters are normally  8  characters  wide,  but  you  can
  744. X     change their widths by means of this option.  
  745. X
  746. X
  747. X
  748. X
  749. X
  750. X
  751. X
  752. X
  753. X
  754. X
  755. X
  756. X     Elvis 1.4                     OPTIONS                      Page 5-9
  757. X
  758. X
  759. X   E5.35  TErmF
  760. X
  761. X        This "read only" option shows the name of the termcap entry that 
  762. X     Elvis is using for your terminal.  
  763. X
  764. X
  765. X   E5.36  VBellF
  766. X
  767. X        If your termcap entry describes a visible alternative to ringing 
  768. X     your terminal's bell, then this option will say whether the visible 
  769. X     version gets used or not.  Normally it will be.  
  770. X
  771. X        If your termcap does NOT include a visible bell capability, then 
  772. X     the vbell option will be off, and you can't turn it on.  
  773. X
  774. X
  775. X   E5.37  WArnF
  776. X
  777. X        If you have modified a file but not yet written it back to disk, 
  778. X     then Elvis will normally print a warning before executing a ":!cmd" 
  779. X     command.  However, in nowarn mode, this warning is not given.  
  780. X
  781. X        Elvis  also  normally prints a message after a successful search
  782. X     that wrapped at EOF.  The [no]warn option  can  also  disable  this
  783. X     warning.  
  784. X
  785. X
  786. X   E5.38  WrapMarginF
  787. X
  788. X        Normally   (with  wrapmargin=0)  Elvis  will  let  you  type  in
  789. X     extremely long lines, if you wish.  
  790. X
  791. X        However,  with  warpmargin  set  to  something  other   that   0
  792. X     (wrapmargin=10  is nice), Elvis will automatically cause long lines
  793. X     to be "wrapped" on a word break for lines longer than  wrapmargin's
  794. X     setting.  
  795. X
  796. X
  797. X   E5.39  WrapScanF
  798. X
  799. X        Normally,  when  you search for something, Elvis will find it no
  800. X     matter where it is in  the  file.    Elvis  starts  at  the  cursor
  801. X     position, and  searches forward.  If Elvis hits EOF without finding
  802. X     what you're looking for, then it wraps around to continue searching 
  803. X     from line 1.  
  804. X
  805. X        If you turn off the wrapscan option (:se nows), then when  Elvis
  806. X     hits EOF during a search, it will stop and say so.  
  807. X
  808. X
  809. X
  810. X
  811. X
  812. X
  813. X
  814. X
  815. X
  816. X
  817. X
  818. X
  819. X
  820. X
  821. eof
  822. if test `wc -c <doc/options.doc` -ne 20926
  823. then
  824. echo doc/options.doc damaged!
  825. fi
  826. fi
  827.  
  828. if test -f doc/environ.doc -a "$1" != -f
  829. then
  830. echo Will not overwrite doc/environ.doc
  831. else
  832. echo Extracting doc/environ.doc
  833. sed 's/^X//' >doc/environ.doc <<\eof
  834. X
  835. X     Elvis 1.4              ENVIRONMENT VARIABLES              Page 11-1
  836. X
  837. X
  838. XE11.  ENVIRONMENT VARIABLESF
  839. X
  840. X        Elvis  examines several environment variables when it starts up.
  841. X     The values of these variables are used internally for a variety  of
  842. X     purposes.   You don't need to define all of these; on most systems,
  843. X     Elvis only requires TERM to be defined.  On  MS-DOS  systems,  even
  844. X     that is optional.  
  845. X
  846. X
  847. X   E11.1  TERM, TERMCAPF
  848. X
  849. X        TERM tells  Elvis the name of the termcap entry to use.  TERMCAP
  850. X     may contain either the entire termcap entry, or the  full  pathname
  851. X     of the termcap file to search through.  
  852. X
  853. X
  854. X   E11.2  TMP, TEMPF
  855. X
  856. X        These only  work  for  MS-DOS  and  Atari  TOS.  Either of these
  857. X     variables may be used to set the "directory" option, which controls 
  858. X     where temporary files are stored.  If you define  them  both,  then
  859. X     TMP is used, and TEMP is ignored.  
  860. X
  861. X
  862. X   E11.3  EXINITF
  863. X
  864. X        This  variable  may  contain a colon-mode command, which will be
  865. X     executed after all of the  ".exrc"  files  but  before  interactive
  866. X     editing begins.  
  867. X
  868. X
  869. X   E11.4  SHELL, COMSPECF
  870. X
  871. X        You  can use COMSPEC in MS-DOS, or SHELL in any other system, to
  872. X     specify which shell should  be  used  for  executing  commands  and
  873. X     expanding wildcards.  
  874. X
  875. X
  876. X   E11.5  HOMEF
  877. X
  878. X        This  variable  should  give  the  full  pathname  of  your home
  879. X     directory.  Elvis needs to know the name of your home directory  so
  880. X     it can locate the ".exrc" file there.  
  881. X
  882. X
  883. X
  884. X
  885. X
  886. X
  887. X
  888. X
  889. X
  890. X
  891. X
  892. X
  893. X
  894. X
  895. X
  896. X
  897. X
  898. X
  899. X
  900. eof
  901. if test `wc -c <doc/environ.doc` -ne 1562
  902. then
  903. echo doc/environ.doc damaged!
  904. fi
  905. fi
  906.  
  907. if test -f doc/regexp.doc -a "$1" != -f
  908. then
  909. echo Will not overwrite doc/regexp.doc
  910. else
  911. echo Extracting doc/regexp.doc
  912. sed 's/^X//' >doc/regexp.doc <<\eof
  913. X
  914. X     Elvis 1.4               REGULAR EXPRESSIONS                Page 4-1
  915. X
  916. X
  917. XE4.  REGULAR EXPRESSIONSF
  918. X
  919. X        Elvis uses regular expressions for searching and substututions.  
  920. X
  921. X
  922. X   E4.1  SyntaxF
  923. X
  924. X        Elvis' regexp package treats the following one- or two-character 
  925. X     strings (called meta-characters) in special ways: 
  926. X
  927. X                \( \)   Used to delimit subexpressions
  928. X                ^       Matches the beginning of a line
  929. X                $       Matches the end of a line
  930. X                \<      Matches the beginning of a word
  931. X                \>      Matches the end of a word
  932. X                [ ]     Matches any single character inside the brackets
  933. X                *       The preceding may be repeated 0 or more times
  934. X                \+      The preceding may be repeated 1 or more times
  935. X                \?      The preceding is optional
  936. X
  937. X        Anything  else is treated as a normal character which must match
  938. X     exactly.  The special strings may all be preceded by a backslash to 
  939. X     force them to be treated normally.  
  940. X
  941. X
  942. X   E4.2  OptionsF
  943. X
  944. X        Elvis has two options which affect the way  regular  expressions
  945. X     are used.    These  options  may  be  examined  or set via the :set
  946. X     command.  
  947. X
  948. X        The first option is called  "[no]magic".    This  is  a  boolean
  949. X     option, and  it is "magic" (TRUE) by default.  While in magic mode,
  950. X     all of the meta-characters behave as described above.   In  nomagic
  951. X     mode, only ^ and $ retain their special meaning.  
  952. X
  953. X        The second option is called "[no]ignorecase".  This is a boolean 
  954. X     option, and  it  is  "noignorecase"  (FALSE)  by default.  While in
  955. X     ignorecase mode,  the  searching  mechanism  will  not  distinguish
  956. X     between an   uppercase   letter   and   its  lowercase  form.    In
  957. X     noignorecase mode, uppercase and lowercase  are  treated  as  being
  958. X     different.  
  959. X
  960. X        Also, the "[no]wrapscan" option affects searches.  
  961. X
  962. X
  963. X   E4.3  SubstitutionsF
  964. X
  965. X        The :s command has at least two arguments: a regular expression, 
  966. X     and a  substitution  string.    The  text  that matched the regular
  967. X     expression  is  replaced  by  text  which  is  derived   from   the
  968. X     substitution string.  
  969. X
  970. X
  971. X
  972. X
  973. X
  974. X
  975. X
  976. X
  977. X
  978. X
  979. X
  980. X     Elvis 1.4               REGULAR EXPRESSIONS                Page 4-2
  981. X
  982. X
  983. X        Most  characters  in the substitution string are copied into the
  984. X     text literally but a few have special meaning: 
  985. X
  986. X        &       Insert a copy of the original text
  987. X        ~       Insert a copy of the previous replacement text
  988. X        \1      Insert a copy of that portion of the original text which
  989. X                matched the first set of \( \) parentheses.
  990. X        \2 - \9 Does the same for the second (etc.) pair of \( \).
  991. X        \U      Convert all chars of any later &, ~, or \# to uppercase
  992. X        \L      Convert all chars of any later &, ~, or \# to lowercase
  993. X        \E      End the effect of \U or \L
  994. X        \u      Convert the first char of the next &, ~ or \# to uppercase
  995. X        \l      Convert the first char of the next &, ~ or \# to lowercase
  996. X
  997. X        These may be preceded by a backslash to force them to be treated 
  998. X     normally.  If "nomagic" mode is in effect, then &  and  ~  will  be
  999. X     treated normally, and you must write them as \& and \~ form them to 
  1000. X     have special meaning.  
  1001. X
  1002. X
  1003. X   E4.4  ExamplesF
  1004. X
  1005. X        This example changes every occurence of "utilize" to "use": 
  1006. X
  1007. X            :%s/utilize/use/g
  1008. X
  1009. X        This  example deletes all whitespace that occurs at the end of a
  1010. X     line anywhere in the file.  (The brackets contain  a  single  space
  1011. X     and a single tab.): 
  1012. X
  1013. X            :%s/[   ]\+$//
  1014. X
  1015. X        This example converts the current line to uppercase: 
  1016. X
  1017. X            :s/.*/\U&/
  1018. X
  1019. X        This  example  underlines  each  letter  in the current line, by
  1020. X     changing it into an "underscore backspace letter" sequence.    (The
  1021. X     ^H is entered as "control-V backspace".): 
  1022. X
  1023. X            :s/[a-zA-Z]/_^H&/g
  1024. X
  1025. X        This  example  locates  the  last colon in a line, and swaps the
  1026. X     text before the colon with the text after the colon.  The first  \(
  1027. X     \)  pair  is  used to delineate the stuff before the colon, and the
  1028. X     second pair delineates the stuff after.  In the substitution  text,
  1029. X     \1 and \2 are given in reverse order, to perform the swap: 
  1030. X
  1031. X            :s/\(.*\):\(.*\)/\2:\1/
  1032. X
  1033. X
  1034. X
  1035. X
  1036. X
  1037. X
  1038. X
  1039. X
  1040. X
  1041. X
  1042. X
  1043. X
  1044. X
  1045. eof
  1046. if test `wc -c <doc/regexp.doc` -ne 4398
  1047. then
  1048. echo doc/regexp.doc damaged!
  1049. fi
  1050. fi
  1051.  
  1052. if test -f doc/internal.doc -a "$1" != -f
  1053. then
  1054. echo Will not overwrite doc/internal.doc
  1055. else
  1056. echo Extracting doc/internal.doc
  1057. sed 's/^X//' >doc/internal.doc <<\eof
  1058. X
  1059. X     Elvis 1.4                    INTERNAL                      Page 8-1
  1060. X
  1061. X
  1062. XE8.  INTERNALF
  1063. X
  1064. X        You  don't  need  to  know  the  material in this section to use
  1065. X     elvis.  You only need it if you intend to modify elvis.  
  1066. X
  1067. X
  1068. X   E8.1  The temporary fileF
  1069. X
  1070. X        The temporary file is divided into blocks of 1024 bytes each.  
  1071. X
  1072. X        When elvis starts up, the file  is  copied  into  the  temporary
  1073. X     file.  Small amounts of extra space are inserted into the temporary 
  1074. X     file  to  insure  that  no  text lines cross block boundaries; this
  1075. X     speeds up processing and simplifies storage management.  The "extra 
  1076. X     space" is filled with NUL  characters;  the  input  file  must  not
  1077. X     contain any NULs, to avoid confusion.  
  1078. X
  1079. X        The  first  block  of  the  temporary file is an array of shorts
  1080. X     which describe the order of the blocks;  i.e.    header[1]  is  the
  1081. X     block number  of  the  first  block,  and  so  on.  This limits the
  1082. X     temporary file to 512 active blocks, so the largest  file  you  can
  1083. X     edit is about 400K bytes long.  I hope that's enough!  
  1084. X
  1085. X        When blocks are altered, they are rewritten to a -1different-0 block 
  1086. X     in the file, and the in-core version of the header block is updated 
  1087. X     accordingly.   The  in-core header block will be copied to the temp
  1088. X     file immediately before the  next  change...    or,  to  undo  this
  1089. X     change,  swap  the  old  header  (from  the temp file) with the new
  1090. X     (in-core) header.  
  1091. X
  1092. X        Elvis  maintains  another  in-core  array  which  contains   the
  1093. X     line-number of the last line in every block.  This allows you to go 
  1094. X     directly to a line, given its line number.  
  1095. X
  1096. X
  1097. X   E8.2  Implementation of EditingF
  1098. X
  1099. X        There are three basic operations which affect text: 
  1100. X
  1101. X            * delete text   - delete(from, to)
  1102. X            * add text      - add(at, text)
  1103. X            * yank text     - cut(from, to)
  1104. X
  1105. X        To yank text, all text between two text positions is copied into 
  1106. X     a cut buffer.   The original text is not changed.  To copy the text
  1107. X     into a cut buffer, you need only  remember  which  physical  blocks
  1108. X     that  contain  the cut text, the offset into the first block of the
  1109. X     start of the cut, the offset into the last block of the end of  the
  1110. X     cut, and  what  kind  of cut it was.  (Cuts may be either character
  1111. X     cuts or line cuts; the kind of a cut affects the way  it  is  later
  1112. X     "put".) This is implemented in the function cut().  
  1113. X
  1114. X        To  delete  text, you must modify the first and last blocks, and
  1115. X     remove any reference to the  intervening  blocks  in  the  header's
  1116. X     list.  The  text  to be deleted is specified by two marks.  This is
  1117. X     implemented in the function delete().  
  1118. X
  1119. X
  1120. X
  1121. X
  1122. X
  1123. X
  1124. X
  1125. X     Elvis 1.4                    INTERNAL                      Page 8-2
  1126. X
  1127. X
  1128. X        To add  text,  you  must  specify  the  text  to  insert  (as  a
  1129. X     NUL-terminated string) and the place to insert it (as a mark).  The 
  1130. X     block  into  which  the text is to be inserted may need to be split
  1131. X     into as many as four blocks, with new intervening blocks needed  as
  1132. X     well...   or  it  could  be  as simple as modifying a single block.
  1133. X     This is implemented in the function add().  
  1134. X
  1135. X        Other interesting functions are paste() (to copy text from a cut 
  1136. X     buffer into the file), modify() (for an efficient way to  implement
  1137. X     a  combined delete/add sequence), and input() (to get text from the
  1138. X     user & insert it into the file).  
  1139. X
  1140. X        When text is modified, an internal file-revision counter, called 
  1141. X     "changes", is incremented.  This counter is  used  to  detect  when
  1142. X     certain caches  are  out  of  date.  (The "changes" counter is also
  1143. X     incremented when we switch to a different file, and also in one  or
  1144. X     two similar situations -- all related to invalidating caches.) 
  1145. X
  1146. X
  1147. X   E8.3  Marks and the CursorF
  1148. X
  1149. X        Marks are   places  within  the  text.    They  are  represented
  1150. X     internally as a long variable which is split into two bitfields:  a
  1151. X     line number  and a character index.  Line numbers start with 1, and
  1152. X     character indexes start with 0.  
  1153. X
  1154. X        Since line numbers start with 1, it is impossible for a set mark 
  1155. X     to have a value of 0L.  0L is therefore  used  to  represent  unset
  1156. X     marks.  
  1157. X
  1158. X        When  you  do the "delete text" change, any marks that were part
  1159. X     of the deleted text are unset, and  any  marks  that  were  set  to
  1160. X     points after  it are adjusted.  Similarly, marks are adjusted after
  1161. X     new text is inserted.  
  1162. X
  1163. X        The cursor is represented as a mark.  
  1164. X
  1165. X
  1166. X   E8.4  Colon Command InterpretationF
  1167. X
  1168. X        Colon commands are parsed, and the command name is looked up  in
  1169. X     an array of structures which also contain a pointer to the function 
  1170. X     that  implements  the  command,  and a description of the arguments
  1171. X     that the command can take.  If the command is  recognized  and  its
  1172. X     arguments are legal, then the function is called.  
  1173. X
  1174. X        Each function performs its task; this may cause the cursor to be 
  1175. X     moved to a different line, or whatever.  
  1176. X
  1177. X
  1178. X   E8.5  Screen ControlF
  1179. X
  1180. X        The  screen  is  updated  via  a  package  which  looks like the
  1181. X     "curses" library, but isn't.  It is actually much  simpler.    Most
  1182. X     curses  operations  are implemented as macros which copy characters
  1183. X     into a large I/O buffer, which is then written with a single  large
  1184. X     write() call as part of the refresh() operation.  
  1185. X
  1186. X
  1187. X
  1188. X
  1189. X
  1190. X
  1191. X     Elvis 1.4                    INTERNAL                      Page 8-3
  1192. X
  1193. X
  1194. X        The  functions  which  modify  text  (namely add() and delete())
  1195. X     remember where text has been modified.  They do this by calling the 
  1196. X     function redrawrange().  The screen redrawing  function,  redraw(),
  1197. X     uses  these  clues  to  help  it  reduce the amount of text that is
  1198. X     redrawn each time.  
  1199. X
  1200. X
  1201. X   E8.6  PortabilityF
  1202. X
  1203. X        To  improve  portability,  Elvis  collects  as   much   of   the
  1204. X     system-dependent  definitions  as  possible into the config.h file.
  1205. X     This file begins with some preprocessor instructions which  attempt
  1206. X     to determine  which  compiler and operating system you have.  After
  1207. X     that, it conditionally defines some macros and constants  for  your
  1208. X     system.  
  1209. X
  1210. X        One of  the  more  significant  macros  is ttyread(buf,n).  This
  1211. X     macro is used to read raw characters from the keyboard.  An attempt 
  1212. X     to read may be cut short by a SIGALRM signal.   For  UNIX  systems,
  1213. X     this simply  reads  bytes  from  stdin.    For MSDOS, TOS, and OS9,
  1214. X     ttyread() is a function defined in  curses.c.    There  is  also  a
  1215. X     ttywrite() macro.  
  1216. X
  1217. X        The  tread()  and  twrite()  macros  are  versions of read() and
  1218. X     write() that are used for text files.  On UNIX systems,  these  are
  1219. X     equivelent to  read()  and  write().    On  MS-DOS,  these are also
  1220. X     equivelent to read() and write(), since DOS libraries are generally 
  1221. X     clever enough to convert newline  characters  automatically.    For
  1222. X     Atari  TOS, though, the MWC library is too stupid to do this, so we
  1223. X     had to do the conversion explicitly.  
  1224. X
  1225. X        Other macros may substitute index() for strchr(), or bcopy() for 
  1226. X     memcpy(), or map the "void" data type to "int", or whatever.  
  1227. X
  1228. X        The file "tinytcap.c" contains a set of functions  that  emulate
  1229. X     the termcap  library  for  a  small  set  of  terminal  types.  The
  1230. X     terminal-specific info is hard-coded into this file.   It  is  only
  1231. X     used for   systems  that  don't  support  real  termcap.    Another
  1232. X     alternative for screen control can be seen in  the  "curses.h"  and
  1233. X     "pc.c" files.    Here, macros named VOIDBIOS and CHECKBIOS are used
  1234. X     to  indirectly  call  functions  which  perform  low-level   screen
  1235. X     manipulation via BIOS calls.  
  1236. X
  1237. X        The  stat()  function  must  be  able to come up with UNIX-style
  1238. X     major/minor/inode  numbers  that  uniquely  identify  a   file   or
  1239. X     directory.  
  1240. X
  1241. X        Please  try  to  keep  you  changes  localized, and wrap them in
  1242. X     #if/#endif pairs, so that elvis can  still  be  compiled  on  other
  1243. X     systems.   And  PLEASE  let  me know about it, so I can incorporate
  1244. X     your changes into my latest-and-greatest version of elvis.  
  1245. X
  1246. X
  1247. X
  1248. X
  1249. X
  1250. X
  1251. X
  1252. X
  1253. X
  1254. X
  1255. X
  1256. eof
  1257. if test `wc -c <doc/internal.doc` -ne 8379
  1258. then
  1259. echo doc/internal.doc damaged!
  1260. fi
  1261. fi
  1262.  
  1263. if test -f doc/termcap.doc -a "$1" != -f
  1264. then
  1265. echo Will not overwrite doc/termcap.doc
  1266. else
  1267. echo Extracting doc/termcap.doc
  1268. sed 's/^X//' >doc/termcap.doc <<\eof
  1269. X
  1270. X     Elvis 1.4                     TERMCAP                     Page 10-1
  1271. X
  1272. X
  1273. XE10.  TERMCAPF
  1274. X
  1275. X        Elvis uses  fairly  standard  termcap fields for most things.  I
  1276. X     invented the cursor shape names but other than that there should be 
  1277. X     no surprises.  
  1278. X
  1279. X
  1280. X   E10.1  Required numeric fieldsF
  1281. X
  1282. X        :co#:   number of columns on the screen (characters per line)
  1283. X        :li#:   number of lines on the screen
  1284. X
  1285. X
  1286. X   E10.2  Required string fieldsF
  1287. X
  1288. X        :ce=:   clear to end-of-line
  1289. X        :cl=:   home the cursor & clear the screen
  1290. X        :cm=:   move the cursor to a given row/column
  1291. X        :up=:   move the cursor up one line
  1292. X
  1293. X
  1294. X   E10.3  Boolean fieldsF
  1295. X
  1296. X        :am:    auto margins - wrap when a char is written to the last column?
  1297. X        :pt:    physical tabs?
  1298. X
  1299. X
  1300. X   E10.4  Optional string fieldsF
  1301. X
  1302. X        :al=:   insert a blank row on the screen
  1303. X        :dl=:   delete a row from the screen
  1304. X        :cd=:   clear to end of display
  1305. X        :ei=:   end insert mode
  1306. X        :ic=:   insert a blank character
  1307. X        :im=:   start insert mode
  1308. X        :dc=:   delete a character
  1309. X        :sr=:   scroll reverse (insert a row at the top of the screen)
  1310. X        :vb=:   visible bell
  1311. X        :ti=:   terminal initialization string, to start full-screen mode
  1312. X        :te=:   terminal termination, to end full-screen mode
  1313. X        :ks=:   enables the cursor keypad
  1314. X        :ke=:   disables the cursor keypad
  1315. X
  1316. X
  1317. X   E10.5  Optional strings received from the keyboardF
  1318. X
  1319. X        :kd=:   sequence sent by the <down arrow> key
  1320. X        :kl=:   sequence sent by the <left arrow> key
  1321. X        :kr=:   sequence sent by the <right arrow> key
  1322. X        :ku=:   sequence sent by the <up arrow> key
  1323. X        :kP=:   sequence sent by the <PgUp> key
  1324. X        :kN=:   sequence sent by the <PgDn> key
  1325. X        :kh=:   sequence sent by the <Home> key
  1326. X        :kH=:   sequence sent by the <End> key
  1327. X
  1328. X
  1329. X
  1330. X
  1331. X
  1332. X
  1333. X
  1334. X
  1335. X
  1336. X     Elvis 1.4                     TERMCAP                     Page 10-2
  1337. X
  1338. X
  1339. X        Originally, termcap  didn't  have  any  names  for  the  <PgUp>,
  1340. X     <PgDn>, <Home>,  and  <End>  keys.    Although the capability names
  1341. X     shown in the  table  above  are  the  most  common,  they  are  -1not-0
  1342. X     universal.  SCO Xenix uses :PU=:PD=:HM=:EN=: for those keys.  Also, 
  1343. X     if  the four arrow keys happen to be part of a 3x3 keypad, then the
  1344. X     five non-arrow keys may be named :K1=: through :K5=:, so an IBM  PC
  1345. X     keyboard may be described using those names instead.  Elvis can any 
  1346. X     of these names.  
  1347. X
  1348. X
  1349. X   E10.6  Optional fields that describe character attributesF
  1350. X
  1351. X        :so=: :se=:     start/end standout mode (We don't care about :sg#:)
  1352. X        :us=: :ue=:     start/end underlined mode
  1353. X        :md=: :me=:     start/end boldface mode
  1354. X        :as=: :ae=:     start/end alternate character set (italics)
  1355. X        :ug#:           visible gap left by :us=:ue=:md=:me=:as=:ae=:
  1356. X
  1357. X
  1358. X   E10.7  Optional fields that affect the cursor's shapeF
  1359. X
  1360. X        The  :cQ=: string is used by elvis immediately before exiting to
  1361. X     undo the effects of the other cursor shape strings.   If  :cQ=:  is
  1362. X     not given, then all other cursor shape strings are ignored.  
  1363. X
  1364. X        :cQ=:   normal cursor
  1365. X        :cX=:   cursor shape used for reading EX command -- steady underline
  1366. X        :cV=:   cursor shape used for reading VI commands -- steady block
  1367. X        :cI=:   cursor shape used during VI input mode -- blinking underline
  1368. X        :cR=:   cursor shape used during VI replace mode -- blinking block
  1369. X
  1370. X        If  the  capabilities above aren't given, then Elvis will try to
  1371. X     use the following values instead.  
  1372. X
  1373. X        :ve=:   normal cursor, used as :cQ=:cX=:cI=:cR=:
  1374. X        :vs=:   gaudy cursor, used as :cV=:
  1375. X
  1376. X
  1377. X   E10.8  An exampleF
  1378. X
  1379. X        Here's the termcap entry I use on my Minix-ST system.   Some  of
  1380. X     the fields in it have nothing to do with Elvis.  Some can only work 
  1381. X     on my system; I have modified my kernel's screen driver.  
  1382. X
  1383. X
  1384. X            mx|minix|minixst|ansi:\
  1385. X                :is=\E[0~:co#80:li#25:bs:pt:\
  1386. X                :cm=\E[%i%d;%dH:up=\E[A:do=^J:nd=\E[C:sr=\EM:\
  1387. X                :cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
  1388. X                :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:im=:ei=:\
  1389. X                :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\
  1390. X                :md=\E[1m:me=\E[m:as=\E[1;3m:ae=\E[m:\
  1391. X                :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
  1392. X                :k1=\E[1~:k2=\E[2~:k3=\E[3~:k4=\E[4~:k5=\E[5~:\
  1393. X                :k6=\E[6~:k7=\E[17~:k8=\E[18~:k9=\E[19~:k0=\E[20~:\
  1394. X                :kU=\E[36~:kQ=\E[32~:kH=\E[28~:\
  1395. X                :GV=3:GH=D:G1=?:G2=Z:G3=@:G4=Y:GC=E:GL=4:GR=C:GU=A:GD=B:\
  1396. X                :cQ=\E[k:cX=\E[2;0k:cV=\E[16;0k:cI=\E[k:cR=\E[16;20k
  1397. X
  1398. X
  1399. X
  1400. X
  1401. eof
  1402. if test `wc -c <doc/termcap.doc` -ne 4696
  1403. then
  1404. echo doc/termcap.doc damaged!
  1405. fi
  1406. fi
  1407.  
  1408. if test -f doc/index.doc -a "$1" != -f
  1409. then
  1410. echo Will not overwrite doc/index.doc
  1411. else
  1412. echo Extracting doc/index.doc
  1413. sed 's/^X//' >doc/index.doc <<\eof
  1414. X
  1415. X
  1416. X
  1417. X
  1418. X
  1419. X
  1420. X
  1421. X
  1422. X
  1423. X
  1424. X
  1425. X
  1426. X
  1427. X
  1428. X
  1429. X
  1430. X                   @@@@@@@  @       @     @   @@@    @@@@@ 
  1431. X                   @        @       @     @    @    @     @
  1432. X                   @        @       @     @    @    @      
  1433. X                   @@@@@    @       @     @    @     @@@@@ 
  1434. X                   @        @        @   @     @          @
  1435. X                   @        @         @ @      @    @     @
  1436. X                   @@@@@@@  @@@@@@@    @      @@@    @@@@@ 
  1437. X
  1438. X                             - a clone of vi/ex -
  1439. X                                  version 1.4
  1440. X
  1441. X
  1442. X
  1443. X
  1444. X
  1445. X
  1446. X
  1447. X
  1448. X
  1449. X
  1450. X
  1451. X
  1452. X
  1453. X
  1454. X
  1455. X
  1456. X
  1457. X
  1458. X
  1459. X
  1460. X
  1461. X
  1462. XAuthor: Steve Kirkendall
  1463. X        14407 SW Teal Blvd., Apt C
  1464. X        Beaverton, OR 97005
  1465. X
  1466. XE-Mail: kirkenda@cs.pdx.edu
  1467. X
  1468. XPhone:  (503) 642-9905
  1469. X
  1470. X
  1471. X
  1472. X
  1473. X
  1474. X
  1475. X
  1476. X
  1477. X
  1478. X
  1479. X
  1480. X
  1481. X
  1482. X
  1483. X
  1484. X                          ---=: C O N T E N T S :=---
  1485. X
  1486. X
  1487. X
  1488. X    1.  INTRODUCTION ................................................... 1-1
  1489. X      1.1  Compiling ................................................... 1-1
  1490. X      1.2  Overview of Elvis ........................................... 1-1
  1491. X
  1492. X    2.  VISUAL MODE COMMANDS ........................................... 2-1
  1493. X      2.1  Input Mode .................................................. 2-4
  1494. X      2.2  Arrow keys in Input Mode .................................... 2-4
  1495. X      2.3  Digraphs .................................................... 2-5
  1496. X      2.4  Abbreviations ............................................... 2-5
  1497. X      2.5  Auto-Indent ................................................. 2-5
  1498. X
  1499. X    3.  COLON MODE COMMANDS ............................................ 3-1
  1500. X      3.1  Line Specifiers ............................................. 3-2
  1501. X      3.2  Text Entry Commands ......................................... 3-3
  1502. X      3.3  Cut & Paste Commands ........................................ 3-3
  1503. X      3.4  Display Text Commands ....................................... 3-3
  1504. X      3.5  Global Operations Commands .................................. 3-4
  1505. X      3.6  Line Editing Commands ....................................... 3-4
  1506. X      3.7  Undo Command ................................................ 3-5
  1507. X      3.8  Configuration & Status Commands ............................. 3-5
  1508. X      3.9  Multiple File Commands ...................................... 3-6
  1509. X      3.10  Switching Files ............................................ 3-7
  1510. X      3.11  Working with a Compiler .................................... 3-7
  1511. X      3.12  Exit Commands .............................................. 3-7
  1512. X      3.13  File I/O Commands .......................................... 3-8
  1513. X      3.14  Directory Commands ......................................... 3-8
  1514. X      3.15  Debugging Commands ......................................... 3-8
  1515. X
  1516. X    4.  REGULAR EXPRESSIONS ............................................ 4-1
  1517. X      4.1  Syntax ...................................................... 4-1
  1518. X      4.2  Options ..................................................... 4-1
  1519. X      4.3  Substitutions ............................................... 4-1
  1520. X      4.4  Examples .................................................... 4-2
  1521. X
  1522. X    5.  OPTIONS ........................................................ 5-1
  1523. X      5.1  AutoIndent .................................................. 5-2
  1524. X      5.2  AutoPrint ................................................... 5-2
  1525. X      5.3  AutoWrite ................................................... 5-2
  1526. X      5.4  CC .......................................................... 5-2
  1527. X      5.5  CharAttr .................................................... 5-2
  1528. X      5.6  COlumns ..................................................... 5-3
  1529. X      5.7  DIGraph ..................................................... 5-3
  1530. X      5.8  DIRectory ................................................... 5-3
  1531. X      5.9  EDcompatible ................................................ 5-3
  1532. X      5.10  ErrorBells ................................................. 5-3
  1533. X      5.11  ExRefresh .................................................. 5-3
  1534. X      5.12  FlipCase ................................................... 5-4
  1535. X      5.13  HideFormat ................................................. 5-4
  1536. X      5.14  IgnoreCase ................................................. 5-4
  1537. X      5.15  InputMode .................................................. 5-4
  1538. X      5.16  KeyTime .................................................... 5-4
  1539. X      5.17  KeywordPrg ................................................. 5-5
  1540. X      5.18  LiNes ...................................................... 5-5
  1541. X      5.19  LIst ....................................................... 5-5
  1542. X
  1543. X
  1544. X
  1545. X
  1546. X
  1547. X
  1548. X
  1549. X
  1550. X      5.20  MAgic ...................................................... 5-6
  1551. X      5.21  MaKe ....................................................... 5-6
  1552. X      5.22  ModeLine ................................................... 5-6
  1553. X      5.23  PAragraphs ................................................. 5-6
  1554. X      5.24  ReadOnly ................................................... 5-6
  1555. X      5.25  REport ..................................................... 5-7
  1556. X      5.26  SCroll ..................................................... 5-7
  1557. X      5.27  SEctions ................................................... 5-7
  1558. X      5.28  SHell ...................................................... 5-7
  1559. X      5.29  ShiftWidth ................................................. 5-7
  1560. X      5.30  ShowMatch .................................................. 5-8
  1561. X      5.31  ShowMoDe ................................................... 5-8
  1562. X      5.32  SideScroll ................................................. 5-8
  1563. X      5.33  SYnc ....................................................... 5-8
  1564. X      5.34  TabStop .................................................... 5-8
  1565. X      5.35  TErm ....................................................... 5-9
  1566. X      5.36  VBell ...................................................... 5-9
  1567. X      5.37  WArn ....................................................... 5-9
  1568. X      5.38  WrapMargin ................................................. 5-9
  1569. X      5.39  WrapScan ................................................... 5-9
  1570. X
  1571. X    6.  CUT BUFFERS .................................................... 6-1
  1572. X      6.1  Filling ..................................................... 6-1
  1573. X      6.2  Pasting from a Cut Buffer ................................... 6-2
  1574. X      6.3  Macros ...................................................... 6-2
  1575. X      6.4  The Effect of Switching Files ............................... 6-3
  1576. X
  1577. X    7.  DIFFERENCES BETWEEN ELVIS & BSD VI/EX .......................... 7-1
  1578. X      7.1  Extensions .................................................. 7-1
  1579. X      7.2  Omissions ................................................... 7-3
  1580. X
  1581. X    8.  INTERNAL ....................................................... 8-1
  1582. X      8.1  The temporary file .......................................... 8-1
  1583. X      8.2  Implementation of Editing ................................... 8-1
  1584. X      8.3  Marks and the Cursor ........................................ 8-2
  1585. X      8.4  Colon Command Interpretation ................................ 8-2
  1586. X      8.5  Screen Control .............................................. 8-2
  1587. X      8.6  Portability ................................................. 8-3
  1588. X
  1589. X    9.  CFLAGS ......................................................... 9-1
  1590. X
  1591. X    10.  TERMCAP ....................................................... 10-1
  1592. X      10.1  Required numeric fields .................................... 10-1
  1593. X      10.2  Required string fields ..................................... 10-1
  1594. X      10.3  Boolean fields ............................................. 10-1
  1595. X      10.4  Optional string fields ..................................... 10-1
  1596. X      10.5  Optional strings received from the keyboard ................ 10-1
  1597. X      10.6  Optional fields that describe character attributes ......... 10-2
  1598. X      10.7  Optional fields that affect the cursor's shape ............. 10-2
  1599. X      10.8  An example ................................................. 10-2
  1600. X
  1601. X    11.  ENVIRONMENT VARIABLES ......................................... 11-1
  1602. X      11.1  TERM, TERMCAP .............................................. 11-1
  1603. X      11.2  TMP, TEMP .................................................. 11-1
  1604. X      11.3  EXINIT ..................................................... 11-1
  1605. X      11.4  SHELL, COMSPEC ............................................. 11-1
  1606. X      11.5  HOME ....................................................... 11-1
  1607. X
  1608. X
  1609. X
  1610. X
  1611. X
  1612. X
  1613. X
  1614. X
  1615. X
  1616. X    12.  VERSIONS ...................................................... 12-1
  1617. X      12.1  BSD UNIX ................................................... 12-1
  1618. X      12.2  System-V UNIX .............................................. 12-1
  1619. X      12.3  SCO Xenix .................................................. 12-2
  1620. X      12.4  Minix ...................................................... 12-2
  1621. X      12.5  Coherent ................................................... 12-2
  1622. X      12.6  MS-DOS ..................................................... 12-3
  1623. X      12.7  Atari TOS .................................................. 12-4
  1624. X      12.8  OS9/68k .................................................... 12-4
  1625. X
  1626. X
  1627. X
  1628. X
  1629. X
  1630. X
  1631. X
  1632. X
  1633. X
  1634. X
  1635. X
  1636. X
  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. X
  1654. X
  1655. X
  1656. X
  1657. X
  1658. X
  1659. X
  1660. X
  1661. X
  1662. X
  1663. X
  1664. X
  1665. X
  1666. X
  1667. X
  1668. X
  1669. X
  1670. X
  1671. X
  1672. X
  1673. X
  1674. X
  1675. X
  1676. X
  1677. X
  1678. eof
  1679. if test `wc -c <doc/index.doc` -ne 9342
  1680. then
  1681. echo doc/index.doc damaged!
  1682. fi
  1683. fi
  1684.  
  1685. if test -f doc/ctags.man -a "$1" != -f
  1686. then
  1687. echo Will not overwrite doc/ctags.man
  1688. else
  1689. echo Extracting doc/ctags.man
  1690. sed 's/^X//' >doc/ctags.man <<\eof
  1691. X.TH CTAGS 1
  1692. X.SH NAME
  1693. Xctags - Generates "tags" and (optionally) "refs" files
  1694. X.SH SYNOPSIS
  1695. X\fBctags\fP [\fB-r\fP] \fIfiles\fP...
  1696. X.SH DESCRIPTION
  1697. X\fIctags\fP generates the "tags" and "refs" files
  1698. Xfrom a group of C source files.
  1699. XThe "tags" file is used by Elvis' ":tag" command,
  1700. Xcontrol-] command,
  1701. Xand -t option.
  1702. XThe "refs" file is used by the \fIref(1)\fP program.
  1703. X.PP
  1704. XEach C source file is scanned for #define statements and
  1705. Xglobal function definitions.
  1706. XThe name of the macro or function becomes the name of a tag.
  1707. XFor each tag, a line is added to the "tags" file which contains:
  1708. X.RS
  1709. X.nf
  1710. X       - the name of the tag
  1711. X       - a tab character
  1712. X       - the name of the file containing the tag
  1713. X       - a tab character
  1714. X       - a way to find the particular line within the file.
  1715. X.RE
  1716. X.fi
  1717. X.PP
  1718. XThe "refs" file is used by the \fIref(1)\fP program, which can be invoked
  1719. Xvia Elvis' K command.
  1720. XWhen ctags finds a global function definition,
  1721. Xit copies the function header into the "refs" file.
  1722. XThe first line is flush against the right margin,
  1723. Xbut the argument definitions are indented.
  1724. XThe ref program can search the "refs" file
  1725. X.ul
  1726. Xmuch
  1727. Xfaster than it could search all of the C source files.
  1728. X.PP
  1729. XThe filenames list will typically be the names of all C source
  1730. Xfiles in the current directory, like this:
  1731. X.RS
  1732. X.nf
  1733. X$ ctags -r *.[ch]
  1734. X.RE
  1735. X.fi
  1736. X.SH OPTIONS
  1737. X.IP \fB-r\fP
  1738. XThis causes \fIctags\fP to generate both "tags" and "refs".
  1739. XWithout \fB-r\fP, it would only generate "tags".
  1740. X.SH FILES
  1741. X.IP tags
  1742. XThe "tags" file.
  1743. X.IP refs
  1744. XThe "refs" file.
  1745. X.SH "SEE ALSO"
  1746. Xelvis(1), refs(1)
  1747. X.SH BUGS
  1748. XThis version of ctags doesn't parse ANSI-C source code very well.
  1749. XIt has trouble recognizing the new-style function definitions.
  1750. X.SH AUTHOR
  1751. X.nf
  1752. XSteve Kirkendall
  1753. Xkirkenda@cs.pdx.edu
  1754. X\&...uunet!tektronix!psueea!eecs!kirkenda
  1755. X.fi
  1756. eof
  1757. if test `wc -c <doc/ctags.man` -ne 1790
  1758. then
  1759. echo doc/ctags.man damaged!
  1760. fi
  1761. fi
  1762.  
  1763. if test -f doc/elvis.man -a "$1" != -f
  1764. then
  1765. echo Will not overwrite doc/elvis.man
  1766. else
  1767. echo Extracting doc/elvis.man
  1768. sed 's/^X//' >doc/elvis.man <<\eof
  1769. X.TH ELVIS 1
  1770. X.SH NAME
  1771. Xelvis, ex, vi, view, input - The editor
  1772. X.SH SYNOPSIS
  1773. X\fBelvis\fP [\fIflags\fP] [\fB+\fP\fIcmd\fP] [\fIfiles\fP...]
  1774. X.SH DESCRIPTION
  1775. X\fIElvis\fP is a text editor which emulates \fIvi\fP/\fIex\fP.
  1776. X.PP
  1777. XOn systems which pass the program name as an argument, such as Unix and Minix,
  1778. Xyou may also install \fIelvis\fP under the names "ex", "vi", "view", and "input".
  1779. XThese extra names would normally be links to elvis;
  1780. Xsee the "ln" shell command.
  1781. X.PP
  1782. XWhen \fIelvis\fP is invoked as "vi",
  1783. Xit behaves exactly as though it was invoked as "elvis".
  1784. XHowever, if you invoke \fIelvis\fP as "view",
  1785. Xthen the readonly option is set as though you had given it the "-R" flag.
  1786. XIf you invoke \fIelvis\fP as "ex",
  1787. Xthen \fIelvis\fP will start up in the colon command mode
  1788. Xinstead of the visual command mode,
  1789. Xas though you had given it the "-e" flag.
  1790. XIf you invoke \fIelvis\fP as "input" or "edit",
  1791. Xthen \fIelvis\fP will start up in input mode,
  1792. Xas though the "-i" flag was given.
  1793. X.SH OPTIONS
  1794. X.IP \fB-r\fP
  1795. XTo the real vi, this flag means that a previous edit should be recovered.
  1796. X\fIElvis\fP, though, has a separate program, called \fIvirec(1)\fP, for recovering
  1797. Xfiles.
  1798. XWhen you invoke \fIelvis\fP with -r, \fIelvis\fP will tell you to run \fIvirec\fP.
  1799. X.IP \fB-R\fP
  1800. XThis sets the "readonly" option,
  1801. Xso you won't accidentally overwrite a file.
  1802. X.IP "\fB-t\fP \fItag\fP"
  1803. XThis causes \fIelvis\fP to start editing at the given tag.
  1804. X.IP "\fB-m\fP [\fIfile\fP]"
  1805. X\fIElvis\fP will search through \fIfile\fP for something that looks like
  1806. Xan error message from a compiler.
  1807. XIt will then begin editing the source file that caused the error,
  1808. Xwith the cursor sitting on the line where the error was detected.
  1809. XIf you don't explicitly name a \fIfile\fP, then "errlist" is assumed.
  1810. X.IP \fB-e\fP
  1811. X\fIElvis\fP will start up in colon command mode.
  1812. X.IP \fB-v\fP
  1813. X\fIElvis\fP will start up in visual command mode.
  1814. X.IP \fB-i\fP
  1815. X\fIElvis\fP will start up in input mode.
  1816. X.IP \fB+\fP\fIcommand\fP
  1817. XIf you use the +\fIcommand\fP parameter,
  1818. Xthen after the first file is loaded
  1819. X\fIcommand\fP is executed as an EX command.
  1820. XA typical example would be "elvis +237 foo",
  1821. Xwhich would cause \fIelvis\fP to start editing foo and
  1822. Xthen move directly to line 237.
  1823. X.SH FILES
  1824. X.IP /tmp/elv*
  1825. XDuring editing,
  1826. X\fIelvis\fP stores text in a temporary file.
  1827. XFor UNIX, this file will usually be stored in the /tmp directory,
  1828. Xand the first three characters will be "elv".
  1829. XFor other systems, the temporary files may be stored someplace else;
  1830. Xsee the version-specific section of the documentation.
  1831. X.IP tags
  1832. XThis is the database used by the \fI:tags\fP command and the \fB-t\fP option.
  1833. XIt is usually created by the \fIctags(1)\fP program.
  1834. X.SH "SEE ALSO"
  1835. Xctags(1), ref(1), virec(1)
  1836. X.PP
  1837. X\fIElvis - A Clone of Vi/Ex\fP, the complete \fIelvis\fP documentation.
  1838. X.SH BUGS
  1839. XThere is no LISP support.
  1840. XCertain other features are missing, too.
  1841. X.PP
  1842. XAuto-indent mode is not quite compatible with the real vi.
  1843. XAmong other things, 0^D and ^^D don't do what you might expect.
  1844. X.PP
  1845. XLong lines are displayed differently.
  1846. XThe real vi wraps long lines onto multiple rows of the screen,
  1847. Xbut \fIelvis\fP scrolls sideways.
  1848. X.SH AUTHOR
  1849. X.nf
  1850. XSteve Kirkendall
  1851. Xkirkenda@cs.pdx.edu
  1852. X\&...uunet!tektronix!psueea!eecs!kirkenda
  1853. X.fi
  1854. X.PP
  1855. XMany other people have worked to port \fIelvis\fP to various operating systems.
  1856. XTo see who deserves credit, run the \fI:version\fP command from within \fIelvis\fP,
  1857. Xor look in the system-specific section of the complete documentation.
  1858. eof
  1859. if test `wc -c <doc/elvis.man` -ne 3473
  1860. then
  1861. echo doc/elvis.man damaged!
  1862. fi
  1863. fi
  1864.  
  1865. if test -f doc/ref.man -a "$1" != -f
  1866. then
  1867. echo Will not overwrite doc/ref.man
  1868. else
  1869. echo Extracting doc/ref.man
  1870. sed 's/^X//' >doc/ref.man <<\eof
  1871. X.TH REF 1
  1872. X.SH NAME
  1873. Xref - Display a C function header
  1874. X.SH SYNOPSIS
  1875. X\fBref\fP \fIfunction_name\fP
  1876. X.SH DESCRIPTION
  1877. X\fIRef\fP is a program which looks up the function header of a
  1878. Xparticular function in any of a series of reference files.
  1879. XThese reference files are produced by the \fIctags(1)\fP program.
  1880. X.PP
  1881. X\fIRef\fP is used by Elvis's shift-K command.
  1882. X.PP
  1883. XThe list of files checked includes "refs" in the current directory,
  1884. Xand possibly others.
  1885. XSee the source code for an accurate list.
  1886. X.SH AUTHOR
  1887. X.nf
  1888. XSteve Kirkendall
  1889. Xkirkenda@cs.pdx.edu
  1890. X\&...uunet!tektronix!psueea!eecs!kirkenda
  1891. X.fi
  1892. eof
  1893. if test `wc -c <doc/ref.man` -ne 583
  1894. then
  1895. echo doc/ref.man damaged!
  1896. fi
  1897. fi
  1898.  
  1899. if test -f doc/refont.man -a "$1" != -f
  1900. then
  1901. echo Will not overwrite doc/refont.man
  1902. else
  1903. echo Extracting doc/refont.man
  1904. sed 's/^X//' >doc/refont.man <<\eof
  1905. X.TH REFONT 1
  1906. X.SH NAME
  1907. Xrefont - changes the notation used for fonts
  1908. X.SH SYNOPSIS
  1909. X\fBrefont\fP [\fIflags\fP] \fIfiles\fP...
  1910. X.SH DESCRIPTION
  1911. X\fIRefont\fP reads a text file which contains font selection codes embedded
  1912. Xwithin it,
  1913. Xand it writes the same text with a different notation for fonts.
  1914. X.PP
  1915. XFor example, the Elvis documentation uses Epson-compatible escape sequences
  1916. Xto select different fonts.
  1917. XYou could use the command "refont -b intro.doc >intro.b" to make a file
  1918. Xthat uses overtyping to implement boldface or underlined text.
  1919. X.SH OPTIONS
  1920. X.IP \fB-b\fP
  1921. XEmit text which uses the "backspace" notation for fonts.
  1922. XEach underlined character will be preceded by an underscore character
  1923. Xand a backspace character.
  1924. XBold characters are sent twice, with a backspace in between.
  1925. XThe UNIX \fImore\fR utility understands this notation.
  1926. X.IP \fB-c\fP
  1927. XEmit text which uses the "carriage-return" notation for fonts.
  1928. XAn entire line of text is written,
  1929. Xfollowed by a carriage return instead of a newline.
  1930. XThen a space is sent for each normal character,
  1931. Xan underscore is sent for each underlined or italic character,
  1932. Xand each boldface character is sent a second time.
  1933. XMany mainframe line printers accept this notation.
  1934. X.IP \fB-d\fP
  1935. XEmit text which uses nroff-style "dot" commands for fonts.
  1936. XThis doesn't work very well.
  1937. X.IP \fB-e\fP
  1938. XEmit text using Epson-compatible escape sequences for fonts.
  1939. XThis is useful as a "least common denominator" for font notations,
  1940. Xbecause this is the only supported notation to use control-character sequences
  1941. Xand also distinguish between italics and underlining.
  1942. X.IP \fB-f\fP
  1943. XEmit text which uses nroff's "\\fX" notation for fonts.
  1944. XUnderlined text is denoted by "\\fU",
  1945. Xboldface by "\\fB",
  1946. Xitalics by "\\fI",
  1947. Xand normal text by "\\fR".
  1948. XThis is somewhat useful in conjunction with Elvis' "charattr" option.
  1949. X.IP \fB-x\fP
  1950. XEmit text which has had all font information stripped out.
  1951. X.IP \fB-I\fP
  1952. XWhen reading text, \fB-I\fP tells \fIrefont\fP to accept any of the above
  1953. Xnotations for fonts.
  1954. XWithout \fB-I\fP it will ignore the "dot" command and "\\fX" notations;
  1955. Xthey will be treated as normal text.
  1956. XIn other words, without \fB-I\fP the only things that could be recognized as
  1957. Xfont changes are control-character sequences.
  1958. X.IP \fB-F\fP
  1959. XThis causes \fIrefont\fP to insert formfeed characters between input files.
  1960. X.SH BUGS
  1961. XSupport for the nroff-style "dot" commands is not very good.
  1962. X.PP
  1963. XWith \fB-b\fP/\fB-c\fP, both underlining and italics are implemented by
  1964. Xovertyping the underscore character with a text character.
  1965. XSince they are represented the same way, the distinction between underlining
  1966. Xand italics is lost.
  1967. X.SH AUTHOR
  1968. X.nf
  1969. XSteve Kirkendall
  1970. Xkirkenda@cs.pdx.edu
  1971. X\&...uunet!tektronix!psueea!eecs!kirkenda
  1972. eof
  1973. if test `wc -c <doc/refont.man` -ne 2719
  1974. then
  1975. echo doc/refont.man damaged!
  1976. fi
  1977. fi
  1978.  
  1979. if test -f doc/virec.man -a "$1" != -f
  1980. then
  1981. echo Will not overwrite doc/virec.man
  1982. else
  1983. echo Extracting doc/virec.man
  1984. sed 's/^X//' >doc/virec.man <<\eof
  1985. X.TH VIREC 1
  1986. X.SH NAME
  1987. Xvirec - Recover the modified version of a file after a crash
  1988. X.SH SYNOPSIS
  1989. X.nf
  1990. X\fBvirec\fP [\fB-d\fP \fItmpdir\fP] \fItextfilename...\fP
  1991. X\fBvirec\fP </tmp/elv\fIXXX\fP
  1992. X.fi
  1993. X.SH DESCRIPTION
  1994. X\fIVirec\fP is a program which extracts the most recent version of a
  1995. Xtext file from a temporary file in /tmp.
  1996. X.PP
  1997. XWhen you edit a file with Elvis,
  1998. Xonly about 5K bytes of the file are stored in RAM;
  1999. Xthe rest is stored in a file in /tmp.
  2000. XThis allows you to edit files larger than a process' data space.
  2001. XIt also plays a big part in the way that "undo" and "paste" were implemented.
  2002. X.PP
  2003. XThe \fIvirec\fP program basically extracts the "undo" version from the file.
  2004. XThis is most useful when the system (or Elvis) crashes in
  2005. Xthe middle of a long edit session,
  2006. Xsince the "undo" version of the file contains everything
  2007. Xexcept your last change.
  2008. XNearly all of your work can be salvaged.
  2009. X.PP
  2010. XThe most common way to invoke virec is this:
  2011. XYou just give virec the name of the file you were editing,
  2012. Xand it finds the matching file in /tmp and writes
  2013. Xthe newest available version of the file over the existing version.
  2014. XIt then deletes the /tmp file.
  2015. X.PP
  2016. XThe other way, where you redirect its stdin to come from
  2017. Xa particular /tmp file, is used when you have
  2018. Xeither forgotten which file that is and you want to see its contents,
  2019. Xor when you want to recover the file
  2020. Xwithout losing either the /tmp file or the current version of the text file.
  2021. X.SH OPTIONS
  2022. X.IP "\fB-d\fP \fItmpdir\fP"
  2023. XIf your \fI.exrc\fP or \fI$EXINIT\fP causes Elvis to store temp files in
  2024. Xa non-standard directory
  2025. X(usually, anyplace other than /tmp),
  2026. Xthen you must tell \fIvirec\fP which directory to look in.
  2027. X.SH FILES
  2028. X.IP /tmp/elv*
  2029. XThe temporary file left over from when Elvis was editing a text file.
  2030. X.SH AUTHOR
  2031. X.nf
  2032. XSteve Kirkendall
  2033. Xkirkenda@cs.pdx.edu
  2034. X\&...uunet!tektronix!psueea!eecs!kirkenda
  2035. X.fi
  2036. eof
  2037. if test `wc -c <doc/virec.man` -ne 1858
  2038. then
  2039. echo doc/virec.man damaged!
  2040. fi
  2041. fi
  2042.  
  2043. exit 0
  2044. -------------------------------------------------------------------------------
  2045. Steve Kirkendall     kirkenda@cs.pdx.edu      Grad student at Portland State U.
  2046.