home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / editor-faq / vi / part2 < prev   
Encoding:
Internet Message Format  |  2004-04-19  |  23.1 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!npeer.de.kpn-eurorings.net!newsfeed.stueberl.de!news1.spb.su!news.runnet.ru!cclinfo!not-for-mail
  2. From: ellidz@pobox.com (E. Larry Lidz)
  3. Newsgroups: comp.unix.questions,comp.editors,comp.answers,news.answers
  4. Subject: vi editor FAQ (Frequently Asked Question List), Part 2/2
  5. Followup-To: comp.editors
  6. Date: 19 Apr 2004 04:02:07 GMT
  7. Organization: COCOS Lab. 
  8. Lines: 592
  9. Approved: news-answers-request@MIT.EDU
  10. Message-ID: <c5vivv$adt$1@cclinfo.perm.su>
  11. NNTP-Posting-Host: lyceum.pstu.ac.ru
  12. X-Trace: cclinfo.perm.su 1082347327 10685 195.19.167.110 (19 Apr 2004 04:02:07 GMT)
  13. X-Complaints-To: usenet@ccl.ru
  14. NNTP-Posting-Date: 19 Apr 2004 04:02:07 GMT
  15. Summary: This posting contains a list of Frequently Asked
  16.         Questions (and their answers) about the vi editor.
  17. X-Last-Modified: 2004-04-09
  18. Originator: ellidz@h-69-3-98-37.chcgilgm.covad.net (E. Larry Lidz)
  19. Xref: senator-bedfellow.mit.edu comp.unix.questions:195303 comp.editors:72864 comp.answers:56939 news.answers:270254
  20.  
  21. Archive-name: editor-faq/vi/part2
  22. Posting-Frequency: 2nd and 17th of every month
  23. Last-modified: 2004-04-09
  24. Version: 1.89
  25.  
  26. 5.0 - What's online at the vi archives?
  27.  
  28.   There is a FAQ posted frequently which gives a list of all the files
  29. that are online at the vi archive.  It also gives a list of addresses
  30. which mirror the vi archive.  The main address is ftp://alf.uib.no/pub/vi, but it is
  31. archived at many, many sites.  The vi-archive faq lists all of them.
  32. Please check that faq before ftping to it, as there is almost definitely
  33. a closer and therefore faster site to you than the one in Norway.
  34.   A few mirrors are:  ftp://ftp.uwp.edu/pub/vi
  35.                       ftp://ftp.uu.net/pub/text-processing/vi.
  36.                       ftp://ftp.cc.monash.edu.au/pub/vi
  37.                       ftp://ftp.s.u-tokyo.ac.jp/misc/vi-archive
  38.   The site has many, many files on vi, including a few clones.  It also
  39. has the UCB distribution of vi, and lots of useful macros.  Check it
  40. out.
  41.  
  42. 6.0 - Silly vi tricks, and silly macros
  43.  
  44.   This section is for silly vi tricks, and silly macros.  Actually, any
  45. interesting vi tricks and macros are acceptable, as long as they are
  46. not too lengthy.  I will add any that are suggested to me that I think
  47. are reasonable.
  48.  
  49. 6.1 - Silly vi tricks
  50.   Note: Also check out the Silly macros down below. Many macros and
  51. tricks are interchangeable.
  52.  
  53.   xp     This will delete the character under the cursor, and put it
  54. afterwards.  In other words, it swaps the location of two characters.
  55.  
  56.   ddp    Similar to xp, but swapping lines.
  57.  
  58.   yyp    duplicate a line
  59.  
  60.   uu     Undo and redo last change.  (This will take you to the last
  61. modification to the file without changing anything.)  You can also use
  62. this to compare the changes to a line.  Make the changes to the line,
  63. press U to undo the changes to the current line, and then press u to
  64. toggle between the two versions.
  65.  
  66.   :g/.*/m0
  67.          This will reverse the order of the lines in the current file.
  68. m0 is the ex command to move the line to line 0.
  69.  
  70.   :v/./d or :g/^$/d 
  71.          Removes all blank lines.
  72.  
  73.   :g/^[ <ctrl-v><tab>]*$/d
  74.          Removes all lines that only have whitespace.
  75.  
  76.   :v/./$s/$/<ctrl-v><enter>./|'';/./-1j|$d
  77.          Replaces multiple blank lines with just one blank line.
  78.  
  79. 6.2 - Silly macros
  80.   Note:  <ctrl-x> means hold down control, and hit x.
  81.  
  82.   Swap character and one vertically above:
  83.     map * kxjphxkP
  84.  
  85.   Fold a line that's too long
  86.     map g $80<ctrl-v><ctrl-v>|F r<ctrl-v><enter>
  87.  
  88.   Change case on most words
  89.     map v ywmno<ctrl-v><esc>P:s/./\~/g<ctrl-v><enter>0"nDdd`n@n
  90.  
  91.   Put `and' around the current word
  92.     map *` i`<ctrl-v><esc>ea'<ctrl-v><esc>
  93.  
  94.   Put 'and' around the current word
  95.     map *' i'<ctrl-v><esc>ea'<ctrl-v><esc>
  96.  
  97.   Put "and" around the current word
  98.     map *" i"<ctrl-v><esc>ea"<ctrl-v><esc>
  99.  
  100.   Put `and' around the current word
  101.     map! `` <ctrl-v><esc>bi`<ctrl-v><esc>ea'
  102.  
  103.   Split a line at the cursor, and put a > at the beginning of the next
  104. line.  (For quoting Usenet, etc). I had some trouble with my old
  105. version of this under some versions, so I've redone it, and I think
  106. that it should work.
  107.     map g may0O<ctrl-v><esc>P`ao<ctrl-v><esc>P:s/./ /g<ctrl-v><enter>0i><ctrl-v><esc>$mb`ay$`bP'add
  108.  
  109.   Insert one character
  110.     map g i$<ctrl-v><esc>r
  111.  
  112.   Format a paragraph without the fmt program.  (To use, use J a few
  113. times, then this a few times)
  114.     map K 072lBhr<ctrl-v><enter>
  115.  
  116.   Or, a little less elegantly, but without the need to use J and K
  117. multiple times.
  118.     map K {wma}b:'a,.j<ctrl-v><enter>:s/\(.........................................................\)/\1<ctrl-v><ctrl-v><ctrl-v><enter>/g<ctrl-v><enter>
  119.  
  120.   Make ctrl-x work as cut, ctrl-v as paste, ctrl-p as copy.  You should
  121. mark the beginning of the area as m (use mm).  (ctrl-c cannot be
  122. remapped when it is defined as the interrupt character in Unix.)
  123.     map <ctrl-v><ctrl-x> "zd`m
  124.     map <ctrl-v><ctrl-p> "zy`m
  125.     map <ctrl-v><ctrl-v><ctrl-v><ctrl-v> "zP`m
  126.  
  127.   Save a read-only file.  Careful, it changes the permissions. When
  128. done, it changes them to read/write owner, read for everyone else. Note
  129. that this might not be the same as the original permissions.
  130.     map K :!chmod 666 %<ctrl-v><enter>:w!<ctrl-v><enter><ctrl-v><enter>
  131.     :!chmod 644 %<ctrl-v><enter>
  132.  
  133.   vi status line (sort of...) [Note:  It's slow...]
  134.     map <ctrl-v><up-arrow> k<ctrl-v><ctrl-g>
  135.     map <ctrl-v><down-arrow> j<ctrl-v><ctrl-g>
  136.     map k k<ctrl-v><ctrl-g>
  137.     map j j<ctrl-v><ctrl-g>
  138.     map <ctrl-v><ctrl-f> <ctrl-v><ctrl-f><ctrl-v><ctrl-g>
  139.     map <ctrl-v><ctrl-b> <ctrl-v><ctrl-b><ctrl-v><ctrl-g>
  140.     map H H<ctrl-v><ctrl-g>
  141.     map M M<ctrl-v><ctrl-g>
  142.     map L L<ctrl-v><ctrl-g>
  143.     map G G<ctrl-v><ctrl-g>
  144.     map <ctrl-v><ctrl-u> <ctrl-v><ctrl-u><ctrl-v><ctrl-g>
  145.     map <ctrl-v><ctrl-d> <ctrl-v><ctrl-d><ctrl-v><ctrl-g>
  146.  
  147.   center a line
  148.     map = 080i <ctrl-v><esc>$78hd0^D:s/  / /g<ctrl-v><enter>$p
  149.  
  150.   redefine tab to insert 5 spaces instead of a tab marker
  151.     map! <ctrl-v><ctrl-i> <space><space><space><space><space>
  152.  
  153.   switch current and last line (repeat to reverse a file)
  154.     map v Gdd''Pj
  155.  
  156.   yank until end of line, run it in a shell and read in the result
  157.     map v y$o<ctrl-v><esc>pI:r!<ctrl-v><esc>"add@a
  158.  
  159.   allow vi to backspace over text that was inserted in a previous
  160. insert mode
  161.    map! <ctrl-v><ctrl-?> $<ctrl-v><esc>Xs
  162.    map! <ctrl-v><ctrl-h> $<ctrl-v><esc>Xs
  163.  
  164.   print the document to the default printer (for BSD replace lp with lpr).
  165.    map v 1G!Glp<ctrl-v><enter>u
  166.  
  167.   set # to toggle line numbers on and off:
  168.    map \o# o:se nu<ctrl-v><enter>:se nonu<ctrl-v><esc>-:map \o# "wp<ctrl-v><enter>
  169.    map \d# "w2dd
  170.    map \x# "xdd@x"xpk
  171.    map # ma3L\o#\x#\d#`a:<ctrl-v><enter>
  172.  
  173.   Quote the current paragraph with '>'s.
  174.    map Z> mc{jma}kmb:'a,'bs/^ /> /<ctrl-v><enter>'c
  175.  
  176.   Allow <ctrl-z> to suspend processes within insert mode
  177.    map! <ctrl-v><ctrl-z> <ctrl-v<esc>:stop<ctrl-v><enter>
  178.   Make all tabs spaces
  179.    map! <ctrl-v><ctrl-v><ctrl-v><ctrl-i> <ctrl-v><ctrl-v><space>
  180.  
  181.   Replace all tabs with the proper amount of spaces for the given
  182.   tabstop. Removing the last two character (4<enter>) will allow you to
  183.   specify the tabstop: #t4<enter>
  184.    map #t 1G!Gpr -t -e4<ctrl-v><enter>
  185.    map #T !}pr -t -e4<ctrl-v><enter>}
  186.  
  187.   Insert a ruler above the current line
  188.    map #r O<ctrl-v><esc>i....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8<ctrl-v><esc>
  189.  
  190.   This is a macro that redefines itself: (more for heuristic reasons
  191. than anything else) It inserts foo the first time it is run, and bar
  192. all subsequent times. 
  193.   map K ifoo<ctrl-v><esc>:map K ibar<ctrl-v><ctrl-v><ctrl-v><esc><ctrl-v><enter>
  194.  
  195.   This makes end notes. It will insert a [#] at the current location
  196. and put a [#] at the bottom of the document and let you type there.
  197. Hitting `a will take you back to the original location once you are
  198. done with your end note. [#] will be the number of the end note, not
  199. the literal # character. (Pretty crazy, huh?)
  200.    map K ma1GO[0]<ctrl-v><esc>G$?\[[0-9]*\]<ctrl-v><enter>lyt]`aa<ctrl-v><enter><ctrl-v><esc>O<ctrl-v><esc>pI:r!echo '1 <ctrl-v><esc>A + p' <ctrl-v><ctrl-v>| dc<ctrl-v><ctrl-v><ctrl-v><ctrl-v><ctrl-v><ctrl-v><ctrl-v><enter><ctrl-v><esc>0"yD@y0i[<ctrl-v><esc>A]<ctrl-v><esc>kkJJJmb1Gdd`bF[yf]Go<ctrl-v><esc>pA   
  201.  
  202. 7.0 - Alphabetical vi quick reference
  203.  
  204.   ... means that something needs to be specified before or after the
  205.   command, as appropriate.  This is normally a cursor movement 
  206.   key (h,j,k,l,w,b, etc.) or a line number.
  207.  
  208.   #  (where # is a number) following command n times...  
  209.   :  go to ex-mode 
  210.   )  next sentence 
  211.   (  previous sentence 
  212.   }  next paragraph 
  213.   {  previous paragraph 
  214.  ]]  next section 
  215.  [[  previous section
  216.   0  beginning of line 
  217.   $  end of line 
  218.   ^  first non-whitespace character
  219.   +  first character of next line 
  220.   -  first character of previous line 
  221. (spacebar) next character 
  222. (return) next line 
  223.   /  search forward 
  224.   ? search backward 
  225.   %  find match of current parenthesis, brace, or bracket 
  226.   ,  reverse direction of last f, F, t, or T 
  227.   ;  repeat last f, F, t, or T
  228.   .  repeat last command
  229.   `  goto mark 
  230.   '  goto beginning of line with mark 
  231.  ``  return to previous mark or location before a search 
  232.  ''  go to start of line of previous mark or location before search
  233.   ~  switch case of current character
  234.   "  store in register 
  235.   @  execute command in register
  236.   !  send next to command, replace output (eg  !}fmt passes the current
  237.        paragraph to the command fmt, and replaces the output with
  238.        whatever fmt returns.) 
  239.  !!  send line to command
  240.  >>  shift line one shiftwidth to the right 
  241.  <<  shift line one shiftwidth to the left 
  242.  >%  shift until matching (, [, or { to the right 
  243.  <%  shift until matching (, [, or { to the left
  244.   a  append after the current location 
  245.   A  append at the end of the line
  246.  ^a  unused
  247.   b  beginning of previous word 
  248.   B  beginning of previous word, ignore punctuation 
  249.  ^b  scroll back one screen
  250.   c  change until...  
  251.   C  change to end of line 
  252.  ^c  ends insert mode, unused in command mode (if defined as interrupt)
  253.   d  delete until...  
  254.   D  delete to end of line 
  255.  ^d  scroll down half a window, moves to previous shiftwidth in insert
  256.        mode
  257.   e  end of word 
  258.   E  end of word, ignore punctuation 
  259.  ^e  scroll screen down one line
  260.   f  find...  
  261.   F  find backward...  
  262.  ^f  scroll forward one screen
  263.   g  unused 
  264.   G  ...Goto  [defaults to end of file] 
  265.  ^g  show status line
  266.   h  left 
  267.   H  first line on screen 
  268.  ^h  backspace in insert mode, left in command mode
  269.   i  insert before current location 
  270.   I  insert before first non-whitespace character on line 
  271.  ^i  tab in insert, unused in command
  272.   j  down 
  273.   J  join next line with current line 
  274.  ^j  down in command, create newline in insert
  275.   k  up 
  276.   K  unused 
  277.  ^k  unused
  278.   l  right 
  279.   L  last line on screen 
  280.  ^l  redraw screen
  281.   m  mark position into register 
  282.   M  middle of screen 
  283.  ^m  carriage return
  284.   n  repeat last search 
  285.   N  repeat last search, reverse direction 
  286.  ^n down in command
  287.   o  open line below current 
  288.   O  open line above current 
  289.  ^o  unused
  290.   p  put below current line 
  291.   P  put above current line 
  292.  ^p  up in command
  293.   q  unused 
  294.   Q  quit and run ex 
  295.  ^q  unused
  296.   r  replace current character 
  297.   R  replace characters until insert mode is left 
  298.  ^r  redraw screen in command mode
  299.   s  substitute 
  300.   S  substitute entire line 
  301.  ^s  unused
  302.   t  to...  
  303.   T  backward to...  
  304.  ^t  moves to next shiftwidth.
  305.   u  undo last change 
  306.   U  undo changes to current line 
  307.  ^u  scroll up half a window
  308.   v  unused 
  309.   V  unused 
  310.  ^v  unused in command, quotes next character in insert
  311.   w  beginning of next word 
  312.   W  beginning of next word, ignore punctuation 
  313.  ^w  unused in command, in insert move back to beginning of previous
  314.        word
  315.   x  delete current character 
  316.   X  delete previous character 
  317.  ^x  unused
  318.   y  yank...  
  319.   Y  yank current line 
  320.  ^y  scroll screen up one line
  321.   z  reposition screen around line (Return to top of screen, . to 
  322.        middle, - to bottom) 
  323.  ZZ  write (only if changes have been made) and quit 
  324.  ^z  unused
  325.  
  326. 7.1 - Command mode input options ( : commands)
  327.  
  328.   (Note: this is not a canonical list, just some of the more important
  329. ones.)
  330.  
  331.  :r <file>       read <file> into current text 
  332.  :r !<command>   read output from command <command> into current text 
  333.  :nr <file>      read in at line number 
  334.  :!<file>        run command, return 
  335.  :sh             goto shell 
  336.  :so <file>      read and execute commands from <file>
  337.  :x              write (only if changes have been made) and quit 
  338.  :wq             write and quit 
  339.  :l1,l2w <file>  write between lines l1 and l2 to <file>.  If <file> 
  340.                    is not specified, assume current.  If l1,l2 not 
  341.                    specified, assume entire file (making it :w)
  342.  :w >> <file>    append to <file>.  May use line numbers
  343.  :w!             overwrite current file 
  344.  :q              quit
  345.  :q!             quit, forget changes 
  346.  :e <file>       edit <file> without leaving vi 
  347.  :e!             forget changes since last write
  348.  :n              edit next file 
  349.  :e +n <file>    edit <file> at line n, if no end, assume end of file 
  350.  :n <files>      specify <files> as new list of files to edit 
  351.  :e#             edit alternate file (if :e <file> is used, alternate is
  352.            the original file)
  353.  :args           show files to be edited 
  354.  :rew            rewind list of files to top 
  355.  :map m n        create a macro (make m do n) 
  356.  :map! m n       create an insert mode macro (make m do n) 
  357.  :unmap m        destroy macro m 
  358.  :unmap! m       destroy insert mode macro m 
  359.  :ab <1> <2>     abbreviate - replace <1> with <2> whenever typed as 
  360.                    a word
  361.  :unab <1>       unabbreviate <1> 
  362.  :cd <directory> cd to <directory>
  363.  :set <option>   set <option>...
  364.  
  365. 7.2 - set options
  366.  
  367. The abbreviations in parenthesis may be used.  Syntax:
  368.  
  369.   :set <option> <param>   (If <param> is expected) 
  370.   Multiple options may be specified on one line.  
  371.   :set <option>? displays the value of the <option> 
  372.   :set all displays the value of all the options.  
  373. For options without a value, set no<option> turns it off.
  374.  
  375. Option:             Default:           What it does:
  376.  
  377. autoindent (ai)     noai               Makes new lines automatically
  378.                                          indent to the position as the 
  379.                                          line above or below
  380. autoprint (ap)      ap                 Display changes after each 
  381.                                          command 
  382. autowrite (aw)      noaw               Automatically save file 
  383.                                          before :n, :!  
  384. beautify (bf)       nobf               Ignore all control characters
  385.                                          during input (except tab, 
  386.                                          newline, formfeed)
  387. directory= (dir=)   /tmp               Name of the directory to store 
  388.                                          buffer 
  389. edcompatible        noedcompatible     Use ed-like features on 
  390.                                          substitute 
  391. errorbells (eb)     errorbells         Sound bell on error
  392. exrc (ex)           noexrc             Allow .exrc files outside home 
  393.                                          dir 
  394. hardtabs= (ht=)     8                  Set boundary for hardware tabs 
  395. ignore case (ic)    noic               Ignore case in regex expressions 
  396. lisp                nolisp             Turn on lisp mode
  397. list                nolist             Display all tabs, end of lines
  398. magic               magic              Enable more regex expressions
  399. mesg                mesg               Allows mesgs to be sent to 
  400.                                          terminal 
  401. number (nu)         nonumber           Displays line numbers in file 
  402. open                open               Allows open and visual
  403. optimize (opt)      optimize           Optimizes throughput of text by 
  404.                                          not sending carriage returns 
  405.                                          when printing text
  406. paragraphs= (para=) IPLPPPQPPLIbp      Sets the delimiters for { & }
  407. prompt              prompt             Command mode input gives : prompt 
  408. readonly (ro)       noro               Cannot write unless ! is given  
  409. redraw              noredraw           Redraw screen when edits are made 
  410. remap               remap              Allows macros that point to other
  411.                      macros
  412. report=             5                  Report changes if they effect > x
  413.                      lines
  414. scroll              1/2 window         Amount of screen to scroll when
  415.                      scroll down is received in
  416.                      command mode.  Also, number of
  417.                      lines printer by z.  (z prints
  418.                      2*scroll)
  419. sections=           SHNHH HU           Defines end of section for [[ 
  420.                                          and ]] 
  421. shell= (sh=)        /bin/sh            Default shell.  Uses SHELL
  422.                      environment, if set
  423. shiftwidth= (sw=)   8                  Characters to shift when using
  424.                      shift commands
  425. showmatch (sm)      nosm               Show matching {, }, (, ), [, or ] 
  426. showmode            noshowmode         Shows which mode you are in.
  427. slowopen (slow)                        Do not update display 
  428.                                          immediately after insert
  429. tabstop= (ts=)      8                  Sets tabstop length 
  430. taglength= (tl=)    0                  Number of characters significant
  431.                                          for tags (0 means all 
  432.                                          characters)
  433. tags=               tag, /usr/lib/tags Define pathname of files 
  434.                                          containing tags.
  435. term=                                  Set the terminal type
  436. terse               noterse            Display shorter error messages
  437. timeout (to)        timeout            Keyboard maps timeout after one 
  438.                                          second 
  439. ttytype=                               Set the terminal type
  440. warn                warn               Display "No write since last 
  441.                                          change" messages
  442. window= (w=)                           Number of lines in window in visual
  443.                      mode
  444. wrapmargin= (wm=)   0                  Set the right margin.  Greater 
  445.                                          than 0 will word wrap n spaces
  446.                                          from the edge of the screen
  447. wrapscan (ws)       ws                 Searches wrap around end of file
  448. writeany (wa)       nowa               Allow saving to any file
  449.  
  450. 8.0 - Setting up .exrc file
  451.  
  452.   Any commands that can be used in command input mode ( : commands),
  453. may be used in a .exrc, which will load automatically whenever you
  454. start vi.  In addition, the source command (so), abbreviations (ab),
  455. and macros may be used.  There may not be any blank lines in your
  456. .exrc.  A " in the first column may be used to tell vi that what
  457. follows is a comment.
  458.  
  459. 8.1 - Sample .exrc file
  460.  
  461.   This .exrc file is a real one.  Mine.  Because of that, it doesn't
  462. set as many options as one might wish it did to get a good idea of what
  463. may be used.  However, it should get the basic idea down, and it is
  464. quite straightforward. 
  465.  
  466. First, note that you do not need to specify the :, it is assumed.
  467.  
  468. " Ignore case on search
  469. set ic
  470. " set wordwrap 9 characters from the right
  471. set wm=9
  472. " show matching parenthesis
  473. set sm
  474. " set the shell to be zsh
  475. set sh=/nfs/kimbark/k4/ellidz/bin/zsh
  476. " a few abbreviations for my email addresses
  477. ab zidlle E. Larry Lidz - ellidz@midway.uchicago.edu
  478. ab --l -Larry
  479. " uppercase V will run ispell -x (-x tells it not to save backups) on current
  480. " file
  481. map V :w<ctrl-v><enter>:!ispell -x %<ctrl-v><enter>:e!<ctrl-v><enter><ctrl-v><enter>
  482. " = will center the line...  if I can get it to work
  483. map = 80I <ctrl-v><esc>$78hd0:s/  / /g<ctrl-v><enter>$p
  484. " v will reformat the current paragraph
  485. map v {0!}fmt<ctrl-v><enter>
  486. " Splits a line in two at current cursor location, puts a > at the
  487. "beginning of the line
  488. map g may0O<ctrl-v><esc>P`ay$:s/./ /g<ctrl-v><enter>0i><ctrl-v><esc>`aPa <ctrl-v><esc>D
  489. " Change the case on the current word
  490. map K ywmno<ctrl-v><ctrl-v><ctrl-v><esc>P:s/./\~/g<ctrl-v><ctrl-v><ctrl-v><enter>0"nDdd`n@n
  491.  
  492. 9.0 - Bugs in vi
  493.  
  494.   I'd like to say that vi is bug free, but unfortunately, it's not.
  495. These bugs are bugs in the original vi, not necessarily in any of the
  496. different clones.
  497.   
  498.   Macros for _ do not always work properly.
  499.   #~ does not work under AIX
  500.  
  501.   The left and right hand side of macro definitions can be at most 100
  502. characters. If they're more than 100 characters it doesn't give a
  503. decent error message -- it either says that it is too dangerous to map
  504. or that the rhs is missing.
  505.  
  506. 10.0 - Glossary of terms
  507.  
  508.   This glossary will be updated as people suggest terms that they do
  509. not understand.  Please let me know if you have any suggestions.
  510.  
  511.   command mode 
  512.     Command mode is the mode within vi where the user gives commands to
  513. vi.  (Including cursor movement commands, editing commands, etc.)
  514.  
  515.   ed 
  516.     A non-visual editor under Unix.
  517.  
  518.  <Esc> 
  519.     The escape key.  A key on a keyboard normally marked by escape.
  520. Sometimes ^[ will work in its place.  If there is no escape key,
  521. sometimes the Meta key will work.
  522.  
  523.   ex 
  524.     An editor under Unix, all commands preceded with : are passed to
  525. it.
  526.  
  527.   insert mode 
  528.     Insert mode is the mode within vi where text is inserted into the
  529. document.
  530.  
  531.   macro 
  532.     A macro is a shortcut key combination.  For example, a macro allows
  533. one to hit one letter and have it execute a few different commands.
  534.  
  535.   open mode 
  536.     Open mode is the mode that vi will start in if it cannot determine
  537. your terminal type, or if it believes you have a hardware or glass-tube
  538. terminal.
  539.  
  540.   regular expressions (RegEx) (RE)
  541.     Regular expressions, commonly known as "RegEx" or "REs" are a set
  542. of key combinations that are meant to allow people to have a large
  543. variety of control over what they are searching for.  RegEx is used a
  544. lot under Unix, and is common between many programs.
  545.  
  546.   sed 
  547.     Stream editor.  An editor that has no interface.  All commands
  548. are given from the command line.
  549.  
  550.   vi 
  551.     The editor to which this FAQ is dedicated.
  552.  
  553. 11.0 - Bibliography of Books that cover vi
  554.   VI QUICK REFERENCE/HELP CARDS
  555.   Specialized System Consultants, Inc.
  556.   (206)-367-8649
  557.   P.O. Box 55549
  558.   Seattle, WA 98155
  559.  
  560.   Unix Programming Tools,
  561.   Eric Foster-Johnson
  562.   M and T Books, 1997.
  563.   ISBN 1-55851-482-1
  564.   Includes a CD-ROM containing vim.
  565.   http://www.pconline.com/~erc/Unixprog.htm
  566.  
  567.   The ULTIMATE GUIDE to the VI and EX Text Editors
  568.   Hewlett Packard Company (authors)
  569.   The Benjamin/Cummings Publishing Company, Inc.
  570.   ISBN 0-8053-4460-8
  571.  
  572.   A PRACTICAL GUIDE TO THE Unix SYSTEM
  573.   Mark G. Sobell
  574.   Benjamin Cummings Publisher
  575.  
  576.   LEARNING THE VI EDITOR
  577.   Linda Lamb
  578.   O'Reilly & Associates
  579.   ISBN 0-937175-67-6
  580.  
  581.   Unix POWER TOOLS  (particularly for macros)
  582.   O'Reilly & Associates
  583.  
  584.   MASTERING REGULAR EXPRESSIONS (for RegEx)
  585.   Jeffrey Friedl
  586.   O'Reilly & Associates, 1997
  587.   ISBN 1-56592-257-3
  588.  
  589.   Unix TEXT PROCESSING
  590.   Hayden Books, 1987
  591.   Dale Dougherty and Tim O'Reilly
  592.   ISBN 0-8104-6291-5
  593.  
  594.   An Introduction to Display Editing with Vi' & 'EX reference Manual' in 
  595.   Unix programmers Manual vol. II
  596.   Bill Joy
  597.   Berkeley Software
  598.  
  599.   Vi iMproved (VIM)
  600.   Steve Oualline
  601.   New Riders
  602.   ISBN 0735710015
  603.   
  604.   EL EDITOR VI. MANUAL DE REFERENCIA
  605.   RA-MA Editorial.
  606.  
  607.   Please make suggestions as to what books are most useful for learning
  608. vi.  I will add books to this section as people suggest them to me.
  609.  
  610. Copyright, E. Larry Lidz, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  611. 2002, 2003.  
  612. All Rights Reserved.
  613.