home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume41 / vim / part20 < prev    next >
Encoding:
Text File  |  1993-12-22  |  46.2 KB  |  1,070 lines

  1. Newsgroups: comp.sources.misc
  2. From: mool@oce.nl (Bram Moolenaar)
  3. Subject: v41i070:  vim - Vi IMitation editor, v2.0, Part20/25
  4. Message-ID: <1993Dec21.172755.2004@sparky.sterling.com>
  5. X-Md4-Signature: 3a3366845d4e184f4c612b35a6ae7e05
  6. Keywords: utility, editor, vi, vim
  7. Sender: kent@sparky.sterling.com (Kent Landfield)
  8. Organization: Sterling Software
  9. Date: Tue, 21 Dec 1993 17:27:55 GMT
  10. Approved: kent@sparky.sterling.com
  11.  
  12. Submitted-by: mool@oce.nl (Bram Moolenaar)
  13. Posting-number: Volume 41, Issue 70
  14. Archive-name: vim/part20
  15. Environment: UNIX, AMIGA, MS-DOS
  16. Supersedes: vim: Volume 37, Issue 1-24
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 20 (of 25)."
  25. # Contents:  vim/doc/reference.do4
  26. # Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:08 1993
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'vim/doc/reference.do4' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'vim/doc/reference.do4'\"
  30. else
  31. echo shar: Extracting \"'vim/doc/reference.do4'\" \(43708 characters\)
  32. sed "s/^X//" >'vim/doc/reference.do4' <<'END_OF_FILE'
  33. Xis an incomplete match, it will get more characters until there either is a
  34. Xcomplete match or until there is no match at all. Example: If you map! "qq",
  35. Xthe first <q> will not appear on the screen until you type another
  36. Xcharacter. This is because Vim cannot know if the next character will be a
  37. X<q> or not. If you set the 'timeout' option (which is the default) Vim will
  38. Xonly wait for one second (or as long as specified with the 'timeoutlen'
  39. Xoption). After that it assumes that the <q> is to be interpreted as such. If
  40. Xtype slowly, or your system is slow, reset the 'timeout' option. Then you
  41. Xmight want to set the 'ttimeout' option. See the "Options" chapter.
  42. X
  43. XIf you want to exchange the meaning of two keys you should use the :noremap 
  44. Xcommand. For example:
  45. X    :noremap k j
  46. X    :noremap j k
  47. XThis will exchange the cursor up and down commands. With the normal :map 
  48. Xcommand, when the 'remap' option is set, mapping takes place until the text 
  49. Xis found not to be a part of a {lhs}. For example, if you use:
  50. X    :map x y
  51. X    :map y x
  52. XVim will replace x by y, and then y by x, etc. When this has happened 1000 
  53. Xtimes, Vim will give an error message.
  54. X
  55. XSee the file "index" for keys that are not used and thus can be mapped 
  56. Xwithout losing any builtin function.
  57. X
  58. XIf you include an undo command inside a mapped sequence, this will bring the 
  59. Xtext back in the state before executing the macro. This is compatible with 
  60. Xthe original vi, as long as there is only one undo command in the mapped 
  61. Xsequence (having two undo commands in a mapped sequence did not make sense 
  62. Xin the original vi, you would get back the text before the first undo).
  63. X
  64. XThere are two ways to map a function key:
  65. X1. The vi-compatible method: Map the key code. Often this is a sequence that
  66. X   starts with <ESC>. To enter a mapping like this you type ":map " and then
  67. X   you have to type CTRL-V before hitting the function key.
  68. X2. The second method is to use the internal code for the function key. To
  69. X   enter such a mapping just hit the function key, without CTRL-V, or use
  70. X   the form "#1", "#2", .. "#9", "#0". Only the first ten function keys can
  71. X   be used this way ("#0" refers to function key 10, defined with option
  72. X   't_f10', which may be function key zero on some keyboards).
  73. XThe advantage of the second method is that the mapping will mostly work on
  74. Xdifferent terminals without modification (the function key will be
  75. Xtranslated into the same internal code, no matter what terminal you are
  76. Xusing. The termcap must be correct for this to work, and you must use the
  77. Xsame mappings).
  78. X
  79. XDETAIL: Vim first checks if a sequence from the keyboard is mapped. If it
  80. Xisn't the terminal key codes are tried (see section 20.2). If a terminal
  81. Xcode is found it is replaced by the internal code. Then the check for a
  82. Xmapping is done again (so you can map an internal code to something else).
  83. XWhat is written into the script file (.vim file) depends on what is
  84. Xrecognized. If the terminal key code was recognized as a mapping the key
  85. Xcode itself is written to the script file. If it was recognized as a
  86. Xterminal code the internal code is written to the script file.
  87. X
  88. X
  89. X    18. Recovery after a crash.
  90. X
  91. XYou have spent several hours typing in that text that has to be finished
  92. Xnext morning, and then disaster strikes: Your computer crashes.
  93. X
  94. X            DON'T PANIC!
  95. X
  96. X
  97. X18.1 The autoscript file
  98. X
  99. XVim keeps track of everything you type. Using the original file you started
  100. Xfrom and the autoscript file you can recover (almost) all of your work.
  101. X
  102. XThe name of the autoscript file is the same as the file you are editing, 
  103. Xwith the extension ".vim". On MSDOS machines and when the 'shortname' option 
  104. Xis set, any <.> is replaced by <_>. If this file already exists (e.g. when 
  105. Xyou are recovering from a crash) a warning is given and another extension is 
  106. Xused, ".vil", ".vik", etc. An existing file will never be overwritten. The 
  107. Xautoscript file is deleted as soon as the edited text is successfully
  108. Xwritten to disk.
  109. X
  110. XTechnical: The replacement of <.> by <_> is done to avoid problems with 
  111. X       MSDOS compatible filesystems (e.g. crossdos, multidos). If Vim is 
  112. X       able to detect that the file is on an MSDOS-like filesystem, a 
  113. X       flag is set that has the same effect as the 'shortname' option. 
  114. X       This flag is reset when you start editing another file.
  115. X
  116. X       If the ".vim" filename already exists, the last character is 
  117. X       decremented until there is no file with that name or ".via" is 
  118. X       reached. In the last case, no autoscript file is created.
  119. X
  120. XBy setting the 'directory' option you can place the autoscript file in
  121. Xanother place than where the edited file is. The advantage is that you will
  122. Xnot pollute the directories with ".vim" files and, when the 'directory' is
  123. Xon another partition, reduce the risc of damaging the file system where the
  124. Xfile is (in a crash). The tradeoff is that you can get name collisions from
  125. Xfiles with the same name but in different directories. You can also use a
  126. Xrecoverable ram disk, but there is no 100% guarantee that this works.
  127. XPutting autoscript files in RAM: makes no sense, you will loose them in a
  128. Xcrash. Put a command resembling the following one in s:.exrc:
  129. X    :set dir=dh2:tmp
  130. XThis is also very handy when editing files on floppy.
  131. X
  132. XThe autoscript file is updated after typing 100 characters or when you have 
  133. Xnot typed anything for two seconds. This only happens if the buffer was 
  134. Xchanged, not when you only moved around. The reason why it is not kept up to 
  135. Xdate all the time is that this would slow down normal work too much. You can 
  136. Xchange the 100 character count with the 'updatecount' option. You can set 
  137. Xthe time with the 'updatetime' option. The time is given in milliseconds.
  138. X
  139. XIf the writing to the autoscript file is not wanted, it can be switched off 
  140. Xby setting the 'updatecount' option to 0. The same is done when starting Vim 
  141. Xwith the "-n" or "-v" option. Writing can be switched back on by setting the 
  142. X'updatecount' option to non-zero. If you have changed the buffer when 
  143. Xswitching on, the autoscript file will be incomplete and recovery will 
  144. Xprobably fail. To avoid this write out the buffer with ":w" before switching 
  145. Xon the autoscript file.
  146. X
  147. X
  148. X18.2 Recovery
  149. X
  150. XIn most cases recovery is quite easy: Start Vim on the same file you were
  151. Xediting when the crash happened, with the "-r" option added. Vim will start
  152. Xediting the file using the key strokes in the autoscript file. Be sure that 
  153. Xthe recovery was successful before overwriting the original file or deleting 
  154. Xthe autoscript file. Once you are sure the recovery is ok, write out the
  155. Xfile with ":wq" and delete the autoscript ".vim" file. Otherwise, you will
  156. Xcontinue to get warning messages that the ".vim" file already exists.
  157. X
  158. XExample:    vim -r reference.doc
  159. X
  160. XImportant: The .exrc file must be the same as with the original edit session,
  161. Xbecause some options have effect on the editing. Also the window size must be
  162. Xexactly the same, because the cursor movement resulting from some commands
  163. Xdepends on the window size (e.g. CTRL-F). To help you with that the window
  164. Xresizing events are written into the script file with ":winsize" commands. 
  165. XThe result of this command is that Vim will resize the used part of the 
  166. Xwindow, but the window itself will remain the same size. The commands will 
  167. Xbe executed correctly, but the window contents may look disturbed. During 
  168. Xnormal editing you should not use the ":winsize" command. Use the window 
  169. Xresizing gadget of the window. Do not resize the window during recovery!
  170. X
  171. XIn some cases the "-r" option does not result in successful recovery. This
  172. Xhappens when you executed a command that cannot be reproduced anymore. For
  173. Xexample: Reading a file which does not exist anymore. In such a case the
  174. Xsucceeding commands probably only make things worse. To solve this you will 
  175. Xhave to edit the autoscript file and remove the commands that cause errors. 
  176. XIf this becomes difficult try splitting up the autoscript file in small 
  177. Xpieces. {Vi: recovers in another way that has a larger change to succeed but 
  178. Xcauses more overhead}
  179. X
  180. XIf the autoscript file does not end in ".vim" but in something else, you can
  181. Xuse the script reading option "-s {filename}". This will have (almost) the 
  182. Xsame effect as the "-r" option. This is also handy when the script file is 
  183. Xin another directory than expected.
  184. X
  185. XYou can give the "-r" option in combination with the "-s scriptin" option. 
  186. XThe scriptin file will be read first, then the autoscript file for recovery.
  187. X
  188. XThe difference between using the "-r" option and the "-s" option is that with
  189. Xthe "-r" option the name of the script file is made from the file name, and 
  190. Xthe last modification date is checked to see if the autoscript file is 
  191. Xnewer. This prevents the wrong autoscript file from being used for a
  192. Xrecovery.
  193. X
  194. X
  195. X    19. Options
  196. X
  197. XVi has a number of internal variables and switches which can be set to 
  198. Xachieve special effects. These options come in three forms, those that are 
  199. Xswitches, which toggle from off to on and back, those that require a numeric 
  200. Xvalue, and those that require an alphanumeric string value.
  201. X
  202. X
  203. X19.1 Setting options
  204. X
  205. X:se[t]            Show all modified options. {Vi: non-default options}
  206. X
  207. X:se[t] all        Show all but terminal options.
  208. X
  209. X:se[t] termcap        Show all terminal options.
  210. X
  211. X:se[t] {option}        Set toggle option on, show value of string or number
  212. X            option.
  213. X
  214. X:se[t] no{option}    Set toggle option off.
  215. X
  216. X:se[t] inv{option}    Invert toggle option. {not in Vi}
  217. X
  218. X:se[t] {option}={value} Set string or number option to {value}.
  219. X
  220. X:se[t] {option}?    Show value of {option}.
  221. X
  222. XThe arguments to ":set" may be repeated. For example:
  223. X":set ai nosi sw=3 ts=3". If you make an error in one of the arguments an 
  224. Xerror message will be given and the text up to the next space will be 
  225. Xskipped. Thus following arguments will be processed.
  226. X
  227. XAn environment variable in most string options will be expanded. This
  228. Xhappens only when the string starts with a <$>. If the environment variable
  229. Xexists the <$> and the following environment variable name is replaced by
  230. Xits value. If it does not exist the <$> and the name are not modified. Any
  231. Xnon-id character (not a letter, digit or <_>) may follow the environment
  232. Xvariable name. That character and what follows is appended to the value of
  233. Xthe environemnt variable. Example:
  234. X    :set term=$TERM.new
  235. X
  236. XBesides changing options with the ":set" command, there are four 
  237. Xalternatives to set options automatically for one or more files. The first 
  238. Xand second ones are used for all files. The third is used to set options for 
  239. Xthe files in one directory. The last is used to set options for a single 
  240. Xfile. The first three are done when you start Vim, in the given order. The 
  241. Xlast is done whenever you start editing a new file.
  242. X
  243. X1. The environment variable VIMINIT is read for an Ex command. You can set
  244. X   VIMINIT to something like "set noai sw=3" to set options.
  245. X2. Only if there is no VIMINIT environment variable, the file 
  246. X   "s:.vimrc" is read for Ex commands. You can include set commands in this 
  247. X   file. (see below for how to automatically create a file with set commands).
  248. X3. If VIMINIT is not found and "s:.vimrc" does not exist, EXINIT is used, 
  249. X   in the same way as VIMINIT.
  250. X4. If VIMINIT is not found, "s:.vimrc" does not exist and EXINIT is not found, 
  251. X   the file "s:.exrc" is read for Ex commands.
  252. X5. If the 'exrc' option is set, the file ".vimrc" in the current directory is 
  253. X   read for Ex commands. You can include set commands in this file. If this 
  254. X   file is not found the file ".exrc" is tried.
  255. X6. If you start editing a new file, and the 'modeline' option is set, a
  256. X   number of lines at the beginning and end of the file are checked for the
  257. X   string "vi:", "vim:" or "ex:". The text after it is considered to be the
  258. X   arguments for a ":set" command, separated with colons or spaces. For
  259. X   example:
  260. X           "vi:noai:sw=3 ts=6"
  261. X   The number of lines that are checked can be set with the 'modelines'
  262. X   option. If 'modeline' is not set or 'modelines' is 0 no lines are
  263. X   checked.
  264. X   The string "vi:", "vim:" or "ex:" must be preceded with a blank or begin 
  265. X   at the start of a line. This minimizes the chance that a normal word like 
  266. X   "lex:" is caught.
  267. X   Note that all of the rest of the line is used, thus a line like:
  268. X           "/* vi:ts=4: */"
  269. X   will give an error message for the trailing "*/".
  270. X   If an error is detected the rest of the line is skipped.
  271. X   One other form of modelines is recognized that has the "set" command
  272. X   after "vi:", "vim:" or "ex:" (this is compatible with some versions of
  273. X   vi). In this case the characters up to the first <:> are executed as an
  274. X   ex command. Anything following it is ignored. Thus a line like:
  275. X           "/* vi:set ts=4: */"
  276. X   is OK. If you want to include a <:> in a set command precede it with a
  277. X   <\>.
  278. X
  279. X
  280. X19.2 Saving settings
  281. X
  282. X:mkexrc [file]        Write current key mappings and changed options to 
  283. X            [file] (default ".exrc"), unless it already exists. 
  284. X            {not in Vi}
  285. X
  286. X:mkexrc! [file]        Always write current key mappings and changed 
  287. X            options to [file] (default ".exrc"). {not in Vi}
  288. X
  289. X:mkvimrc[!] [file]    Same as :mkexrc, but default is ".vimrc". {not in 
  290. X            Vi}
  291. X
  292. XThese commands will write ":map" and ":set" commands to a file, in such a 
  293. Xway that when these commands are executed, the current key mappings and 
  294. Xoptions will be set again. A common method is to use a default ".exrc" file 
  295. Xby first reading one in with ":source s:.exrc.Cprogs", change the settings 
  296. Xand then save them in the current directory with ":mkexrc!".
  297. X
  298. X
  299. X19.3 Options summary
  300. X
  301. XIn the list below all the options are mentioned with their full name and some
  302. Xwith an abbreviation between parens. Both forms may be used. In this
  303. Xdocument when an option that can be toggled is "set" that means that ":set
  304. Xoption" is entered.  When an option is "reset", ":set nooption" is used.
  305. X
  306. Xautoindent (ai)        toggle    (default off)
  307. X    Copy indent from current line when starting a new line (typing <CR> 
  308. X    in Insert mode or when using the "o" or "O" command). If you do not 
  309. X    type anything on the new line except <BS> and then type <ESC> or 
  310. X    <CR>, the indent is deleted again. When autoindent is set, 
  311. X    formatting (with the "Q" command or when you reach 'textwidth' in 
  312. X    Insert mode) uses the indentation of the first line. The 'autoindent'
  313. X    option is reset when the 'paste' option is set.
  314. X
  315. Xautowrite (aw)        toggle    (default off)
  316. X    Write the contents of the file, if it has been modified, on each
  317. X    :next, :rewind, :previous, :stop, :suspend, :tag, :!, :make, CTRL-]
  318. X    and CTRL-^ command; and when a CTRL-O, CTRL-I, '<A-Z>, or `<A-Z>
  319. X    command takes one to another file.
  320. X
  321. Xbackspace (bs)        number    (default 0)
  322. X    Influences the working of <BS>, <DEL>, CTRL-W and CTRL-U in Insert 
  323. X    mode. If set to 0 Vi compatible backspacing is used. When 1 allow 
  324. X    backspacing over newlines. When larger than 1 allow backspacing over 
  325. X    the start of insert. In the last case CTRL-W and CTRL-U stop once at 
  326. X    the start of insert. {not in Vi}
  327. X
  328. Xbackup (bk)        toggle    (default on)
  329. X    Make a backup before overwriting a file. Leave it around after the 
  330. X    file has been succesfully written. If you do not want to keep the 
  331. X    backup file, but you do want a backup while the file is being
  332. X    written, reset this option and set the 'writebackup' option. If you
  333. X    do not want a backup file at all reset both options (See the table
  334. X    in section 5.4 for another explanation.). {not in Vi}
  335. X
  336. Xbackupdir (bdir)    string    (default "$HOME")
  337. X    For Unix systems only. Name of the directory where the backup file 
  338. X    is put when it cannot be created in the same directory as the 
  339. X    original file. Environment variables are expanded. {not in Vi}
  340. X
  341. Xbinary (bin)        toggle    (default off)
  342. X    This option should be set before editing a binary file. You can also
  343. X    use the "-b" command line option. When this option is set the
  344. X    'textwidth' option will set to 0, the 'textmode' and 'textauto'
  345. X    options will be reset and 'modelines' will be set to 0. When writing
  346. X    a file the end-of-line for the last line is only written if there
  347. X    was one in the original file (normally Vim appends an end-of-line to
  348. X    the last line if there is none; this would make the file longer).
  349. X
  350. Xbioskey (bk)        toggle    (default on)
  351. X    For MSDOS only: When set the bios is called to obtain a keyboard
  352. X    character. This works better to detect CTRL-C, but only works for
  353. X    the console. When using a terminal over a serial port reset this
  354. X    option. {not in Vi}
  355. X
  356. Xcolumns            number    (default 80 or terminal width)
  357. X    Number of columns in the display. Normally this is set by the 
  358. X    terminal initialization and does not have to be set by hand. {not in 
  359. X    Vi}
  360. X
  361. Xcompatible (cp)        toggle    (default off)
  362. X    At the moment this option is set, several other options will be set 
  363. X    or reset to make Vim vi-compatible. Switching this option off has no 
  364. X    effect. {not in Vi}
  365. X
  366. X    option        new value    effect
  367. X
  368. X    backspace    0        normal backspace
  369. X    backup        off        no backup file
  370. X    digraph        off        no digraphs
  371. X    esckeys        off        no <ESC>-keys in Insert mode
  372. X    expandtab    off        tabs not expanded to spaces
  373. X    history        0        no commandline history
  374. X    insertmode    off        do not start in Insert mode
  375. X    joinspaces    on        insert 2 spaces after period
  376. X    modelines    0        no modelines
  377. X    revins        off        no reverse insert
  378. X    ruler        off        no ruler
  379. X    scrolljump    0        no jump scroll
  380. X    shiftround    off        indent not rounded to shiftwidth
  381. X    showcmd        off        command characters not shown
  382. X    showmode    off        current mode not shown
  383. X    smartindent    off        no smart indentation
  384. X    textauto    off        no automatic textmode detection
  385. X    textwidth    0        no automatic line wrap
  386. X    tildeop        off        tilde is not an operator
  387. X    ttimeout    off        no terminal timeout
  388. X    undolevels    0        no multilevel undo
  389. X    updatecount    0        no autoscript file
  390. X    writebackup    off        no backup file written
  391. X    yankendofline    off        do not Yank to end of line
  392. X
  393. Xdigraph (dg)        toggle    (default off)
  394. X    Enable the entering of digraphs in Insert mode with {char1} <BS> 
  395. X    {char2}. Only works if Vim was compiled with digraphs enabled. {not 
  396. X    in Vi}
  397. X
  398. Xdirectory (dir)        string    (default "")
  399. X    Directory for the autoscript file. Empty means in same directory as 
  400. X    the edited file. The name may end in an <:> or </>. Environment
  401. X    variables are expanded. Carefeful with <\> characters, type two to
  402. X    get one in the option, ":set dir=c:\\tmp". {Vi: directory to put
  403. X    temp file in, defaults to "/tmp"}
  404. X
  405. Xequalprg (ep)        string    (default "indent")
  406. X    External program to use for "=" command. Environment variables are
  407. X    expanded. {not in Vi}
  408. X
  409. Xerrorbells (eb)        toggle    (default off)
  410. X    Ring the bell for error messages. Does not work on the Amiga, you 
  411. X    always get a screen flash.
  412. X
  413. Xerrorfile (ef)        string    (default "AztecC.Err" or "errors")
  414. X    Name of the error file for the QuickFix mode (see 5.5). Environment
  415. X    variables are expanded. {not in Vi}
  416. X
  417. Xerrorformat (efm)    string    (default "%f>%l:%c:%t:%n:%m" or
  418. X                        ""%f",%*[^0-9]%l %m")
  419. X    Scanf-like description of the format for the lines in the error file
  420. X    (see 5.5). {not in Vi}
  421. X
  422. Xesckeys (ek)        toggle    (default on)
  423. X    Function keys that start with an <ESC> are recognized in Insert
  424. X    mode. When this option is off, the cursor and function keys cannot be
  425. X    used in Insert mode if they start with an <ESC>. The advantage of this
  426. X    is that the single <ESC> is recognized immediately, instead of after
  427. X    one second.
  428. X
  429. Xexpandtab (et)        toggle    (default off)
  430. X    In Insert mode: Use the appropriate number of spaces to insert a 
  431. X    <TAB>. Spaces are used in indents with the '>' and '<' commands and
  432. X    when 'autoindent' is set. To insert a real tab when expandtab is
  433. X    set, use CTRL-V<TAB>. {not in Vi}
  434. X
  435. Xexrc            toggle (default off)
  436. X    Enables the reading of .vimrc and .exrc in the current directory. If
  437. X    you switch this option on you should also consider setting the
  438. X    'secure' option (see 3.4). {not in Vi}
  439. X
  440. Xformatprg (fp)        string (default "")
  441. X    The name of an external program that will be used to format the
  442. X    lines selected with the "Q" command. The program must take the input
  443. X    on stdin and produce the output on stdout. The unix program 'fmt' is
  444. X    such a program. If this option is an empty string, the internal
  445. X    format function will be used. Environment variables are expanded.
  446. X    {not in Vi}
  447. X
  448. Xgraphic (gr)        toggle    (default off, MSDOS: on)
  449. X    When off characters between <~> and 0xa0 are displayed as "~?", 
  450. X    "~@", "~A", etc.. When on the characters are sent to the display 
  451. X    directly. This will allow for graphic characters to be shown on some 
  452. X    terminals (e.g. MSDOS console) and mess up the display on others 
  453. X    (e.g. Amiga).
  454. X
  455. Xhelpfile (hf)        string    (default (Amiga) "vim:vim.hlp"
  456. X                     (unix) "/usr/local/lib/vim.hlp")
  457. X    Name of the help file. It may start with an environment variable. 
  458. X    For example: "$VIM/doc/vim.hlp". Environment variables are expanded.
  459. X    {not in Vi}
  460. X
  461. Xhistory (hi)        number    (default 20)
  462. X    Number of command lines that are remembered. {not in Vi}
  463. X
  464. Xignorecase (ic)        toggle    (default off)
  465. X    Ignore case in search patterns.
  466. X
  467. Xinsertmode (im)        toggle    (default off)
  468. X    Start the edit of a file in Insert mode. {not in Vi}
  469. X
  470. Xjoinspaces (js)        toggle    (default on)
  471. X    Insert two spaces after a period with a join command. {not in Vi}
  472. X
  473. Xkeywordprg (kp)        string    (default "ref")
  474. X    Program to use for the "K" command. Environment variables are
  475. X    expanded. {not in Vi}
  476. X
  477. Xlines            number    (default 24 or terminal height)
  478. X    Number of lines in the display. Normally you don't need to set this. 
  479. X    That is done automatically by the terminal initialization code.
  480. X
  481. Xlist            toggle    (default off)
  482. X    List mode: Show tabs as CTRL-I, show end of line with $. Useful to 
  483. X    see the difference between tabs and spaces and for trailing blanks.
  484. X
  485. Xmagic            toggle    (default on)
  486. X    Changes the special characters that can be used in search patterns. 
  487. X    See section "Pattern searches".
  488. X
  489. Xmakeprg (mp)        string    (default "make")
  490. X    Program to use for the ":make" command. This option may contain
  491. X    <%> and <#> characters, which are expanded like when used in a
  492. X    command line. Environment variables are expanded. {not in Vi}
  493. X
  494. Xmodeline (ml)        toggle    (default on)
  495. Xmodelines (mls)        number    (default 5)
  496. X    If 'modeline' is set 'modelines' gives the number of lines that is
  497. X    checked for set commands. If 'modeline' is not set or 'modelines' is
  498. X    0 no lines are checked. See 19.1. {not in Vi}
  499. X
  500. Xnumber (nu)        toggle    (default off)
  501. X    Print the line number in front of each line.
  502. X
  503. Xparagraphs (para)    string    (default "IPLPPPQPP LIpplpipbp")
  504. X    Specifies the nroff macros that separate paragraphs. These are pairs 
  505. X    of two letters (see section 6.4).
  506. X
  507. Xpaste            toggle    (default off)
  508. X    Put Vim in Paste mode. This is useful if you want to cut or copy
  509. X    some text from one window and paste it in Vim. This will avoid
  510. X    unexpected effects. When the 'paste' option is set mapping in Insert
  511. X    mode is disabled, abbreviations are disabled and some options are
  512. X    reset ('textwidth', 'autoindent', 'smartindent', 'revins', 'ruler'
  513. X    and 'showmatch'). When the 'paste' option is reset the mentioned
  514. X    options are restored to the value before the last time 'paste' was
  515. X    set. If you use this often, you could map a function key to the
  516. X    command ":set invpaste^V^M". {not in Vi}
  517. X
  518. Xreadonly (ro)        toggle    (default off)
  519. X    If set, writes fail unless you use an !. Protects you from
  520. X    accidentally overwriting a file. Also, sets 'updatecount' to zero so
  521. X    that no ".vim" autoscript file is created. Default on when vim is
  522. X    started in view mode ("vim -v") or when the executable is called
  523. X    "view". It is reset if you overwrite the current file (e.g. with
  524. X    ":w!"). WARNING: An edit session that starts with 'noreadonly' won't
  525. X    be protected with a .vim autoscript file unless 'updatecount' is set
  526. X    back to some non-zero number (e.g. 100).
  527. X
  528. Xremap            toggle    (default on)
  529. X    Allows for :map command to work recursively. If you do not want this 
  530. X    for a single entry, use the :noremap[!] command.
  531. X
  532. Xreport            number    (default 2)
  533. X    Threshold for reporting number of lines changed.
  534. X
  535. Xrevins            toggle    (default off)
  536. X    Inserting characters in Insert mode will work backwards. See "typing
  537. X    backwards". Can be toggled with the CTRL-P command in Insert mode.
  538. X    This option is reset when 'compatible' or 'paste' is set. {not in Vi}
  539. X
  540. Xruler (ru)        toggle    (default off)
  541. X    Show the line and column number of the cursor position in the status
  542. X    line, separated by a comma. If there are characters in the line that
  543. X    take two positions on the screen, both the "real" column and the
  544. X    screen column are shown, separated with a dash. This option is reset
  545. X    when the 'paste' option is set. {not in Vi}
  546. X
  547. Xsecure            toggle    (default off)
  548. X    When on, shell and write commands are not allowed in ".vimrc" and 
  549. X    ".exrc" in the current directory and map commands are displayed.
  550. X    Switch it off only if you know that you will not run into problems,
  551. X    or when the 'exrc' option is off.
  552. X
  553. Xscroll            number    (default 'lines' / 2)
  554. X    Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
  555. X    set to half the number of lines in the window when the window size
  556. X    changes. If you give a count to the CTRL-U or CTRL-D command it will
  557. X    be used as the new value for 'scroll'. Reset to 'lines' / 2 with
  558. X    ":set scroll=0".
  559. X
  560. Xscrolljump        number    (default 1)
  561. X    Minimal number of lines to scroll when the cursor gets off the 
  562. X    screen (e.g. with "j"). Not used for scroll commands (e.g. CTRL-E, 
  563. X    CTRL-D). Useful if your terminal scrolls very slowly. {not in Vi}
  564. X
  565. Xsections (sect)        string    (default "SHNHH HUnhsh")
  566. X    Specifies the nroff macros that separate sections. These are pairs of
  567. X    two letters (See section 6.4).
  568. X
  569. Xshell (sh)        string    (default $SHELL or "sh", MSDOS: "command")
  570. X    Name of the shell to use for ! and :! commands. See also the
  571. X    'shelltype' option. It is allowed to give an argument to the 
  572. X    command, e.g. "csh -f". If you type this in the command line you 
  573. X    will have to put a backslash in front of the space. Environment
  574. X    variables are expanded.
  575. X
  576. Xshelltype (st)        number    (default 0)
  577. X    On the Amiga this option influences the way how the commands work 
  578. X    which use a shell.
  579. X    0 and 1: always use the shell
  580. X    2 and 3: use the shell only to filter lines
  581. X    4 and 5: use shell only for ':sh' command
  582. X    When not using the shell, the command is executed directly.
  583. X
  584. X    0 and 2: use 'shell -c cmd' to start external commands
  585. X    1 and 3: use 'shell cmd' to start external commands
  586. X
  587. Xshiftround (sr)        toggle    (default off)
  588. X    Round indent to multiple of shiftwidth. Applies to > and < commands 
  589. X    and to CTRL-T and CTRL-D in Insert mode. {not in Vi}
  590. X
  591. Xshiftwidth (sw)        number    (default 8)
  592. X    Number of spaces to use for (auto)indent.
  593. X
  594. Xshortname (sn)        toggle    (default off)
  595. X    Filenames can be 8 characters plus one extension of 3 characters. 
  596. X    Multiple dots in file names are not allowed. When this option is on, 
  597. X    dots in filenames are replaced by underscores when adding an 
  598. X    extension (".bak" or ".vim"). This option is not available for 
  599. X    MSDOS, because then it would always be on. This option is useful 
  600. X    when editing files on an MSDOS compatible filesystem, e.g. messydos 
  601. X    or crossdos. {not in Vi}
  602. X
  603. Xshowcmd (sc)        toggle    (default on, off for unix)
  604. X    show command in status line. Set this option off if your terminal 
  605. X    is slow. {not in Vi}
  606. X
  607. Xshowmatch (sm)        toggle    (default off)
  608. X    When a bracket is inserted, briefly jump to the matching one. This
  609. X    option is reset when the 'paste' option is set.
  610. X
  611. Xshowmode (smd)        toggle    (default on)
  612. X    If in Insert or Replace mode, put a message on the last line.
  613. X
  614. Xsidescroll (ss)        number    (default 0)
  615. X    The minimal number of columns to scroll horizontally. Used only when
  616. X    the 'wrap' option is on and the cursor is moved off of the screen.
  617. X    When set to zero the cursor will be put in the middle of the screen.
  618. X    When using a slow terminal set it to a large number or 0. When using
  619. X    a fast terminal use a small number or 1. {not in Vi}
  620. X
  621. Xsmartindent (si)    toggle    (default off)
  622. X    Do smart autoindenting for C programs in Insert mode and with the
  623. X    "o" and "O" commands. An indent is automatically inserted:
  624. X    - After a line ending in <{>.
  625. X    - After a line starting with "if", "for", "while", "else" or "do".
  626. X      If you type a <{> as the first character in the new line, the
  627. X      indent is deleted. 
  628. X    - Before a line starting with <}> (only with the "O" command).
  629. X    One indent is deleted when typing <}> as the first character in a
  630. X    new line.
  631. X    'smartindent' is reset when the 'paste' option is set. {not in Vi}
  632. X
  633. Xsuffixes (su)        string    (default ".bak.o.h.info.vim")
  634. X    Files with these suffixes are ignored when multiple files match a
  635. X    wildcard. {not in Vi}
  636. X
  637. Xtabstop (ts)        number    (default 8)
  638. X    Number of spaces that a <TAB> in the file counts for.
  639. X
  640. Xtaglength (tl)        number    (default 0)
  641. X    If non-zero, tags are significant up to this number of characters.
  642. X
  643. Xtags            string    (default "tags")
  644. X    Filenames for the tag command, separated by spaces. Environment
  645. X    variables are expanded for the first name. {Vi: default is "tags
  646. X    /usr/lib/tags"}
  647. X
  648. Xterm            string    (default $TERM or "amiga" on Amiga, "pcterm"
  649. X                    on MSDOS)
  650. X    Name of the terminal. Used for choosing the terminal control 
  651. X    characters. Environment variables are expanded.
  652. X
  653. Xterse            toggle    (default on)
  654. X    Ignored. {Vi: shorten the error messages}
  655. X
  656. Xtextauto (ta)        toggle    (default on)
  657. X    When a new file is edited the first line is checked for the line
  658. X    separator. If it is a single <LF> 'textmode' is reset. If it is a
  659. X    <CR><LF> pair 'textmode' is set.
  660. X
  661. Xtextmode (tx)        toggle    (MSDOS: default on, others: default off)
  662. X    When off, <LF> separates lines. When on, <CR><LF> separates lines.
  663. X    Only used when reading and writing files. Set automatically when
  664. X    reading a file and 'textauto' is on.
  665. X
  666. Xtextwidth        number    (default 0)
  667. X    Maximum width of text that is being inserted. A longer line will be
  668. X    broken after white space to get this width. A zero value disables
  669. X    this. 'textwidth' is set to 0 when the 'paste' option is set. If
  670. X    'wrapmargin' is set to non-zero, textwidth is set to
  671. X    ('columns' - 'wrapmargin'). {not in Vi} 
  672. X
  673. Xtildeop (to)        toggle    (default off)
  674. X    The tilde command <~> behaves like an operator. {not in Vi}
  675. X
  676. Xtimeout            toggle (default on)
  677. Xttimeout        toggle (default off)
  678. X    These two options together determine the behaviour when part of a 
  679. X    mapped key sequence or keyboard code has been received:
  680. X
  681. X    timeout        ttimeout    action
  682. X    off        off        no time out
  683. X    on        on or off    time out on :mappings and key codes
  684. X    off        on        time out on key codes
  685. X
  686. X    If there is no time out, Vim will wait until either the complete 
  687. X    mapping or key sequence has been received, or it is clear that there 
  688. X    is no mapping or key sequence for the received characters. For 
  689. X    example: if you have mapped "vl" and Vim has received <v>, the next 
  690. X    character is needed to see if the <v> is followed by an <l>. With a 
  691. X    time out Vim will wait for about 1 second for the next character to 
  692. X    arrive. After that the already received characters are interpreted
  693. X    as single characters. The time can be set with the 'timeoutlen'
  694. X    option.
  695. X    On slow terminals or very busy systems time out may cause 
  696. X    malfunctioning cursor keys. If both options are off, Vim waits 
  697. X    forever after an entered <ESC> if there are key codes that start 
  698. X    with <ESC>. You will have to type <ESC> twice. If you do not have 
  699. X    problems with key codes, but would like to have :mapped key 
  700. X    sequences not time out in 1 second, set the ttimeout option and 
  701. X    reset the timeout option. {the ttimeout option is not in Vi}
  702. X
  703. Xtimeoutlen (tm)        number    (default 1000)
  704. X    The time in milliseconds that is waited for a key code or mapped key
  705. X    sequence to complete. {only in some versions of Vi}
  706. X
  707. Xundolevels (ul)        number    (default 100)
  708. X    Maximum number of changes that can be undone. Set to 0 for Vi 
  709. X    compatibility: one level of undo and 'u' undoes itself. Set to a
  710. X    negative number for no undo at all (saves memory). {not in Vi}
  711. X
  712. Xupdatecount (uc)    number    (default 100)
  713. X    After this many characters typed the auto script file will be written
  714. X    to disk. When zero the auto script will not be written to at all (see
  715. X    chapter on recovery). {not in Vi}
  716. X
  717. Xupdatetime (ut)        number    (default 2000)
  718. X    If this many milliseconds nothing is typed the auto script file will 
  719. X    be written to disk (see chapter on recovery). {not in Vi}
  720. X
  721. Xvisualbell (vb)        toggle    (default off)
  722. X    Use (sort of) visual bell for AUX device. {not in Vi}
  723. X
  724. Xwarn            toggle    (default on)
  725. X    Give a warning message when a shell command is used while the buffer
  726. X    has been changed.
  727. X
  728. Xwildchar (wc)        number    (default <TAB> or CTRL-E)
  729. X    Character you have to type to start wildcard expansion in the 
  730. X    command line. CTRL-E is used when Vim was compiled with COMPATIBLE 
  731. X    or when the 'compatible' option is set. The character is not
  732. X    recognized when used inside a macro. {not in Vi}
  733. X
  734. Xwrap            toggle    (default on)
  735. X    When on, long lines will wrap and continue on the next line. When
  736. X    off long lines will not wrap and only part of them will be shown.
  737. X    When the cursor is moved to a part that is not shown, the screen
  738. X    will scroll horizontally (also see 'sidescroll' option. {not in Vi}
  739. X
  740. Xwrapmargin (wm)        number    (default 0)
  741. X    Number of characters from the right window border where wrapping
  742. X    starts. In Vim this is implemented by setting textwidth to the window
  743. X    width minus the wrapmargin. {Vi: works differently and less useful}
  744. X
  745. Xwrapscan (ws)        toggle    (default on)
  746. X    Searches wrap around the end of the file.
  747. X
  748. Xwriteany (wa)        toggle    (default off)
  749. X    Allows writing to any file with no need for "!" override.
  750. X
  751. Xwritebackup (wb)    toggle    (default on)
  752. X    Make a backup before overwriting a file. The backup is removed after 
  753. X    the file was succesfully written, unless the 'backup' option is also 
  754. X    on. {not in Vi}
  755. X
  756. Xyankendofline (ye)    toggle    (default off)
  757. X    The Y command yanks from the cursor until the end of the line instead
  758. X    of whole lines. {not in Vi}
  759. X
  760. X
  761. X    20. Terminal information
  762. X
  763. XVim uses information about the terminal you are using to fill the screen and 
  764. Xrecognize what keys you hit. If this information is not correct the screen 
  765. Xmay be messed up or keys may not be recognized. The actions which have to be 
  766. Xperformed on the screen are accomplished by outputting a string of
  767. Xcharacters. Special keys produce a string of characters. These strings are 
  768. Xstored in the terminal options, see section 20.2.
  769. X
  770. X
  771. X20.1 startup
  772. X
  773. XWhen Vim is started a default terminal type is assumed. For the Amiga this 
  774. Xis a standard CLI window, for MSDOS the pc terminal, for Unix an ansi 
  775. Xterminal. A few other terminal types are always available. Use the command 
  776. X"set term=xxx" to find out which ones are builtin.
  777. X
  778. XYou can give the terminal name with the '-T' command line option. If it is 
  779. Xnot given Vim will try to get the name from the TERM environment variable.
  780. X
  781. XOn Unix the termcap file is used. On Amiga and MSDOS this is only available 
  782. Xif Vim was compiled with TERMCAP defined. If the termcap code is included 
  783. XVim will try to get the strings for the terminal you are using from the 
  784. Xtermcap file.
  785. X
  786. XFor normal editing the terminal will be put into "raw" mode. The strings 
  787. Xdefined with 't_ts' and 't_ks' will be sent to the terminal. Normally this 
  788. Xputs the terminal in a state where the termcap codes are valid and activates 
  789. Xthe cursor and function keys. When Vim exits the terminal will be put back 
  790. Xinto the mode it was before Vim started. The strings defined with 't_te' and 
  791. X't_ke' will be sent to the terminal. On the Amiga with commands that print 
  792. Xmultiple lines at the bottom of the screen or execute an external command 
  793. X(e.g. "!!", ":files") the terminal will be put into normal mode for a 
  794. Xmoment. This means that you can stop the output to the screen by hitting a 
  795. Xprinting key. Output resumes when you hit <BS>.
  796. X
  797. XSome termcap entries are wrong in the sense that after sending 't_ks' the 
  798. Xcursor keys send codes different from the codes defined in the termcap. To 
  799. Xavoid this you can set 't_ks' (and 't_ke') to empty strings. This must be
  800. Xdone during initialization (see 3.4), otherwise its too late.
  801. X
  802. XSome termcap entries assume that the highest bit is always reset. For 
  803. Xexample: The cursor-up entry for the amiga could be ":ku=\EA:". But the 
  804. XAmiga really sends "\233A". This works fine if the highest bit is reset, 
  805. Xe.g. when using an Amiga over a serial line. If the cursor keys don't work, 
  806. Xtry the entry ":ku=\233A:".
  807. X
  808. XSome termcap entries have the entry ":ku=\E[A:". But the Amiga really sends 
  809. X"\233A". On output "\E[" and "\233" are often equivalent, on input they 
  810. Xaren't. You will have to change the termcap entry, or change the key code 
  811. Xwith the :set command to fix this.
  812. X
  813. XMany cursor key codes start with an <ESC>. Vim must find out if this a 
  814. Xsingle hit of the <ESC> key or the start of a cursor key sequence. It waits 
  815. Xfor a next character to arrive. If it does not arrive within one second a 
  816. Xsingle <ESC> is assumed. On very slow systems this may fail, causing cursor 
  817. Xkeys not to work sometimes. If you discover this problem reset the 'timeout' 
  818. Xoption. Vim will wait for the next character to arrive after an <ESC>. If 
  819. Xyou want to enter a single <ESC> you must type it twice. Resetting the
  820. X'esckeys' option avoids this problems in Insert mode, but you lose the
  821. Xpossibility to use cursor and function keys in Insert mode.
  822. X
  823. XOn the Amiga the recognition of window resizing is activated only when the 
  824. Xterminal name is "amiga" or "builtin_amiga".
  825. X
  826. XSome terminals have confusing codes for the cursor keys. The televideo 925
  827. Xis such a terminal. It sends a CTRL-H for cursor-left. This would make it
  828. Ximpossible to distinguish a backspace and cursor-left. To avoid this problem
  829. XCTRL-H is never recognized as cursor-left.
  830. X
  831. X
  832. X20.2 terminal options
  833. X
  834. XThe terminal options can be set just like normal options. But they are not
  835. Xshown with the ":set all" command. Instead use ":set termcap".
  836. X
  837. XIt is always possible to change individual strings by setting the 
  838. Xappropriate option. For example:
  839. X
  840. X    :set t_el=^V^[[K    (CTRL-V, ESC, [, K)
  841. X
  842. X{Vi: no terminal options. You have to exit vi, edit the termcap entry and
  843. Xtry again}
  844. X
  845. XThe options are listed below along with the associated termcap code. Two of
  846. Xthem are required: Cursor positioning and clear screen. The others are used
  847. Xto minimize the screen updating overhead and to recognize special keys.
  848. X
  849. X
  850. X    option    termcap        meaning
  851. X
  852. XOUTPUT CODES
  853. X    t_name    (name)    name of current terminal entry
  854. X    t_el    ce    clear to end of line
  855. X    t_il    al    add new blank line
  856. X    t_cil    AL    add number of blank lines
  857. X    t_dl    dl    delete line
  858. X    t_cdl    DL    delete number of lines
  859. X    t_ed    cl    clear screen (required!)
  860. X    t_ci    vi    cursur invisible
  861. X    t_cv    ve    cursur visible
  862. X    t_tp    me    normal mode
  863. X    t_tp    se    shift-out end (if 'mr' or 'me' not defined)
  864. X    t_ti    mr    reverse mode
  865. X    t_ti    so    shift-out mode (if 'mr' or 'me' not defined)
  866. X    t_cm    cm    cursor motion (required!)
  867. X    t_sr    sr    scroll reverse (backward)
  868. X    t_cri    RI    cursor number of chars right
  869. X    t_vb    vb    visual bell
  870. X    t_ks    ks    put terminal in "keypad transmit" mode
  871. X    t_ke    ke    out of "keypad transmit" mode
  872. X    t_ts    ti    put terminal in "termcap" mode
  873. X    t_te    te    out of "termcap" mode
  874. X
  875. XKEY CODES
  876. X    t_ku    ku    arrow up
  877. X    t_kd    kd    arrow down
  878. X    t_kr    kr    arrow right
  879. X    t_kl    kl    arrow left
  880. X    t_sku    (none)    shift arrow up
  881. X    t_skd    (none)    shift arrow down
  882. X    t_skr    %i    shift arrow right
  883. X    t_skl    #4    shift arrow left
  884. X    t_f1    k1    function key 1
  885. X    t_f2    k2    function key 2
  886. X    t_f3    k3    function key 3
  887. X    t_f4    k4    function key 4
  888. X    t_f5    k5    function key 5
  889. X    t_f6    k6    function key 6
  890. X    t_f7    k7    function key 7
  891. X    t_f8    k8    function key 8
  892. X    t_f9    k9    function key 9
  893. X    t_f10    k;    function key 10
  894. X    t_sf1    F1    function key 11 or shifted function key 1
  895. X    t_sf2    F2    function key 12 or shifted function key 2
  896. X    t_sf3    F3    function key 13 or shifted function key 3
  897. X    t_sf4    F4    function key 14 or shifted function key 4
  898. X    t_sf5    F5    function key 15 or shifted function key 5
  899. X    t_sf6    F6    function key 16 or shifted function key 6
  900. X    t_sf7    F7    function key 17 or shifted function key 7
  901. X    t_sf8    F8    function key 18 or shifted function key 8
  902. X    t_sf9    F9    function key 19 or shifted function key 9
  903. X    t_sf10    FA    function key 20 or shifted function key 10
  904. X    t_help    %1    help key
  905. X    t_undo    &8    undo key
  906. X
  907. XNote for xterm users: The shifted cursor keys normally don't work. You can
  908. X    make them work with the xmodmap command and some mappings in Vim.
  909. X
  910. X    Give these commands in the xterm:
  911. X        xmodmap -e "keysym Up = Up F16"
  912. X        xmodmap -e "keysym Down = Down F17"
  913. X        xmodmap -e "keysym Left = Left F18"
  914. X        xmodmap -e "keycode Right = Right F19"
  915. X
  916. X    And use these mappings in Vim:
  917. X        :map CTRL-V 151 CTRL-V 132
  918. X        :map! CTRL-V 151 CTRL-V 132
  919. X        :map CTRL-V 152 CTRL-V 133
  920. X        :map! CTRL-V 152 CTRL-V 133
  921. X        :map CTRL-V 153 CTRL-V 134
  922. X        :map! CTRL-V 153 CTRL-V 134
  923. X        :map CTRL-V 154 CTRL-V 135
  924. X        :map! CTRL-V 154 CTRL-V 135
  925. X
  926. XWhere 151-154 are the internal vim decimal codes for function keys F16 to
  927. XF19 and 132-135 are the codes for the shifted arrow keys.
  928. X
  929. X
  930. X20.3 Window size
  931. X
  932. XIf you are running Vim on an Amiga and the terminal name is "amiga" or 
  933. X"builtin_amiga", the amiga-specific window resizing will be enabled. On Unix 
  934. Xsystems three methods are tried to get the window size:
  935. X
  936. X- an ioctl call (TIOCGSIZE or TIOCGWINSZ, depends on your system)
  937. X- the environment variables "LINES" and "COLUMNS"
  938. X- from the termcap entries "li" and "co"
  939. X
  940. XIf everything fails a default size of 24 lines and 80 columns is assumed. If 
  941. Xa window-resize signal is received the size will be set again. If the window 
  942. Xsize is wrong you can use the 'lines' and 'columns' options to set the 
  943. Xcorrect values.
  944. X
  945. X
  946. X20.4 slow and fast terminals
  947. X
  948. XIf you have a fast terminal you may like to set the 'ruler' option. The 
  949. Xcursor position is shown in the status line. If you are using horizontal
  950. Xscrolling ('wrap' option off) consider setting 'sidescroll' to a small
  951. Xnumber. 
  952. X
  953. XIf you have a slow terminal you may want to reset the 'showcmd' option. 
  954. XThe command characters will not be shown in the status line. If the terminal 
  955. Xscrolls very slowly, set the 'scrolljump' to 5 or so. If the cursor is moved
  956. Xoff the screen (e.g. with "j") Vim will scroll 5 lines at a time. Another
  957. Xpossibility is to reduce the number of lines that Vim uses with the command
  958. X"z<height><CR>".
  959. X
  960. XIf the characters from the terminal are arriving with more than 1 second 
  961. Xbetween them you might want to set the 'timeout' and/or 'ttimeout' option. 
  962. XSee the "Options" chapter.
  963. X
  964. X
  965. X    21. Differences from Vi and Ex
  966. X
  967. XThis chapter only lists what has not been mentioned in previous chapters.
  968. XAlso see "difference.doc".
  969. X
  970. X21.1 Missing commands
  971. X
  972. XA large number of the "Ex" commands (the commands that start with a colon) 
  973. Xare included. However, there is no Ex mode. 
  974. X
  975. XThese commands are in Vi, but not in Vim.
  976. X
  977. XQ            {Vi: go to Ex mode}
  978. X
  979. X:a[ppend]        {Vi: append text}
  980. X:c[hange]        {Vi: replace lines}
  981. X:i[nsert]        {Vi: insert text}
  982. X:o[pen]            {Vi: start editing in open mode}
  983. X:pres[erve]        {Vi: emergency exit}
  984. X:rec[over]        {Vi: recover a file after a crash or :preserve}
  985. X:z            {Vi: print some lines}
  986. X:~            {Vi: do a substitute on the previous regular
  987. X            expression}
  988. X
  989. X
  990. X21.2 Missing options
  991. X
  992. XThese options are in the unix Vi, but not in Vim. If you try to set them you 
  993. Xwon't get an error message, but their value cannot be printed.
  994. X
  995. Xautoprint (ap)        toggle    (default on)
  996. Xbeautify (bf)        toggle    (default off)
  997. Xedcompatible        toggle    (default off)
  998. Xhardtabs (ht)        number    (default 8)
  999. X    number of spaces that a <TAB> moves on the display
  1000. Xlisp            toggle    (default off)
  1001. Xmesg            toggle    (default on)
  1002. Xopen            toggle    (default on)
  1003. Xoptimize (op)        toggle    (default on)
  1004. Xprompt            toggle    (default on)
  1005. Xredraw            toggle    (default off)
  1006. Xslowopen (slow)        toggle    (default off)
  1007. Xsourceany        toggle    (default not documented)
  1008. Xttytype            string
  1009. Xwindow            number    (default 24)
  1010. Xw300            number    (default 24)
  1011. Xw1200            number    (default 24)
  1012. Xw9600            number    (default 24)
  1013. X
  1014. X
  1015. X    22. Credits
  1016. X
  1017. XParts of this manual comes from several Vi manuals, written by:
  1018. X    W.N. Joy
  1019. X    Alan P.W. Hewett
  1020. X    Mark Horton
  1021. X
  1022. XThe editor Vim is based on Stevie and includes (ideas from) other software,
  1023. Xworked on by:
  1024. X    Tim Thompson        Stevie
  1025. X    Tony Andrews        Stevie
  1026. X    G. R. (Fred) Walter    Stevie
  1027. X    Henry Spencer        regular expressions
  1028. X    Steve Kirkendall    Elvis
  1029. X    Juergen Weigert        Lattice version, AUX improvements, UNIX and 
  1030. X                MSDOS ports
  1031. X    Olaf Seibert        DICE version and regexp improvements
  1032. X    Peter da Silva        termlib
  1033. X
  1034. XI must thank all the people that sent me bug reports and suggestions. 
  1035. XThey keep Vim alive!
  1036. Xvi:tw=76:ts=8:sw=8
  1037. END_OF_FILE
  1038. if test 43708 -ne `wc -c <'vim/doc/reference.do4'`; then
  1039.     echo shar: \"'vim/doc/reference.do4'\" unpacked with wrong size!
  1040. fi
  1041. chmod +x 'vim/doc/reference.do4'
  1042. # end of 'vim/doc/reference.do4'
  1043. fi
  1044. echo shar: End of archive 20 \(of 25\).
  1045. cp /dev/null ark20isdone
  1046. MISSING=""
  1047. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
  1048.     if test ! -f ark${I}isdone ; then
  1049.     MISSING="${MISSING} ${I}"
  1050.     fi
  1051. done
  1052. if test "${MISSING}" = "" ; then
  1053.     echo You have unpacked all 25 archives.
  1054.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1055. else
  1056.     echo You still need to unpack the following archives:
  1057.     echo "        " ${MISSING}
  1058. fi
  1059. ##  End of shell archive.
  1060. exit 0
  1061.  
  1062. ===============================================================================
  1063. Bram Moolenaar                             | DISCLAIMER:  This  note  does  not
  1064. Oce Nederland B.V., Research & Development | necessarily represent the position
  1065. p.o. box 101, 5900 MA  Venlo               | of  Oce-Nederland  B.V.  Therefore
  1066. The Netherlands        phone +31 77 594077 | no liability or responsibility for
  1067. UUCP: mool@oce.nl        fax +31 77 595473 | whatever will be accepted.
  1068.  
  1069. exit 0 # Just in case...
  1070.