LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5590|回复: 4

VIM--Option详解

 关闭 [复制链接]
发表于 2004-8-14 00:29:04 | 显示全部楼层 |阅读模式
OPTIONS

*options.txt*For Vim version 6.2.  Last change: 2004 Apr 29


  VIM REFERENCE MANUAL  by Bram Moolenaar


  1. Options*options*

  2. 1. Setting options|set-option|
  3. 2. Automatically setting options|auto-setting|
  4. 3. Options summary|option-summary|

  5. For an overview of options see help.txt |option-list|.

  6. Vim has a number of internal variables and switches which can be set to
  7. achieve special effects.  These options come in three forms:
  8. booleancan only be on or off*boolean* *toggle*
  9. numberhas a numeric value
  10. stringhas a string value


  11. 1. Setting options*set-option*

  12. *:se* *:set*
  13. :se[t]Show all options that differ from their default value.

  14. :se[t] allShow all but terminal options.

  15. :se[t] termcapShow all terminal options.  Note that in the GUI the
  16. key codes are not shown, because they are generated
  17. internally and can't be changed.  Changing the terminal
  18. codes in the GUI is not useful either...

  19. *E518* *E519*
  20. :se[t] {option}?Show value of {option}.

  21. :se[t] {option}Toggle option: set, switch it on.
  22. Number option: show value.
  23. String option: show value.

  24. :se[t] no{option}Toggle option: Reset, switch it off.

  25. :se[t] {option}!   or
  26. :se[t] inv{option}Toggle option: Invert value. {not in Vi}

  27. *:set-default* *:set-&* *:set-&vi* *:set-&vim*
  28. :se[t] {option}&Reset option to its default value.  May depend on the
  29. current value of 'compatible'. {not in Vi}
  30. :se[t] {option}&viReset option to its Vi default value. {not in Vi}
  31. :se[t] {option}&vimReset option to its Vim default value. {not in Vi}

  32. :se[t] all&Set all options, except terminal options, to their
  33. default value.The values of 'term', 'lines' and
  34. 'columns' are not changed. {not in Vi}

  35. *E487* *E521*
  36. :se[t] {option}={value}or
  37. :se[t] {option}:{value}
  38. Set string or number option to {value}.
  39. *:set-args*
  40. For numeric options the value can be given in decimal,
  41. hex (preceded with 0x) or octal (preceded with '0')
  42. (hex and octal are only available for machines which
  43. have the strtol() function).
  44. The old value can be inserted by typing 'wildchar' (by
  45. default this is a <Tab> or CTRL-E if 'compatible' is
  46. set).  See |cmdline-completion|.
  47. White space between {option} and '=' is allowed and
  48. will be ignored.  White space between '=' and {value}
  49. is not allowed.
  50. See |option-backslash| for using white space and
  51. backslashes in {value}.

  52. :se[t] {option}+={value}*:set+=*
  53. Add the {value} to a number option, or append the
  54. {value} to a string option.  When the option is a
  55. comma separated list, a comma is added, unless the
  56. value was empty.
  57. If the option is a list of flags, superfluous flags
  58. are removed.  Otherwise there is no check for doubled
  59. values.  You can avoid this by removing a value first.
  60. Example:
  61. :set guioptions-=T guioptions+=T
  62. Also see |:set-args| above.
  63. {not in Vi}

  64. :se[t] {option}^={value}*:set^=*
  65. Multiply the {value} to a number option, or prepend
  66. the {value} to a string option.  When the option is a
  67. comma separated list, a comma is added, unless the
  68. value was empty.
  69. Also see |:set-args| above.
  70. {not in Vi}

  71. :se[t] {option}-={value}*:set-=*
  72. Subtract the {value} from a number option, or remove
  73. the {value} from a string option, if it is there.
  74. If the {value} is not found in a string option, there
  75. is no error or warning.  When the option is a comma
  76. separated list, a comma is deleted, unless the option
  77. becomes empty.
  78. When the option is a list of flags, {value} must be
  79. exactly as they appear in the option.  Remove flags
  80. one by one to avoid problems.
  81. Also see |:set-args| above.
  82. {not in Vi}

  83. The {option} arguments to ":set" may be repeated.  For example:
  84. :set ai nosi sw=3 ts=3
  85. If you make an error in one of the arguments, an error message will be given
  86. and the following arguments will be ignored.

  87. *:set-verbose*
  88. When 'verbose' is non-zero, displaying an option value will also tell where it
  89. was last set.  Example:
  90. :verbose set shiftwidth cindent?
  91.   shiftwidth=4
  92.   Last set from modeline
  93.   cindent
  94.   Last set from /usr/local/share/vim/vim60/ftplugin/c.vim
  95. This is only done when specific option values are requested, not for ":set
  96. all" or ":set" without an argument.
  97. When the option was set by hand there is no "Last set" message.  There is only
  98. one value for all local options with the same name.  Thus the message applies
  99. to the option name, not necessarily its value.
  100. When the option was set while executing a function, user command or
  101. autocommand, the script in which it was defined is reported.
  102. Note that an option may also have been set as a side effect of setting
  103. 'compatible'.
  104. {not available when compiled without the +eval feature}

  105. *:set-termcap* *E522*
  106. For {option} the form "t_xx" may be used to set a termcap option.  This will
  107. override the value from the termcap.  You can then use it in a mapping.  If
  108. the "xx" part contains special characters, use the <t_xx> form:
  109. :set <t_#4>=^[Ot
  110. This can also be used to translate a special code for a normal key.  For
  111. example, if Alt-b produces <Esc>b, use this:
  112. :set <M-b>=^[b
  113. (the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
  114. The advantage over a mapping is that it works in all situations.

  115. The listing from ":set" looks different from Vi.  Long string options are put
  116. at the end of the list.  The number of options is quite large.The output of
  117. "set all" probably does not fit on the screen, causing Vim to give the
  118. |more-prompt|.

  119. *option-backslash*
  120. To include white space in a string option value it has to be preceded with a
  121. backslash.  To include a backslash you have to use two.  Effectively this
  122. means that the number of backslashes in an option value is halved (rounded
  123. down).
  124. A few examples:
  125.    :set tags=tags\ /usr/tags    results in "tags /usr/tags"
  126.    :set tags=tags\\,file    results in "tags\,file"
  127.    :set tags=tags\\\ file    results in "tags\ file"

  128. The "|" character separates a ":set" command from a following command.To
  129. include the "|" in the option value, use "\|" instead.This example sets the
  130. 'titlestring' option to "hi|there":
  131.    :set titlestring=hi\|there
  132. This sets the 'titlestring' option to "hi" and 'iconstring' to "there":
  133.    :set titlestring=hi|set iconstring=there

  134. For MS-DOS and WIN32 backslashes in file names are mostly not removed.More
  135. precise: For options that expect a file name (those where environment
  136. variables are expanded) a backslash before a normal file name character is not
  137. removed.  But a backslash before a special character (space, backslash, comma,
  138. etc.) is used like explained above.
  139. There is one special situation, when the value starts with "\":
  140.    :set dir=\\machine\path    results in "\\machine\path"
  141.    :set dir=\\\\machine\\path    results in "\\machine\path"
  142.    :set dir=\\path\\file    results in "\\path\file" (wrong!)
  143. For the first one the start is kept, but for the second one the backslashes
  144. are halved.  This makes sure it works both when you expect backslashes to be
  145. halved and when you expect the backslashes to be kept.The third gives a
  146. result which is probably not what you want.  Avoid it.

  147. *add-option-flags* *remove-option-flags*
  148. *E539* *E550* *E551* *E552*
  149. Some options are a list of flags.  When you want to add a flag to such an
  150. option, without changing the existing ones, you can do it like this:
  151.    :set guioptions+=a
  152. Remove a flag from an option like this:
  153.    :set guioptions-=a
  154. This removes the 'a' flag from 'guioptions'.
  155. Note that you should add or remove one flag at a time.If 'guioptions' has
  156. the value "ab", using "set guioptions-=ba" won't work, because the string "ba"
  157. doesn't appear.

  158.    *:set_env* *expand-env* *expand-environment-var*
  159. Environment variables in most string options will be expanded.If the
  160. environment variable exists the '$' and the following environment variable
  161. name is replaced with its value.  If it does not exist the '$' and the name
  162. are not modified.  Any non-id character (not a letter, digit or '_') may
  163. follow the environment variable name.  That character and what follows is
  164. appended to the value of the environment variable.  Examples:
  165.    :set term=$TERM.new
  166.    :set path=/usr/$INCLUDE,$HOME/include,.
  167. When adding or removing a string from an option with ":set opt-=val" or ":set
  168. opt+=val" the expansion is done before the adding or removing.


  169. Handling of local options*local-options*

  170. Some of the options only apply to a window or buffer.  Each window or buffer
  171. has its own copy of this option, thus can each have their own value.  This
  172. allows you to set 'list' in one window but not in another.  And set
  173. 'shiftwidth' to 3 in one buffer and 4 in another.

  174. The following explains what happens to these local options in specific
  175. situations.  You don't really need to know all of this, since Vim mostly uses
  176. the option values you would expect.  Unfortunately, doing what the user
  177. expects is a bit complicated...

  178. When splitting a window, the local options are copied to the new window.  Thus
  179. right after the split the contents of the two windows look the same.

  180. When editing a new buffer, its local option values must be initialized.  Since
  181. the local options of the current buffer might be specifically for that buffer,
  182. these are not used.  Instead, for each buffer-local option there also is a
  183. global value, which is used for new buffers.  With ":set" both the local and
  184. global value is changed.  With "setlocal" only the local value is changed,
  185. thus this value is not used when editing a new buffer.

  186. When editing a buffer that has been edited before, the last used window
  187. options are used again.  If this buffer has been edited in this window, the
  188. values from back then are used.  Otherwise the values from the window where
  189. the buffer was edited last are used.

  190. It's possible to set a local window option specifically for a type of buffer.
  191. When you edit another buffer in the same window, you don't want to keep
  192. using these local window options.  Therefore Vim keeps a global value of the
  193. local window options, which is used when editing another buffer.  Each window
  194. has its own copy of these values.  Thus these are local to the window, but
  195. global to all buffers in the window.  With this you can do:
  196. :e one
  197. :set list
  198. :e two
  199. Now the 'list' option will also be set in "two", since with the ":set list"
  200. command you have also set the global value.
  201. :set nolist
  202. :e one
  203. :setlocal list
  204. :e two
  205. Now the 'list' option is not set, because ":set nolist" resets the global
  206. value, ":setlocal list" only changes the local value and ":e two" gets the
  207. global value.  Note that if you do this next:
  208. :e one
  209. You will not get back the 'list' value as it was the last time you edited
  210. "one".The options local to a window are not remembered for each buffer.

  211. *:setl* *:setlocal*
  212. :setl[ocal] ...Like ":set" but set only the value local to the
  213. current buffer or window.  Not all options have a
  214. local value.  If the option does not have a local
  215. value the global value is set.
  216. With the "all" argument: display all local option's
  217. local values.
  218. Without argument: Display all local option's local
  219. values which are different from the default.
  220. When displaying a specific local option, show the
  221. local value.  For a global option the global value is
  222. shown (but that might change in the future).
  223. {not in Vi}

  224. :setl[ocal] {option}<Set the local value of {option} to its global value.
  225. {not in Vi}

  226. *:setg* *:setglobal*
  227. :setg[lobal] ...Like ":set" but set only the global value for a local
  228. option without changing the local value.
  229. When displaying an option, the global value is shown.
  230. With the "all" argument: display all local option's
  231. global values.
  232. Without argument: display all local option's global
  233. values which are different from the default.
  234. {not in Vi}

  235. For buffer-local and window-local options:
  236. Command global value    local value
  237.       :set option=value     setset
  238. :setlocal option=value      -set
  239. :setglobal option=value     set -
  240.       :set option?      -       display
  241. :setlocal option?      -       display
  242. :setglobal option?    display -


  243. Global options with a local value*global-local*

  244. Options are global when you mostly use one value for all buffers.  For some
  245. global options it's useful to sometimes have a different local value.  You can
  246. set the local value with ":setlocal".  That buffer will then use the local
  247. value, while other buffers continue using the global value.

  248. For example, you have two windows, both on C source code.  They use the global
  249. 'makeprg' option.  If you do this in one of the two windows:
  250. :set makeprg=gmake
  251. then the other window will switch to the same value.  There is no need to set
  252. the 'makeprg' option in the other C source window too.
  253. However, if you start editing a Perl file in a new window, you want to use
  254. another 'makeprog' for it, without changing the value used for the C source
  255. files.You use this command:
  256. :setlocal makeprg=perlmake
  257. You can switch back to using the global value by making the local value empty:
  258. :setlocal makeprg=
  259. This only works for a string option.  For a boolean option you need to use the
  260. "<" flag, like this:
  261. :setlocal autoread<
  262. Note that for non-boolean options using "<" copies the global value to the
  263. local value, it doesn't switch back to using the global value (that matters
  264. when changing the global value later).
  265. Note: In the future more global options can be made global-local.  Using
  266. ":setlocal" on a global option might work differently then.


  267. Setting the filetype

  268. :setf[iletype] {filetype}*:setf* *:setfiletype*
  269. Set the 'filetype' option to {filetype}, but only if
  270. not done yet in a sequence of (nested) autocommands.
  271. This is short for:
  272. :if !did_filetype()
  273. :  setlocal filetype={filetype}
  274. :endif
  275. This command is used in a filetype.vim file to avoid
  276. setting the 'filetype' option twice, causing different
  277. settings and syntax files to be loaded.
  278. {not in Vi}

  279. :bro[wse] se[t]*:set-browse* *:browse-set* *:opt* *:options*
  280. :opt[ions]Open a window for viewing and setting all options.
  281. Options are grouped by function.
  282. Offers short help for each option.  Hit <CR> on the
  283. short help to open a help window with more help for
  284. the option.
  285. Modify the value of the option and hit <CR> on the
  286. "set" line to set the new value.  For window and
  287. buffer specific options, the last accessed window is
  288. used to set the option value in, unless this is a help
  289. window, in which case the window below help window is
  290. used (skipping the option-window).
  291. {not available when compiled without the |+eval| or
  292. |+autocmd| features}

  293. *$HOME*
  294. Using "~" is like using "$HOME", but it is only recognized at the start of an
  295. option and after a space or comma.

  296. On Unix systems "~user" can be used too.  It is replaced by the home directory
  297. of user "user".  Example:
  298.     :set path=~mool/include,/usr/include,.

  299. On Unix systems the form "${HOME}" can be used too.  The name between {} can
  300. contain non-id characters then.  Note that if you want to use this for the
  301. "gf" command, you need to add the '{' and '}' characters to 'isfname'.


  302. Note the maximum length of an expanded option is limited.  How much depends on
  303. the system, mostly it is something like 256 or 1024 characters.

  304. *:fix* *:fixdel*
  305. :fix[del]Set the value of 't_kD':
  306. 't_kb' is     't_kD' becomes
  307.   CTRL-?CTRL-H
  308. not CTRL-?CTRL-?

  309. (CTRL-? is 0177 octal, 0x7f hex) {not in Vi}

  310. If your delete key terminal code is wrong, but the
  311. code for backspace is alright, you can put this in
  312. your .vimrc:
  313. :fixdel
  314. This works no matter what the actual code for
  315. backspace is.

  316. If the backspace key terminal code is wrong you can
  317. use this:
  318. :if &term == "termname"
  319. :  set t_kb=^V<BS>
  320. :  fixdel
  321. :endif
  322. Where "^V" is CTRL-V and "<BS>" is the backspace key
  323. (don't type four characters!).Replace "termname"
  324. with your terminal name.

  325. If your <Delete> key sends a strange key sequence (not
  326. CTRL-? or CTRL-H) you cannot use ":fixdel".  Then use:
  327. :if &term == "termname"
  328. :  set t_kD=^V<Delete>
  329. :endif
  330. Where "^V" is CTRL-V and "<Delete>" is the delete key
  331. (don't type eight characters!).  Replace "termname"
  332. with your terminal name.

  333. *Linux-backspace*
  334. Note about Linux: By default the backspace key
  335. produces CTRL-?, which is wrong.  You can fix it by
  336. putting this line in your rc.local:
  337. echo "keycode 14 = BackSpace" | loadkeys

  338. *NetBSD-backspace*
  339. Note about NetBSD: If your backspace doesn't produce
  340. the right code, try this:
  341. xmodmap -e "keycode 22 = BackSpace"
  342. <If this works, add this in your .Xmodmap file:
  343. keysym 22 = BackSpace
  344. You need to restart for this to take effect.

  345. 2. Impostazione automatica delle opzioni*auto-setting*

  346. Oltre a modificare le opzioni con il comando ":set", ci sono tre alternative
  347. per impostarle automaticamente per uno o pi&#65533;files:

  348. 1. Quando Vim viene avviato le inizializzazioni vengono lette in diversi posti.
  349.    Vedere |initialization|.  Molte di queste vengono impiegate in tutte le
  350.    sessioni di lavoro, ed alcune di queste dipendono dalla directory da cui Vim
  351.    viene avviato.
  352.    Potete creare un file di inizializzazione con |:mkvimrc|, |:mkview| e
  353.    |:mksession|.
  354. 2. Se iniziate a lavorare con un file nuovo, vengono eseguiti i comandi
  355.    automatici.
  356.    Ci&#65533;pu&#65533;venire usato per impostare opzioni per dei files corrispondenti ad
  357.    un modello particolare e molte altre cose.  Vedere |autocommand|.
  358. 3. Se iniziate a lavorare con un file nuovo, e l'opzione 'modeline' &#65533;attiva,
  359.    un certo numero di linee all'inizio ed alla fine del file verranno
  360.    controllate per modelines.  Ci&#65533;viene spiegato qu&#65533;
  361. &#65533;
  362. &#65533;*modeline* *vim:* *vi:* *ex:* *E520*
  363. Ci sono due forme di modelines.  La prima:
  364. [text]{white}{vi:|vim:|ex:}[white]{options}

  365. [text]qualsiasi testo o nulla
  366. {white}al minimo uno spazio bianco (<Space> o <Tab>)
  367. {vi:|vim:|ex:}la stringa "vi:", "vim:" od "ex:"
  368. [white]spazio bianco facoltativo
  369. {options}un elenco per l'impostazione di opzioni, separate da uno spazio
  370. bianco o da un ':', dove ogni parte tra ':' &#65533;l'argomento di un
  371. comando ":set"

  372. Esempio:
  373.    vi:noai:sw=3 ts=6

  374. La seconda forma (compatibile con alcune versioni di Vi):

  375. [text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text]

  376. [text]qualsiasi testo o nulla
  377. {white}al minimo uno spazio bianco (<Space> o <Tab>)
  378. {vi:|vim:|ex:}la stringa "vi:", "vim:" od "ex:"
  379. [white]spazio bianco facoltativo
  380. se[t]la stringa "set " o "se " (notare lo spazio)
  381. {options}un elenco di opzioni, separate con spazi bianchi, che &#65533;l'argomento per un comando ":set"
  382. :un segno di due punti
  383. [text]qualsiasi testo o nulla

  384. Example:
  385.    /* vim: set ai tw=75: */

  386. Lo spazio bianco prima di {vi:|vim:|ex:} &#65533;necessario.  Ci&#65533;riduce al minimo la
  387. possibilit&#65533;che una parola normale come "lex:" crei impiccio.  C'&#65533;una sola
  388. eccezione: "vi:" e "vim:" possono trovarsi anche all'inizio della linea (per
  389. compatibilit&#65533;con la versione 3.0).  Usare "ex:" all'inizio della linea verr&#65533;ignorato (potrebbe essere l'abbreviazione di "example:").

  390. *modeline-local*
  391. Le opzioni vengono impostate con ":setlocal": Il nuovo valore verr&#65533;applicato
  392. soltanto al buffer che contiene la finestra.  Sebbene sia possibile impostare
  393. opzioni globali da un modeline, ci&#65533;&#65533;insolito.  Se aveste due finestre aperte
  394. ed i files entro di esse con la stessa opzione globale impostata a valori
  395. diversi, il risultato dipende da quale file sia stato aperto dopo.

  396. *modeline-version*
  397. Se la modeline fosse soltanto per venire usata da alcune versioni di Vim, il
  398. numero di versione pu&#65533;essere specificato dove "vim:" viene usato:
  399. vim{vers}:versione {vers} o successiva
  400. vim<{vers}:versione prima di {vers}
  401. vim={vers}:versione {vers}
  402. vim>{vers}:versione successiva a {vers}
  403. {vers} vale 600 per Vim 6.0 (cento volte il major number pi&#65533;il minor).
  404. Ad esempio, per usare una modeline soltanto per Vim 6.0 e successivi:
  405. /* vim600: set foldmethod=marker: */
  406. Per usare una modeline per Vim prima della versione 5.7:
  407. /* vim<570: set sw=4: */
  408. Non ci possono essere spazi bianchi tra "vim" ed il ":".


  409. Il numero di linee che viene verificato pu&#65533;venire impostato con l'opzione 'modelines'.
  410. Se 'modeline' fosse disattivato o 'modelines' avesse il valore di 0 nessuna
  411. linea verrebbe provata.

  412. Notare che per la prima forma viene usato il resto della linea, cos&#65533;una linea
  413. come:
  414.    /* vi:ts=4: */
  415. dar&#65533;un messaggio di errore a causa dei "*/" trascinati.  Questa linea va bene:
  416.    /* vi:set ts=4: */

  417. Se venisse trovato un errore il resto della linea verr&#65533;saltato.

  418. Se voleste includere un ':' entro un comando set fatelo precedere da una '\'.
  419. La barra inversa davanti a ':' verr&#65533;rimossa.Esempio:
  420.    /* vi:set dir=c\:\tmp: */
  421. Ci&#65533;imposta l'opzione 'dir' a "c:\tmp".  Soltanto un'unica barra inversa prima
  422. dei ':' viene rimossa.  Cos&#65533;per inserire una "\:" dovete specificare "\\:".

  423. Nessun comando oltre "set" &#65533;consentito, per ragioni di sicurezza (qualcuno
  424. potrebbe creare un file cavallo di Troia con modelines).

  425. Suggerimento: Se voleste fare qualcos'altro dall'impostare un'opzione, potreste
  426. definire un autocomando che cerchi entro il file una specifica stringa.  Ad
  427. esempio:
  428. au BufReadPost * if getline(1) =~ "VAR" | call SetVar() | endif
  429. E definire la funzione SetVar() che fa qualcosa con la linea che contiene "VAR".


  430. 3. Sommario delle opzioni              *option-summary*

  431. Nell'elenco seguente vengono citate tutte le opzioni con il loro nome intero e
  432. con l'abbreviazione se ne esiste una.  Si possono usare entrambe le forme.

  433. In questo documento quando un'opzione booleana risulta "set" ci&#65533;significa che
  434. &#65533;stato adoperato ":set option".  Quando un'opzione risulta "reset", &#65533;stato
  435. usato ":set nooption".

  436. Per alcune opzioni ci sono due valori di default: Il "Vim default", che viene
  437. usato quando 'compatible' non &#65533;impostato, ed il "Vi default", che si usa
  438. quando &#65533;impostato 'compatible'.

  439. Il maggior numero di opzioni &#65533;lo stesso entro tutte le finestre e buffers.  Ce
  440. ne sono poche specifiche per come il testo viene presentato entro una finestra.
  441. Queste possono venire impostate ad un valore diverso per ciascuna finestra.  Ad
  442. esempio l'opzione 'list' pu&#65533;venire impostata su di una finestra e non esserlo
  443. in un'altra per il medesimo testo, dando entrambi i punti di vista nello stesso
  444. tempo.  Ci sono poche opzioni specifiche per un certo file.  Queste possono
  445. avere valore diverso per ciascun file del buffer.  Ad esempio l'opzione
  446. 'textwidth' pu&#65533;essere 78 per un file di testo normale e 0 per un programma C.

  447. globalunica opzione per tutti i buffers e le finestre
  448. local to windowogni finestra ha la propria copia di questa
  449. opzione
  450. local to bufferogni buffer ha la propria copia di questa
  451. opzione

  452. Creando una nuova finestra i valori delle opzioni della finestra attualmente
  453. attiva vengono usate come valore di default nelle opzioni specifiche per la
  454. finestra.  Per le opzioni specifiche per il buffer ci&#65533;dipende dai flags 's' ed
  455. 'S' nell'opzione 'cpoptions'.  Se in 's' vengono inseriti (questo &#65533;il default)
  456. i valori per le opzioni del buffer, questi vengono copiati dal buffer
  457. attualmente attivo quando il buffer &#65533;stato il primo a venire attivato.Se 'S'
  458. &#65533;presente le opzioni vengono copiate ogni volta che il buffer venga attivato,
  459. ci&#65533;&#65533;almeno come sono impostate le opzioni globali.Se 's' ed 'S' non
  460. fossero presenti, le opzioni verrebbero copiate dal buffer correntemente attivo
  461. quando il buffer viene creato.

  462. Non tutte le opzioni vengono supportate i tutte le versioni.Per provare se
  463. l'opzione "foo" possa venire usata con ":set" usate "exists('&foo')".Ci&#65533;non
  464. significa che il suo valore sia in questo momento ricordato e funzioni.
  465. Alcune opzioni vengono nascoste, ci&#65533;significa che si possono impostare ma il
  466. loro valore non viene ricordato.  Per provare se l'opzione "foo" sia davvero
  467. supportata usate "exists('+foo')".

  468. *E355*
  469. Una tabella riassuntiva per le opzioni con una breve descrizione pu&#65533;venire
  470. trovata presso |Q_op|.

  471. *'aleph'* *'al'* *aleph* *Aleph*
  472. 'aleph' 'al'numero(default 128 per MS-DOS, 224 altrimenti)
  473. globale
  474. {non in Vi}
  475. {disponibile soltanto se compilata con la caratteristica |+rightleft|}

  476. Il codice ASCII per le prime lettere dell'alfabeto ebraico.  La routine
  477. che descrive la tastiera nel modo Ebraico, sia nell'Insert mode (quando
  478. hkmap &#65533;impostato) che nella linea di comando (battendo CTRL-_) emette
  479. i caratteri Ebraici nel campo [aleph..aleph+26].
  480. aleph=128 viene applicato al codice PC, ed aleph=224 si applica ad ISO 8859-8.
  481. Vedere |rileft|.

  482. *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'*
  483. 'allowrevins' 'ari'booleano(default off)
  484. globale
  485. {non in Vi}
  486. {disponibile soltanto se compilato con la caratteristica |+rightleft|}
  487. Permette CTRL-_ in entrambi i modi Insert e Command-line.  Questo di
  488. default viene escluso, per evitare che l'utente che per caso battesse
  489. CTRL-_ invece di SHIFT-_ vada nell'Insert mode rovesciato, e non sappia
  490. pi&#65533;come uscirne.  Vedere 'revins'.
  491. NOTE: Questa opzione viene annullata se si imposta 'compatible'.

  492. *'altkeymap'* *'akm'* *'noaltkeymap'* *'noakm'*
  493. 'altkeymap' 'akm'booleano (default off)
  494. globale
  495. {non in Vi}
  496. {disponibile soltanto se compilato con la caratteristica |+rightleft|}
  497. Ora, se la seconda lingua fosse il Farsi. Nell'editing mode CTRL-_ fa
  498. passare la tastiera da Farsi ad Inglese, se 'allowrevins' &#65533;impostato.

  499. Se no, la mappa di tastiera passa da Ebraico ad Inglese. Ci&#65533;&#65533;utile
  500. per far partire vim in modo nativo, ad esempio Inglese (modo da
  501. sinistra a destra) ed avere il secondo linguaggio di default Farsi od
  502. Ebraico (modo da sinistra a destra).
  503. Vedere |farsi|.

  504. *'ambiwidth'* *'ambw'*
  505. 'ambiwidth' 'ambw'stringa (default: "single")
  506. globale
  507. {non in Vi}
  508. {disponibile soltanto se compilato con la
  509. caratteristica |+multi_byte|}
  510. Funziona soltanto se 'encoding' &#65533;"utf-8" od un'altra codifica Unicode.
  511. Dice a Vim cosa fare con i caratteri aventi la East Asian Width Class
  512. Ambigui (come Euro, Registrato, Copyright, lettere Greche, caratteri
  513. Cirillici).

  514. Ora ci sono due valori possibili:
  515. "single":Usa la stessa larghezza dei caratteri come
  516. nell'US-ASCII. Ci&#65533;&#65533;quanto si aspetta la maggioranza
  517. degli utenti.
  518. "double":Usa il doppio della larghezza dei caratteri ASCII.

  519. Ci sono dei font CJK per cui la larghezza dei glifi per questi caratteri &#65533;basata
  520. soltanto su quanti ottetti richiedono nelle codifiche CJK legacy/traditional.  In
  521. queste codifiche i caratteri Euro, Registrato, le lettere Greche/Cirilliche sono
  522. rappresentate da due ottetti, perci&#65533;questi font hanno glifi "wide" per se'. Ci&#65533;&#65533;anche vero per alcuni caratteri che disegnano linee, usati per creare tabelle entro
  523. files di testo. Perci&#65533; quando un font CJK viene usato nella GUI di Vim o Vim gira
  524. entro un terminale (emulatori) che usi font CJK (o Vim giri entro un xterm chiamato
  525. con l'opzione"-cjkwidth".), questa opzione pu&#65533;venire impostata su "double" per fare
  526. corrispondere l'ampiezza percepita da Vim con quella dei glifi nel font.  Forse dovr&#65533;venire impostata a "double" sotto CJK Windows 9x/ME o Windows 2k/XP quando il locale
  527. di sistema sia impostato su uno dei locales di CJK.  Vedere Unicode Standard Annex #11
  528. ([url]http://www.unicode.org/reports/tr11[/url]).

  529. *'antialias'* *'anti'* *'noantialias'* *'noanti'*
  530. 'antialias' 'anti'booleano (default: off)
  531. globale
  532. {non in Vi}
  533. {disponibile soltanto se compilato con la GUI abilitata
  534. su Mac OS X}
  535. Soltanto questa opzione ha un effetto nella versione GUI di Vim su Mac OS X
  536.         v10.2 o successivo.  Se impostata, Vim user&#65533;font lisci ("antialiased"),
  537.         che possono essere pi&#65533;facili da leggere a certe dimensioni su certi
  538. monitor.
  539. Impostare questa opzione pu&#65533;talvolta causare problemi se |guifont|
  540. fosse impostato sul proprio default (stringa vuota).

  541. *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
  542. 'autochdir' 'acd'booleano (default off)
  543. globale
  544. {non in Vi}
  545. {disponibile soltanto se compilato con la
  546. caratteristica |+netbeans_intg| o |+sun_workshop|}
  547. Quando impostato, Vim cambia il proprio valore per la directory di
  548. lavoro attuale ogni qualvolta apriate un file, cambiate i buffer, distruggiate un
  549. buffer od aprite/chiudete una finestra. Passer&#65533;alla directory che
  550. contiene il file che ra stato aperto o selezionato.  Questa funzione
  551. viene fornita per compatibilit&#65533;all'indietro con il Vim rilasciato con
  552. l'Edizione Enterprise di Sun ONE Studio 4.

  553. *'arabic'* *'arab'* *'noarabic'* *'noarab'*
  554. 'arabic' 'arab'booleano (default off)
  555. locale per la finestra
  556. {non in Vi}
  557. {disponibile soltanto se compilato con la
  558. caratteristica |+arabic|}
  559. Questa opzione pu&#65533;venire impostata per scrivere testo in Arabo.
  560. Impostare questa opzione causer&#65533;
  561. &#65533;- L'impostazione dell'opzione 'rightleft' se non &#65533;impostato 'termbidi'.
  562. - L'impostazione dell'opzione 'arabicshape' se non &#65533;impostato 'termbidi'.
  563. - L'impostazione dell'opzione 'keymap' ad "arabic"; in Insert mode
  564.   CTRL-^ passa tra la scrittura in Inglese e la mappatura di tastiera
  565.   Araba.
  566. - L'impostazione dell'opzione 'delcombine'.
  567. Notare che 'encoding' deve essere "utf-8" per lavorare con il testo
  568. Arabo.

  569. Disabilitare questa opzione causer&#65533;
  570. &#65533;- Reset dell'opzione 'rightleft'.
  571. - Disabilitazione dell'uso di 'keymap' (senza cambiarne il valore).
  572. Notare che 'arabicshape' e 'delcombine' non vengono resettati (si
  573. tratta di un'opzione globale).
  574. Vedere anche |arabic|.

  575. *'arabicshape'* *'arshape'*
  576. *'noarabicshape'* *'noarshape'*
  577. 'arabicshape' 'arshape'booleano (default on)
  578. globale
  579. {non in Vi}
  580. {disponibile soltanto se compliato con la caratteristica |+arabic|}
  581. Se impostata e 'termbidi' disabilitata, le richieste correzioni visuali
  582. del carattere necessarie per fare posto alla visualizzazione della
  583. lingua Araba avranno effetto.  Shaping, sostanzialmente, diviene
  584. enabled; il termine &#65533;una cosa grossa che sta attorno:
  585.   a) il cambio o la trasformazione di caratteri basato sulla loro
  586. posizione entro una parola (iniziale, media, finale ed isolata).
  587.   b) l'abilitazione della capacit&#65533;di comporre caratteri
  588.   c) l'abilitazione della richiesta combinazione di alcuni caratteri.
  589. Se disabilitata l'aspetto del carattere ritorna alla forma di ciascun
  590. carattere isolato.
  591. L'Arabo &#65533;una lingua complessa che richiede altre impostazioni, per
  592. ulteriori dettagli vedere |arabic|.

  593. *'autoindent'* *'ai'* *'noautoindent'* *'noai'*
  594. 'autoindent' 'ai'booleano(default off)
  595. locale per il buffer
  596. Copia l'indentazione della linea corrente quando inizia una nuova linea
  597. (battendo <CR> nell'Insert mode o quando si usano i comandi "o" or
  598. "O").  Se non scrivete nulla sulla nuova linea, eccetto <BS> o CTRL-D e
  599. poi battete <Esc> o <CR>, l'indentazione verr&#65533;nuovamente cancellata.
  600. Quando l'autoindentazione &#65533;impostata, la formattazione (cone il
  601. comando "gq" o quando trovate 'textwidth' nell'Insert mode) usa
  602. l'indentazione della prima linea.
  603. Quando sono impostate 'smartindent' o 'cindent' l'indentazione viene
  604. cambiata in modo diverso.
  605. L'opzione 'autoindent' viene resettata quando l'opzione 'paste' &#65533;impostata.
  606. {piccola differenza con Vi: Dopo che sia stata cancellata l'indentatura
  607. quando battete <Esc> o <CR>, la posizione del cursore quando vi
  608. spostate verso l'alto o verso il basso &#65533;dopo l'indentatura cancellata;
  609. Vi pone il cursore da qualche parte nell'indentatura cancellata}.

  610. *'autoread'* *'ar'* *'noautoread'* *'noar'*
  611. 'autoread' 'ar'booleano(default off)
  612. globale o locale per il buffer |global-local|
  613. {non in Vi}
  614. Quando scopre che un file &#65533;stato modificato al di fuori di Vim e
  615. non entro Vim, lo rilegge automaticamente.
  616. Se il file fosse stato cancellato ci&#65533;non verrebbe fatto.  |timestamp|
  617. Se questa opzione ha un valore locale, usate questo comando per
  618. ritornare all'uso del valore globale:
  619. :set autoread<

  620. *'autowrite'* *'aw'* *'noautowrite'* *'noaw'*
  621. 'autowrite' 'aw'booleano(default off)
  622. globale
  623. Scrive i contenuti di un file, se &#65533;stato modificato, a ciascun comando
  624. :next, :rewind, :last, :first, :previous, :stop, :suspend, :tag, :!,
  625. :make, CTRL-] and CTRL-^; e quando un comando CTRL-O, CTRL-I,
  626. '{A-Z0-9}, o `{A-Z0-9} prende qualcosa da un altro file.
  627. Notare che per alcuni comandi l'opzione 'autowrite' non viene usata,
  628. guardate 'autowriteall' per questo.

  629. *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
  630. 'autowriteall' 'awa'booleano(default off)
  631. globale
  632. {non in Vi}
  633. Come 'autowrite', ma anche usato per i comandi ":edit", ":quit",
  634. ":qall", ":exit", ":xit", ":recover" e chiudere la finestra di Vim.
  635. Impostando questa opzione comporta anche che Vim si comporti come se
  636. 'autowrite' fosse stato impostato.

  637. *'background'* *'bg'*
  638. 'background' 'bg'stringa(default "dark" o "light")
  639. globale
  640. {non in Vi}
  641. Quando impostato a "dark", Vim prover&#65533;ad usare i colori che appaiono
  642. meglio su di uno sfondo scuro.  Quando impostato su "light", Vim
  643. tenter&#65533;di usare i colori che appaiono meglio su uno sfondo chiaro.
  644. Ogni altro valore non &#65533;consentito.
  645. Vim prova ad impostare il valore di default a seconda del terminale
  646. usato.
  647. Ci&#65533;non va sempre nel modo giusto.
  648. Impostare questa opzione non cambia il colore di sfondo, dice a Vim a
  649. cosa assomiglia il colore di sfondo.  Per cambiare il colore di sfondo,
  650. vedere |:hi-normal|.

  651. Quando 'background' &#65533;impostato Vim adatter&#65533;il gruppo di colori di
  652. default per il nuovo valore.Ma i colori usati per l'evidenziazione
  653. della sintassi non cambieranno.
  654. Quando viene caricato uno schema di colori (viene impostata la
  655. variabile "colors_name") impostare 'background' causer&#65533;che venga
  656. ricaricato lo schema dei colori.  Se lo schema di colore viene posto al
  657. valore di 'background' ci&#65533;funzioner&#65533;
  658. &#65533;Comunque, se lo schema di colore imposta lo stesso 'background'
  659. l'effetto pu&#65533;venire cancellato.  Prima cancellate la variabile
  660. "colors_name" quando fosse necessario.

  661. Impostando 'background' al valore di default con:
  662. :set background&
  663. Vim osserver&#65533;questo valore.  Nella GUI ci&#65533;dovrebbe funzionare bene,
  664. in altri casi Vim potrebbe non riuscire a vedere il valore giusto.

  665. Avviando la GUI, il valore di default per 'background' sar&#65533;"light".
  666. Quando il valore non &#65533;impostato in .gvimrc, e Vim scopre che lo sfondo
  667. &#65533;proprio scuro, 'background' viene impostato a "dark".  Ma ci&#65533;succede
  668. soltanto DOPO che sia stato letto il file .gvimrc (perch&#65533;la finestra
  669. deve venire aperta per scoprire il colore attuale dello sfondo).  Per
  670. superare ci&#65533; forzate la finestra ad essere aperta mettendo il comando ":gui"
  671. nel file .gvimrc, prima che venga usato il valore di 'background' (ad
  672. esempio, prima di ":syntax on").
  673. Normalmente questa opzione potrebbe essere impostata nel file .vimrc.
  674. Possibilmente in relazione con il nome del terminale.  Esempio:
  675. :if &term == "pcterm"
  676. :  set background=dark
  677. :endif
  678. Quando questa opzione &#65533;impostata, le impostazioni di default per i
  679. gruppi di evidenziazione cambieranno.  Per usare altre impostazioni,
  680. mettete i comandi ":highlight" DOPO avere impostato l'opzione 'background'.
  681. Questa opzione viene anche usata nel file "$VIMRUNTIME/syntax/syntax.vim"
  682. per selezionare i colori per l'evidenziazione della sintassi.  Dopo
  683. avere cambiato questa opzione, dovete ancora caricare syntax.vim per
  684. vedere il risultato.  Ci&#65533;pu&#65533;essere fatto con ":syntax on".

  685. *'backspace'* *'bs'*
  686. 'backspace' 'bs'stringa(default "")
  687. globale
  688. {non in Vi}
  689. Influenza il funzionamento di <BS>, <Del>, CTRL-W e CTRL-U nell'Insert
  690. mode.  E' un elenco di elementi separatida virgole.  Ogni elemento
  691. consente un modo per cancellare qualcosa:
  692. valoreeffetto
  693. indentconsente di effetture uno backspace sull'autoindentazione
  694. eolconsente di effetture uno backspace sulle interruzioni di linea
  695. (unisce le linee)
  696. startconsente di effetture uno backspace sulla partenza di insert; CTRL-W and CTRL-U
  697. si ferma una volta partito l'insert.

  698. Quando il valore &#65533;vuoto, viene usato il backspacing compatibile con Vi.

  699. Per compatibilit&#65533;all'indietro con la versione 5.4 e quelle pi&#65533;vecchie:
  700. valoreeffetto
  701.   0come uno ":set backspace=" (Vi compatible)
  702.   1come uno ":set backspace=indent,eol"
  703.   2come uno ":set backspace=indent,eol,start"

  704. Vedere |:fixdel| se i vostri tasti <BS> o <Del> non facessero quello
  705. che volete.
  706. NOTE: Questa opzione &#65533;impostata a "" quando &#65533;impostato 'compatible'.

  707. *'backup'* *'bk'* *'nobackup'* *'nobk'*
  708. 'backup' 'bk'boolean(default off)
  709. global
  710. {not in Vi}
  711. Make a backup before overwriting a file.  Leave it around after the
  712. file has been successfully written.  If you do not want to keep the
  713. backup file, but you do want a backup while the file is being
  714. written, reset this option and set the 'writebackup' option (this is
  715. the default).  If you do not want a backup file at all reset both
  716. options (use this if your file system is almost full).See the
  717. |backup-table| for more explanations.
  718. When the 'backupskip' pattern matches, a backup is not made anyway.
  719. When 'patchmode' is set, the backup may be renamed to become the
  720. oldest version of a file.
  721. NOTE: This option is reset when 'compatible' is set.

  722. *'backupcopy'* *'bkc'*
  723. 'backupcopy' 'bkc'string(Vi default for Unix: "yes", otherwise: "auto")
  724. global
  725. {not in Vi}
  726. When writing a file and a backup is made, this option tells how it's
  727. done.  This is a comma separated list of words.

  728. The main values are:
  729. "yes"make a copy of the file and overwrite the original one
  730. "no"rename the file and write a new one
  731. "auto"one of the previous, what works best

  732. Extra values that can be combined with the ones above are:
  733. "breaksymlink"always break symlinks when writing
  734. "breakhardlink"always break hardlinks when writing

  735. Making a copy and overwriting the original file:
  736. - Takes extra time to copy the file.
  737. + When the file has special attributes, is a (hard/symbolic) link or
  738.   has a resource fork, all this is preserved.
  739. - When the file is a link the backup will have the name of the link,
  740.   not of the real file.

  741. Renaming the file and writing a new one:
  742. + It's fast.
  743. - Sometimes not all attributes of the file can be copied to the new
  744.   file.
  745. - When the file is a link the new file will not be a link.

  746. The "auto" value is the middle way: When Vim sees that renaming file
  747. is possible without side effects (the attributes can be passed on and
  748. and the file is not a link) that is used.  When problems are expected,
  749. a copy will be made.

  750. The "breaksymlink" and "breakhardlink" values can be used in
  751. combination with any of "yes", "no" and "auto".  When included, they
  752. force Vim to always break either symbolic or hard links by doing
  753. exactly what the "no" option does, renaming the original file to
  754. become the backup and writing a new file in its place.  This can be
  755. useful for example in source trees where all the files are symbolic or
  756. hard links and any changes should stay in the local source tree, not
  757. be propagated back to the original source.
  758. *crontab*
  759. One situation where "no" and "auto" will cause problems: A program
  760. that opens a file, invokes Vim to edit that file, and then tests if
  761. the open file was changed (through the file descriptor) will check the
  762. backup file instead of the newly created file."crontab -e" is an
  763. example.

  764. When a copy is made, the original file is truncated and then filled
  765. with the new text.  This means that protection bits, owner and
  766. symbolic links of the original file are unmodified.  The backup file
  767. however, is a new file, owned by the user who edited the file.The
  768. group of the backup is set to the group of the original file.  If this
  769. fails, the protection bits for the group are made the same as for
  770. others.

  771. When the file is renamed this is the other way around: The backup has
  772. the same attributes of the original file, and the newly written file
  773. is owned by the current user.  When the file was a (hard/symbolic)
  774. link, the new file will not!  That's why the "auto" value doesn't
  775. rename when the file is a link.  The owner and group of the newly
  776. written file will be set to the same ones as the original file, but
  777. the system may refuse to do this.  In that case the "auto" value will
  778. again not rename the file.

  779. *'backupdir'* *'bdir'*
  780. 'backupdir' 'bdir'string(default for Amiga: ".,t:",
  781. for MS-DOS and Win32: ".,c:/tmp,c:/temp"
  782. for Unix: ".,~/tmp,~/")
  783. global
  784. {not in Vi}
  785. List of directories for the backup file, separated with commas.
  786. - The backup file will be created in the first directory in the list
  787.   where this is possible.
  788. - Empty means that no backup file will be created ('patchmode' is
  789.   impossible!).  Writing may fail because of this.
  790. - A directory "." means to put the backup file in the same directory
  791.   as the edited file.
  792. - A directory starting with "./" (or "." for MS-DOS et.al.) means to
  793.   put the backup file relative to where the edited file is.  The
  794.   leading "." is replaced with the path name of the edited file.
  795.   ("." inside a directory name has no special meaning).
  796. - Spaces after the comma are ignored, other spaces are considered part
  797.   of the directory name.  To have a space at the start of a directory
  798.   name, precede it with a backslash.
  799. - To include a comma in a directory name precede it with a backslash.
  800. - A directory name may end in an '/'.
  801. - Environment variables are expanded |:set_env|.
  802. - Careful with '\' characters, type one before a space, type two to
  803.   get one in the option (see |option-backslash|), for example:
  804.     :set bdir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
  805. - For backwards compatibility with Vim version 3.0 a '>' at the start
  806.   of the option is removed.
  807. See also 'backup' and 'writebackup' options.
  808. If you want to hide your backup files on Unix, consider this value:
  809. :set backupdir=./.backup,~/.backup,.,/tmp
  810. You must create a ".backup" directory in each directory and in your
  811. home directory for this to work properly.
  812. The use of |:set+=| and |:set-=| is preferred when adding or removing
  813. directories from the list.  This avoids problems when a future version
  814. uses another default.
  815. This option cannot be set from a |modeline|, for security reasons.

  816. *'backupext'* *'bex'* *E589*
  817. 'backupext' 'bex'string(default "~", for VMS: "_")
  818. global
  819. {not in Vi}
  820. String which is appended to a file name to make the name of the
  821. backup file.  The default is quite unusual, because this avoids
  822. accidentally overwriting existing files with a backup file.  You might
  823. prefer using ".bak", but make sure that you don't have files with
  824. ".bak" that you want to keep.

  825. *'backupskip'* *'bsk'*
  826. 'backupskip' 'bsk'string(default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
  827. global
  828. {not in Vi}
  829. {not available when compiled without the |+wildignore|
  830. feature}
  831. A list of file patterns.  When one of the patterns matches with the
  832. name of the file which is written, no backup file is created.  Both
  833. the specified file name and the full path name of the file are used.
  834. The pattern is used like with |:autocmd|, see |autocmd-patterns|.
  835. Watch out for special characters, see |option-backslash|.
  836. When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the
  837. default value. "/tmp/*" is only used for Unix.

  838. *'balloondelay'* *'bdlay'*
  839. 'balloondelay' 'bdlay'number(default: 600)
  840. global
  841. {not in Vi}
  842. {only available when compiled with the |+balloon_eval|
  843. feature}
  844. Delay in milliseconds before a balloon may pop up.  See |balloon-eval|.

  845.        *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
  846. 'ballooneval' 'beval'boolean(default off)
  847. global
  848. {not in Vi}
  849. {only available when compiled with the |+balloon_eval|
  850. and |+sun_workshop| or |+netbeans_intg| features}
  851. Switch on the |balloon-eval| functionality.

  852.      *'binary'* *'bin'* *'nobinary'* *'nobin'*
  853. 'binary' 'bin'boolean(default off)
  854. local to buffer
  855. {not in Vi}
  856. This option should be set before editing a binary file.  You can also
  857. use the |-b| Vim argument.  When this option is switched on a few
  858. options will be changed (also when it already was on):
  859. 'textwidth'  will be set to 0
  860. 'wrapmargin' will be set to 0
  861. 'modeline'   will be off
  862. 'expandtab'  will be off
  863. Also, 'fileformat' and 'fileformats' options will not be used, the
  864. file is read and written like 'fileformat' was "unix" (a single <NL>
  865. separates lines).
  866. The 'fileencoding' and 'fileencodings' options will not be used, the
  867. file is read without conversion.
  868. NOTE: When you start editing a(nother) file while the 'bin' option is
  869. on, settings from autocommands may change the settings again (e.g.,
  870. 'textwidth'), causing trouble when editing.  You might want to set
  871. 'bin' again when the file has been loaded.
  872. The previous values of these options are remembered and restored when
  873. 'bin' is switched from on to off.  Each buffer has its own set of
  874. saved option values.
  875. When writing a file the <EOL> for the last line is only written if
  876. there was one in the original file (normally Vim appends an <EOL> to
  877. the last line if there is none; this would make the file longer).  See
  878. the 'endofline' option.

  879. *'bioskey'* *'biosk'* *'nobioskey'* *'nobiosk'*
  880. 'bioskey' 'biosk'boolean(default on)
  881. global
  882. {not in Vi}  {only for MS-DOS}
  883. When on the bios is called to obtain a keyboard character.  This works
  884. better to detect CTRL-C, but only works for the console.  When using a
  885. terminal over a serial port reset this option.
  886. Also see |'conskey'|.

  887. *'bomb'* *'nobomb'*
  888. 'bomb'boolean(default off)
  889. local to buffer
  890. {not in Vi}
  891. {only available when compiled with the |+multi_byte|
  892. feature}
  893. When writing a file and the following conditions are met, a BOM (Byte
  894. Order Mark) is prepended to the file:
  895. - this option is on
  896. - the 'binary' option is off
  897. - 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big
  898.   endian variants.
  899. Some applications use the BOM to recognize the encoding of the file.
  900. Often used for UCS-2 files on MS-Windows.  For other applications it
  901. causes trouble, for example: "cat file1 file2" makes the BOM of file2
  902. appear halfway the file.
  903. When Vim reads a file and 'fileencodings' starts with "ucs-bom", a
  904. check for the presence of the BOM is done and 'bomb' set accordingly.
  905. Unless 'binary' is set, it is removed from the first line, so that you
  906. don't see it when editing.  When you don't change the options, the BOM
  907. will be restored when writing the file.

  908. *'breakat'* *'brk'*
  909. 'breakat' 'brk'string(default " ^I!@*-+;:,./?")
  910. global
  911. {not in Vi}
  912. {not available when compiled without the  |+linebreak|
  913. feature}
  914. This option lets you choose which characters might cause a line
  915. break if 'linebreak' is on.

  916. *'browsedir'* *'bsdir'*
  917. 'browsedir' 'bsdir'string(default for "last")
  918. global
  919. {not in Vi} {only for Motif and Win32 GUI}
  920. Which directory to use for the file browser:
  921.    lastUse same directory as with last file browser.
  922.    bufferUse the directory of the related buffer.
  923.    currentUse the current directory.
  924.    {path}Use the specified directory

  925. *'bufhidden'* *'bh'*
  926. 'bufhidden' 'bh'string (default: "")
  927. local to buffer
  928. {not in Vi}
  929. {not available when compiled without the |+quickfix|
  930. feature}
  931. This option specifies what happens when a buffer is no longer
  932. displayed in a window:
  933.   <empty>follow the global 'hidden' option
  934.   hidehide the buffer (don't unload it), also when 'hidden'
  935. is not set
  936.   unloadunload the buffer, also when 'hidden' is set or using
  937. |:hide|
  938.   deletedelete the buffer from the buffer list, also when
  939. 'hidden' is set or using |:hide|, like using
  940. |:bdelete|
  941.   wipewipe out the buffer from the buffer list, also when
  942. 'hidden' is set or using |:hide|, like using
  943. |:bwipeout|

  944. This option is used together with 'buftype' and 'swapfile' to specify
  945. special kinds of buffers.   See |special-buffers|.

  946. *'buflisted'* *'bl'* *E85*
  947. 'buflisted' 'bl'boolean (default: on)
  948. local to buffer
  949. {not in Vi}
  950. When this option is set, the buffer shows up in the buffer list.  If
  951. it is reset it is not used for ":bnext", "ls", the Buffers menu, etc.
  952. This option is reset by Vim for buffers that are only used to remember
  953. a file name or marks.  Vim sets it when starting to edit a buffer.
  954. But not when moving to a buffer with ":buffer".

  955. *'buftype'* *'bt'* *E382*
  956. 'buftype' 'bt'string (default: "")
  957. local to buffer
  958. {not in Vi}
  959. {not available when compiled without the |+quickfix|
  960. feature}
  961. The value of this option specifies the type of a buffer:
  962.   <empty>normal buffer
  963.   nofilebuffer which is not related to a file and will not be
  964. written
  965.   nowritebuffer which will not be written
  966.   quickfixquickfix buffer, contains list of errors |:cwindow|
  967.   helphelp buffer (you are not supposed to set this
  968. manually)

  969. This option is used together with 'bufhidden' and 'swapfile' to
  970. specify special kinds of buffers.   See |special-buffers|.

  971. Be careful with changing this option, it can have many side effects!

  972. A "quickfix" buffer is only used for the error list.  This value is
  973. set by the |:cwindow| command and you are not supposed to change it.

  974. "nofile" and "nowrite" buffers are similar:
  975. both:The buffer is not to be written to disk, ":w" doesn't
  976. work (":w filename" does work though).
  977. both:The buffer is never considered to be |'modified'|.
  978. There is no warning when the changes will be lost, for
  979. example when you quit Vim.
  980. both:A swap file is only created when using too much memory
  981. (when 'swapfile' has been reset there is never a swap
  982. file).
  983. nofile only:The buffer name is fixed, it is not handled like a
  984. file name.  It is not modified in response to a |:cd|
  985. command.

  986. *'casemap'* *'cmp'*
  987. 'casemap' 'cmp'string(default: "internal,keepascii")
  988. global
  989. {not in Vi}
  990. Specifies details about changing the case of letters.  It may contain
  991. these words, separated by a comma:
  992. internalUse internal case mapping functions, the current
  993. locale does not change the case mapping.  This only
  994. matters when 'encoding' is a Unicode encoding.When
  995. "internal" is omitted, the towupper() and towlower()
  996. system library functions are used when available.
  997. keepasciiFor the ASCII characters (0x00 to 0x7f) use the US
  998. case mapping, the current locale is not effective.
  999. This probably only matters for Turkish.

  1000. *'cdpath'* *'cd'* *E344* *E346*
  1001. 'cdpath' 'cd'string(default: equivalent to $CDPATH or ",,")
  1002. global
  1003. {not in Vi}
  1004. {not available when compiled without the
  1005. |+file_in_path| feature}
  1006. This is a list of directories which will be searched when using the
  1007. |:cd| and |:lcd| commands, provided that the directory being searched
  1008. for has a relative path (not starting with "/", "./" or "../").
  1009. The 'cdpath' option's value has the same form and semantics as
  1010. |'path'|.  Also see |file-searching|.
  1011. The default value is taken from $CDPATH, with a "," prepended to look
  1012. in the current directory first.
  1013. If the default value taken from $CDPATH is not what you want, include
  1014. a modified version of the following command in your vimrc file to
  1015. override it:
  1016.   :let &cdpath = ',' . substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
  1017. This option cannot be set from a |modeline|, for security reasons
  1018. (parts of 'cdpath' can be passed to the shell to expand file names).

  1019. *'cedit'*
  1020. 'cedit'string(Vi default: "", Vim default: CTRL-F)
  1021. global
  1022. {not in Vi}
  1023. {not available when compiled without the |+vertsplit|
  1024. feature}
  1025. The key used in Command-line Mode to open the command-line window.
  1026. The default is CTRL-F when 'compatible' is off.
  1027. Only non-printable keys are allowed.
  1028. The key can be specified as a single character, but it is difficult to
  1029. type.  The preferred way is to use the <> notation.  Examples:
  1030. :set cedit=<C-Y>
  1031. :set cedit=<Esc>
  1032. |Nvi| also has this option, but it only uses the first character.
  1033. See |cmdwin|.

  1034. *'charconvert'* *'ccv'* *E202* *E214* *E513*
  1035. 'charconvert' 'ccv'string (default "")
  1036. global
  1037. {only available when compiled with the |+multi_byte|
  1038. feature and the |+eval| feature}
  1039. {not in Vi}
  1040. An expression that is used for character encoding conversion.  It is
  1041. evaluated when a file that is to be read or has been written has a
  1042. different encoding from what is desired.
  1043. 'charconvert' is not used when the internal iconv() function is
  1044. supported and is able to do the conversion.  Using iconv() is
  1045. preferred, because it is much faster.
  1046. 'charconvert' is not used when reading stdin |--|, because there is no
  1047. file to convert from.  You will have to save the text in a file first.
  1048. The expression must return zero or an empty string for success,
  1049. non-zero for failure.
  1050. The possible encoding names encountered are in 'encoding'.
  1051. Additionally, names given in 'fileencodings' and 'fileencoding' are
  1052. used.
  1053. Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8"
  1054. is done internally by Vim, 'charconvert' is not used for this.
  1055. 'charconvert' is also used to convert the viminfo file, if the 'c'
  1056. flag is present in 'viminfo'.  Also used for Unicode conversion.
  1057. Example:
  1058. set charconvert=CharConvert()
  1059. fun CharConvert()
  1060.   system("recode "
  1061. \ . v:charconvert_from . ".." . v:charconvert_to
  1062. \ . " <" . v:fname_in . " >" v:fname_out)
  1063.   return v:shell_error
  1064. endfun
  1065. The related Vim variables are:
  1066. v:charconvert_fromname of the current encoding
  1067. v:charconvert_toname of the desired encoding
  1068. v:fname_inname of the input file
  1069. v:fname_outname of the output file
  1070. Note that v:fname_in and v:fname_out will never be the same.
  1071. Note that v:charconvert_from and v:charconvert_to may be different
  1072. from 'encoding'.  Vim internally uses UTF-8 instead of UCS-2 or UCS-4.
  1073. Encryption is not done by Vim when using 'charconvert'.  If you want
  1074. to encrypt the file after conversion, 'charconvert' should take care
  1075. of this.
  1076. This option cannot be set from a |modeline|, for security reasons.

  1077.    *'cindent'* *'cin'* *'nocindent'* *'nocin'*
  1078. 'cindent' 'cin'boolean(default off)
  1079. local to buffer
  1080. {not in Vi}
  1081. {not available when compiled without the |+cindent|
  1082. feature}
  1083. Enables automatic C program indenting  See 'cinkeys' to set the keys
  1084. that trigger reindenting in insert mode and 'cinoptions' to set your
  1085. preferred indent style.
  1086. If 'indentexpr' is not empty, it overrules 'cindent'.
  1087. If 'lisp' is not on and both 'indentexpr' and 'equalprg' are empty,
  1088. the "=" operator indents using this algorithm rather than calling an
  1089. external program.
  1090. See |C-indenting|.
  1091. When you don't like the way 'cindent' works, try the 'smartindent'
  1092. option or 'indentexpr'.
  1093. This option is not used when 'paste' is set.
  1094. NOTE: This option is reset when 'compatible' is set.

  1095. *'cinkeys'* *'cink'*
  1096. 'cinkeys' 'cink'string(default "0{,0},0),:,0#,!^F,o,O,e")
  1097. local to buffer
  1098. {not in Vi}
  1099. {not available when compiled without the |+cindent|
  1100. feature}
  1101. A list of keys that, when typed in Insert mode, cause reindenting of
  1102. the current line.  Only used if 'cindent' is on and 'indentexpr' is
  1103. empty.
  1104. For the format of this option see |cinkeys-format|.
  1105. See |C-indenting|.

  1106. *'cinoptions'* *'cino'*
  1107. 'cinoptions' 'cino'string(default "")
  1108. local to buffer
  1109. {not in Vi}
  1110. {not available when compiled without the |+cindent|
  1111. feature}
  1112. The 'cinoptions' affect the way 'cindent' reindents lines in a C
  1113. program.  See |cinoptions-values| for the values of this option, and
  1114. |C-indenting| for info on C indenting in general.


  1115. *'cinwords'* *'cinw'*
  1116. 'cinwords' 'cinw'string(default "if,else,while,do,for,switch")
  1117. local to buffer
  1118. {not in Vi}
  1119. {not available when compiled without both the
  1120. |+cindent| and the |+smartindent| features}
  1121. These keywords start an extra indent in the next line when
  1122. 'smartindent' or 'cindent' is set.  For 'cindent' this is only done at
  1123. an appropriate place (inside {}).
  1124. Note that 'ignorecase' isn't used for 'cinwords'.  If case doesn't
  1125. matter, include the keyword both the uppercase and lowercase:
  1126. "if,If,IF".

  1127. *'clipboard'* *'cb'*
  1128. 'clipboard' 'cb'string(default "autoselect,exclude:cons\|linux"
  1129.   for X-windows, "" otherwise)
  1130. global
  1131. {not in Vi}
  1132. {only in GUI versions or when the |+xterm_clipboard|
  1133. feature is included}
  1134. This option is a list of comma separated names.
  1135. These names are recognized:

  1136. unnamedWhen included, Vim will use the clipboard register '*'
  1137. for all yank, delete, change and put operations which
  1138. would normally go to the unnamed register.  When a
  1139. register is explicitly specified, it will always be
  1140. used regardless of whether "unnamed" is in 'clipboard'
  1141. or not.  The clipboard register can always be
  1142. explicitly accessed using the "* notation.  Also see
  1143. |gui-clipboard|.

  1144. autoselectWorks like the 'a' flag in 'guioptions': If present,
  1145. then whenever Visual mode is started, or the Visual
  1146. area extended, Vim tries to become the owner of the
  1147. windowing system's global selection or put the
  1148. selected text on the clipboard used by the selection
  1149. register "*.  See |guioptions_a| and |quotestar| for
  1150. details.  When the GUI is active, the 'a' flag in
  1151. 'guioptions' is used, when the GUI is not active, this
  1152. "autoselect" flag is used.
  1153. Also applies to the modeless selection.

  1154. autoselectmlLike "autoselect", but for the modeless selection
  1155. only.  Compare to the 'A' flag in 'guioptions'.

  1156. exclude:{pattern}
  1157. Defines a pattern that is matched against the name of
  1158. the terminal 'term'.  If there is a match, no
  1159. connection will be made to the X server.  This is
  1160. useful in this situation:
  1161. - Running Vim in a console.
  1162. - $DISPLAY is set to start applications on another
  1163.   display.
  1164. - You do not want to connect to the X server in the
  1165.   console, but do want this in a terminal emulator.
  1166. To never connect to the X server use:
  1167. exclude:.*
  1168. This has the same effect as using the |-X| argument.
  1169. Note that when there is no connection to the X server
  1170. the window title won't be restored and the clipboard
  1171. cannot be accessed.
  1172. The value of 'magic' is ignored, {pattern} is
  1173. interpreted as if 'magic' was on.
  1174. The rest of the option value will be used for
  1175. {pattern}, this must be the last entry.
  1176. *'cmdheight'* *'ch'*
  1177. 'cmdheight' 'ch'number(default 1)
  1178. global
  1179. {not in Vi}
  1180. Number of screen lines to use for the command-line.  Helps avoiding
  1181. |hit-enter| prompts.

  1182. *'cmdwinheight'* *'cwh'*
  1183. 'cmdwinheight' 'cwh'number(default 7)
  1184. global
  1185. {not in Vi}
  1186. {not available when compiled without the |+vertsplit|
  1187. feature}
  1188. Number of screen lines to use for the command-line window. |cmdwin|

  1189. *'columns'* *'co'* *E594*
  1190. 'columns' 'co'number(default 80 or terminal width)
  1191. global
  1192. {not in Vi}
  1193. Number of columns of the screen.  Normally this is set by the terminal
  1194. initialization and does not have to be set by hand.
  1195. When Vim is running in the GUI or in a resizable window, setting this
  1196. option will cause the window size to be changed.  When you only want
  1197. to use the size for the GUI, put the command in your |gvimrc| file.
  1198. When you set this option and Vim is unable to change the physical
  1199. number of columns of the display, the display may be messed up.

  1200. *'comments'* *'com'* *E524* *E525*
  1201. 'comments' 'com'string(default
  1202. "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
  1203. local to buffer
  1204. {not in Vi}
  1205. {not available when compiled without the |+comments|
  1206. feature}
  1207. A comma separated list of strings that can start a comment line.  See
  1208. |format-comments|.  See |option-backslash| about using backslashes to
  1209. insert a space.

  1210. *'commentstring'* *'cms'* *E537*
  1211. 'commentstring' 'cms'string(default "/*%s*/")
  1212. local to buffer
  1213. {not in Vi}
  1214. {not available when compiled without the |+folding|
  1215. feature}
  1216. A template for a comment.  The "%s" in the value is replaced with the
  1217. comment text.  Currently only used to add markers for folding, see
  1218. |fold-marker|.

  1219. *'compatible'* *'cp'* *'nocompatible'* *'nocp'*
  1220. 'compatible' 'cp'boolean(default on, off when a .vimrc file is found)
  1221. global
  1222. {not in Vi}
  1223. This option has the effect of making Vim either more Vi-compatible, or
  1224. make Vim behave in a more useful way.
  1225. This is a special kind of option, because when it's set or reset,
  1226. other options are also changed as a side effect.  CAREFUL: Setting or
  1227. resetting this option can have a lot of unexpected effects: Mappings
  1228. are interpreted in another way, undo behaves differently, etc.If you
  1229. set this option in your vimrc file, you should probably put it at the
  1230. very start.
  1231. By default this option is on and the Vi defaults are used for the
  1232. options.  This default was chosen for those people who want to use Vim
  1233. just like Vi, and don't even (want to) know about the 'compatible'
  1234. option.
  1235. When a ".vimrc" file is found while Vim is starting up, this option is
  1236. switched off, and all options that have not been modified will be set
  1237. to the Vim defaults.  Effectively, this means that when a ".vimrc"
  1238. file exists, Vim will use the Vim defaults, otherwise it will use the
  1239. Vi defaults.  (Note: This doesn't happen for the system-wide vimrc
  1240. file).Also see |compatible-default|.
  1241. You can also set this option with the "-C" argument, and reset it with
  1242. "-N".  See |-C| and |-N|.
  1243. Switching this option off makes the Vim defaults be used for options
  1244. that have a different Vi and Vim default value.  See the options
  1245. marked with a '+' below.  Other options are not modified.
  1246. At the moment this option is set, several other options will be set
  1247. or reset to make Vim as Vi-compatible as possible.  See the table
  1248. below.This can be used if you want to revert to Vi compatible
  1249. editing.
  1250. See also 'cpoptions'.

  1251. option+ set valueeffect

  1252. 'allowrevins'  offno CTRL-_ command
  1253. 'backupcopy'  Unix: "yes"  backup file is a copy
  1254.   others: "auto"  copy or rename backup file
  1255. 'backspace'  ""normal backspace
  1256. 'backup'  offno backup file
  1257. 'cindent'  offno C code indentation
  1258. 'cedit'+ ""no key to open the |cmdwin|
  1259. 'cpoptions'+ (all flags)Vi-compatible flags
  1260. 'cscopetag'  offdon't use cscope for ":tag"
  1261. 'cscopetagorder'  0see |cscopetagorder|
  1262. 'cscopeverbose'  offsee |cscopeverbose|
  1263. 'digraph'  offno digraphs
  1264. 'esckeys'+ offno <Esc>-keys in Insert mode
  1265. 'expandtab'  offtabs not expanded to spaces
  1266. 'fileformats'+ ""no automatic file format detection,
  1267.   "dos,unix"except for DOS, Windows and OS/2
  1268. 'formatoptions'+ "vt"Vi compatible formatting
  1269. 'gdefault'  offno default 'g' flag for ":s"
  1270. 'history'+ 0no commandline history
  1271. 'hkmap'  offno Hebrew keyboard mapping
  1272. 'hkmapp'  offno phonetic Hebrew keyboard mapping
  1273. 'hlsearch'  offno highlighting of search matches
  1274. 'incsearch'  offno incremental searching
  1275. 'indentexpr'  ""no indenting by expression
  1276. 'insertmode'  offdo not start in Insert mode
  1277. 'iskeyword'+ "@,48-57,_"keywords contain alphanumeric
  1278. characters and '_'
  1279. 'joinspaces'  oninsert 2 spaces after period
  1280. 'modeline'+ offno modelines
  1281. 'more'+ offno pauses in listings
  1282. 'revins'  offno reverse insert
  1283. 'ruler'  offno ruler
  1284. 'scrolljump'  1no jump scroll
  1285. 'scrolloff'  0no scroll offset
  1286. 'shiftround'  offindent not rounded to shiftwidth
  1287. 'shortmess'+ ""no shortening of messages
  1288. 'showcmd'+ offcommand characters not shown
  1289. 'showmode'+ offcurrent mode not shown
  1290. 'smartcase'  offno automatic ignore case switch
  1291. 'smartindent'  offno smart indentation
  1292. 'smarttab'  offno smart tab size
  1293. 'softtabstop'  0tabs are always 'tabstop' positions
  1294. 'startofline'  ongoto startofline with some commands
  1295. 'tagrelative'+ offtag file names are not relative
  1296. 'textauto'+ offno automatic textmode detection
  1297. 'textwidth'  0no automatic line wrap
  1298. 'tildeop'  offtilde is not an operator
  1299. 'ttimeout'  offno terminal timeout
  1300. 'whichwrap'+ ""left-right movements don't wrap
  1301. 'wildchar'+ CTRL-Eonly when the current value is <Tab>
  1302. use CTRL-E for cmdline completion
  1303. 'writebackup'  on or offdepends on +writebackup feature

  1304. *'complete'* *'cpt'* *E535*
  1305. 'complete' 'cpt'string(default: ".,w,b,u,t,i")
  1306. local to buffer
  1307. {not in Vi}
  1308. This option specifies how keyword completion |ins-completion| works
  1309. when CTRL-P or CTRL-N are used.  It is also used for whole-line
  1310. completion |i_CTRL-X_CTRL-L|.  It indicates the type of completion
  1311. and the places to scan.  It is a comma separated list of flags:
  1312. .scan the current buffer ('wrapscan' is ignored)
  1313. wscan buffers from other windows
  1314. bscan other loaded buffers that are in the buffer list
  1315. uscan the unloaded buffers that are in the buffer list
  1316. Uscan the buffers that are not in the buffer list
  1317. kscan the files given with the 'dictionary' option
  1318. k{dict}scan the file {dict}.  Several "k" flags can be given,
  1319. patterns are valid too.  For example:
  1320. :set cpt=k/usr/dict/*,k~/spanish
  1321. sscan the files given with the 'thesaurus' option
  1322. s{tsr}scan the file {tsr}.  Several "s" flags can be given, patterns
  1323. are valid too.
  1324. iscan current and included files
  1325. dscan current and included files for defined name or macro
  1326. |i_CTRL-X_CTRL-D|
  1327. ]tag completion
  1328. tsame as "]"

  1329. Unloaded buffers are not loaded, thus their autocmds |:autocmd| are
  1330. not executed, this may lead to unexpected completions from some files
  1331. (gzipped files for example).  Unloaded buffers are not scanned for
  1332. whole-line completion.

  1333. The default is ".,w,b,u,t,i", which means to scan:
  1334.    1. the current buffer
  1335.    2. buffers in other windows
  1336.    3. other loaded buffers
  1337.    4. unloaded buffers
  1338.    5. tags
  1339.    6. included files

  1340. As you can see, CTRL-N and CTRL-P can be used to do any 'iskeyword'-
  1341. based expansion (eg dictionary |i_CTRL-X_CTRL-K|, included patterns
  1342. |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions)

  1343. *'confirm'* *'cf'* *'noconfirm'* *'nocf'*
  1344. 'confirm' 'cf'boolean (default off)
  1345. global
  1346. {not in Vi}
  1347. When 'confirm' is on, certain operations that would normally
  1348. fail because of unsaved changes to a buffer, e.g. ":q" and ":e",
  1349. instead raise a |dialog| asking if you wish to save the current
  1350. file(s).  You can still use a ! to unconditionally |abandon| a buffer.
  1351. If 'confirm' is off you can still activate confirmation for one
  1352. command only (this is most useful in mappings) with the |:confirm|
  1353. command.
  1354. Also see the |confirm()| function and the 'v' flag in 'guioptions'.

  1355. *'conskey'* *'consk'* *'noconskey'* *'noconsk'*
  1356. 'conskey' 'consk'boolean(default off)
  1357. global
  1358. {not in Vi}  {only for MS-DOS}
  1359. When on direct console I/O is used to obtain a keyboard character.
  1360. This should work in most cases.  Also see |'bioskey'|.Together,
  1361. three methods of console input are available:
  1362. 'conskey'   'bioskey'    action
  1363.    on     on or off    direct console input
  1364.    offon    BIOS
  1365.    offoff    STDIN
复制代码
 楼主| 发表于 2004-8-14 00:32:27 | 显示全部楼层

  1. *'copyindent'* *'ci'* *'nocopyindent'* *'noci'*
  2. 'copyindent' 'ci'boolean(default off)
  3. local to buffer
  4. {not in Vi}
  5. Copy the structure of the existing lines indent when autoindenting a
  6. new line.  Normally the new indent is reconstructed by a series of
  7. tabs followed by spaces as required (unless |'expandtab'| is enabled,
  8. in which case only spaces are used).  Enabling this option makes the
  9. new line copy whatever characters were used for indenting on the
  10. existing line.  If the new indent is greater than on the existing
  11. line, the remaining space is filled in the normal manner.
  12. NOTE: 'copyindent' is reset when 'compatible' is set.
  13. Also see 'preserveindent'.

  14. *'cpoptions'* *'cpo'*
  15. 'cpoptions' 'cpo'string(Vim default: "aABceFs",
  16. Vi default:  all flags)
  17. global
  18. {not in Vi}
  19. A sequence of single character flags.  When a character is present
  20. this indicates vi-compatible behavior.This is used for things where
  21. not being vi-compatible is mostly or sometimes preferred.
  22. 'cpoptions' stands for "compatible-options".
  23. Commas can be added for readability.
  24. To avoid problems with flags that are added in the future, use the
  25. "+=" and "-=" feature of ":set" |add-option-flags|.
  26. NOTE: This option is set to the Vi default value when 'compatible' is
  27. set and to the Vim default value when 'compatible' is reset.

  28.     containsbehavior
  29. *cpo-a*
  30. aWhen included, a ":read" command with a file name
  31. argument will set the alternate file name for the
  32. current window.
  33. *cpo-A*
  34. AWhen included, a ":write" command with a file name
  35. argument will set the alternate file name for the
  36. current window.
  37. *cpo-b*
  38. b"\|" in a ":map" command is recognized as the end of
  39. the map command.  The '\' is included in the mapping,
  40. the text after the '|' is interpreted as the next
  41. command.  Use a CTRL-V instead of a backslash to
  42. include the '|' in the mapping.  Applies to all
  43. mapping, abbreviation, menu and autocmd commands.
  44. See also |map_bar|.
  45. *cpo-B*
  46. BA backslash has no special meaning in mappings,
  47. abbreviations and the "to" part of the menu commands.
  48. Remove this flag to be able to use a backslash like a
  49. CTRL-V.  For example, the command ":map X \<Esc>"
  50. results in X being mapped to:
  51. 'B' included:"\^[" (^[ is a real <Esc>)
  52. 'B' excluded:"<Esc>"  (5 characters)
  53. ('<' excluded in both cases)
  54. *cpo-c*
  55. cSearching continues at the end of any match at the
  56. cursor position.  When not present searching continues
  57. one character from the cursor position.  With 'c'
  58. "abababababab" only gets three matches when repeating
  59. "/abab", without 'c' there are five matches.
  60. *cpo-C*
  61. CDo not concatenate sourced lines that start with a
  62. backslash.  See |line-continuation|.
  63. *cpo-d*
  64. dUsing "./" in the 'tags' option doesn't mean to use
  65. the tags file relative to the current file, but the
  66. tags file in the current directory.
  67. *cpo-D*
  68. DCan't use CTRL-K to enter a digraph after Normal mode
  69. commands with a character argument, like |r|, |f| and
  70. |t|.
  71. *cpo-e*
  72. eWhen executing a register with ":@r", always add a
  73. <CR> to the last line, also when the register is not
  74. linewise.  If this flag is not present, the register
  75. is not linewise and the last line does not end in a
  76. <CR>, then the last line is put on the command-line
  77. and can be edited before hitting <CR>.
  78. *cpo-E*
  79. EIt is an error when using "y", "d", "c", "g~", "gu" or
  80. "gU" on an Empty region.  The operators only work when
  81. at least one character is to be operate on.  Example:
  82. This makes "y0" fail in the first column.
  83. *cpo-f*
  84. fWhen included, a ":read" command with a file name
  85. argument will set the file name for the current buffer,
  86. if the current buffer doesn't have a file name yet.
  87. *cpo-F*
  88. FWhen included, a ":write" command with a file name
  89. argument will set the file name for the current
  90. buffer, if the current buffer doesn't have a file name
  91. yet.
  92. *cpo-g*
  93. gGoto line 1 when using ":edit" without argument.
  94. *cpo-i*
  95. iWhen included, interrupting the reading of a file will
  96. leave it modified.
  97. *cpo-j*
  98. jWhen joining lines, only add two spaces after a '.',
  99. not after '!' or '?'.  Also see 'joinspaces'.
  100. *cpo-J*
  101. JA |sentence| has to be followed by two spaces after
  102. the '.', '!' or '?'. A <Tab> is not recognized as
  103. white space.
  104. *cpo-k*
  105. kDisable the recognition of raw key codes in
  106. mappings, abbreviations, and the "to" part of menu
  107. commands.  For example, if <Key> sends ^[OA (where ^[
  108. is <Esc>), the command ":map X ^[OA" results in X
  109. being mapped to:
  110. 'k' included:"^[OA" (3 characters)
  111. 'k' excluded:"<Key>"  (one key code)
  112. Also see the '<' flag below.
  113. *cpo-K*
  114. KDon't wait for a key code to complete when it is
  115. halfway a mapping.  This breaks mapping <F1><F1> when
  116. only part of the second <F1> has been read.  It
  117. enables cancelling the mapping by typing <F1><Esc>.
  118. *cpo-l*
  119. lBackslash in a [] range in a search pattern is taken
  120. literally, only "\]" is special  See |/[]|
  121.    'l' included: "/[ \t]"  finds <Space>, '\' and 't'
  122.    'l' excluded: "/[ \t]"  finds <Space> and <Tab>
  123. *cpo-L*
  124. LWhen the 'list' option is set, 'wrapmargin',
  125. 'textwidth' and Virtual Replace mode (see |gR|) count
  126. a <Tab> as two characters, instead of the normal
  127. behavior of a <Tab>.
  128. *cpo-m*
  129. mWhen included, a showmatch will always wait half a
  130. second.  When not included, a showmatch will wait half
  131. a second or until a character is typed.  |'showmatch'|
  132. *cpo-M*
  133. MWhen excluded, "%" matching will take backslashes into
  134. account.  Thus in "( \( )" and "\( ( \)" the outer
  135. parenthesis match.  When included "%" ignores
  136. backslashes, which is Vi compatible.
  137. *cpo-n*
  138. nWhen included, the column used for 'number' will also
  139. be used for text of wrapped lines.
  140. *cpo-o*
  141. oLine offset to search command is not remembered for
  142. next search.
  143. *cpo-O*
  144. ODon't complain if a file is being overwritten, even
  145. when it didn't exist when editing it.  This is a
  146. protection against a file unexpectedly created by
  147. someone else.  Vi didn't complain about this.
  148. *cpo-p*
  149. pVi compatible Lisp indenting.  When not present, a
  150. slightly better algorithm is used.
  151. *cpo-r*
  152. rRedo ("." command) uses "/" to repeat a search
  153. command, instead of the actually used search string.
  154. *cpo-s*
  155. sSet buffer options when entering the buffer for the
  156. first time.  This is like it is in Vim version 3.0.
  157. And it is the default.If not present the options are
  158. set when the buffer is created.
  159. *cpo-S*
  160. SSet buffer options always when entering a buffer
  161. (except 'readonly', 'fileformat', 'filetype' and
  162. 'syntax').  This is the (most) Vi compatible setting.
  163. The options are set to the values in the current
  164. buffer.  When you change an option and go to another
  165. buffer, the value is copied.  Effectively makes the
  166. buffer options global to all buffers.

  167. 's'    'S'     copy buffer options
  168. no     no      when buffer created
  169. yes    no      when buffer first entered (default)
  170. X     yes     each time when buffer entered (vi comp.)
  171. *cpo-t*
  172. tSearch pattern for the tag command is remembered for
  173. "n" command.  Otherwise Vim only puts the pattern in
  174. the history for search pattern, but doesn't change the
  175. last used search pattern.
  176. *cpo-u*
  177. uUndo is Vi compatible.See |undo-two-ways|.
  178. *cpo-v*
  179. vBackspaced characters remain visible on the screen in
  180. Insert mode.  Without this flag the characters are
  181. erased from the screen right away.  With this flag the
  182. screen newly typed text overwrites backspaced
  183. characters.
  184. *cpo-w*
  185. wWhen using "cw" on a blank character, only change one
  186. character and not all blanks until the start of the
  187. next word.
  188. *cpo-W*
  189. WDon't overwrite a readonly file.  When omitted, ":w!"
  190. overwrites a readonly file, if possible.
  191. *cpo-x*
  192. x<Esc> on the command-line executes the command-line.
  193. The default in Vim is to abandon the command-line,
  194. because <Esc> normally aborts a command.  |c_<Esc>|
  195. *cpo-y*
  196. yA yank command can be redone with ".".
  197. *cpo-!*
  198. !When redoing a filter command, use the last used
  199. external command, whatever it was.  Otherwise the last
  200. used -filter- command is used.
  201. *cpo-$*
  202. $When making a change to one line, don't redisplay the
  203. line, but put a '$' at the end of the changed text.
  204. The changed text will be overwritten when you type the
  205. new text.  The line is redisplayed if you type any
  206. command that moves the cursor from the insertion
  207. point.
  208. *cpo-%*
  209. %Vi-compatible matching is done for the "%" command.
  210. Does not recognize "#if", "#endif", etc.
  211. Does not recognize "/*" and "*/".
  212. Parens inside single and double quotes are also
  213. counted, causing a string that contains a paren to
  214. disturb the matching.  For example, in a line like
  215. "if (strcmp("foo(", s))" the first paren does not
  216. match the last one.  When this flag is not included,
  217. parens inside single and double quotes are treated
  218. specially.  When matching a paren outside of quotes,
  219. everything inside quotes is ignored.  When matching a
  220. paren inside quotes, it will find the matching one (if
  221. there is one).This works very well for C programs.
  222. *cpo-star*
  223. *Use ":*" in the same way as ":@".  When not included,
  224. ":*" is an alias for ":'<,'>", select the Visual area.
  225. *cpo-<*
  226. <Disable the recognition of special key codes in |<>|
  227. form in mappings, abbreviations, and the "to" part of
  228. menu commands.For example, the command
  229. ":map X <Tab>" results in X being mapped to:
  230. '<' included:"<Tab>"  (5 characters)
  231. '<' excluded:"^I" (^I is a real <Tab>)
  232. Also see the 'k' flag above.

  233. *'cscopepathcomp'* *'cspc'*
  234. 'cscopepathcomp' 'cspc'number(default 0)
  235. global
  236. {not available when compiled without the |+cscope|
  237. feature}
  238. {not in Vi}
  239. Determines how many components of the path to show in a list of tags.
  240. See |cscopepathcomp|.

  241. *'cscopeprg'* *'csprg'*
  242. 'cscopeprg' 'csprg'string(default "cscope")
  243. global
  244. {not available when compiled without the |+cscope|
  245. feature}
  246. {not in Vi}
  247. Specifies the command to execute cscope.  See |cscopeprg|.
  248. This option cannot be set from a |modeline|, for security reasons.

  249. *'cscopequickfix'* *'csqf'*
  250. 'cscopequickfix' 'csqf' string(default "")
  251. global
  252. {not available when compiled without the |+cscope|
  253. or |+quickfix| features}
  254. {not in Vi}
  255. Specifies whether to use quickfix window to show cscope results.
  256. See |cscopequickfix|.

  257. *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
  258. 'cscopetag' 'cst'boolean (default off)
  259. global
  260. {not available when compiled without the |+cscope|
  261. feature}
  262. {not in Vi}
  263. Use cscope for tag commands.  See |cscope-options|.
  264. NOTE: This option is reset when 'compatible' is set.

  265. *'cscopetagorder'* *'csto'*
  266. 'cscopetagorder' 'csto'number(default 0)
  267. global
  268. {not available when compiled without the |+cscope|
  269. feature}
  270. {not in Vi}
  271. Determines the order in which ":cstag" performs a search.  See
  272. |cscopetagorder|.
  273. NOTE: This option is set to 0 when 'compatible' is set.

  274. *'cscopeverbose'* *'csverb'*
  275. *'nocscopeverbose'* *'nocsverb'*
  276. 'cscopeverbose' 'csverb' boolean (default off)
  277. global
  278. {not available when compiled without the |+cscope|
  279. feature}
  280. {not in Vi}
  281. Give messages when adding a cscope database.  See |cscopeverbose|.
  282. NOTE: This option is reset when 'compatible' is set.

  283. *'debug'*
  284. 'debug'string(default "")
  285. global
  286. {not in Vi}
  287. When set to "msg", error messages that would otherwise be omitted will
  288. be given anyway.  This is useful when debugging 'foldexpr' or
  289. 'indentexpr'.

  290. *'define'* *'def'*
  291. 'define' 'def'string(default "^\s*#\s*define")
  292. global or local to buffer |global-local|
  293. {not in Vi}
  294. Pattern to be used to find a macro definition.It is a search
  295. pattern, just like for the "/" command.  This option is used for the
  296. commands like "[i" and "[d" |include-search|.  The 'isident' option is
  297. used to recognize the defined name after the match:
  298. {match with 'define'}{non-ID chars}{defined name}{non-ID char}
  299. See |option-backslash| about inserting backslashes to include a space
  300. or backslash.
  301. The default value is for C programs.  For C++ this value would be
  302. useful, to include const type declarations:
  303. ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
  304. When using the ":set" command, you need to double the backslashes!

  305. *'delcombine'* *'deco'*
  306. 'delcombine' 'deco'boolean (default off)
  307. global
  308. {not in Vi}
  309. {only available when compiled with the |+multi_byte|
  310. feature}
  311. If editing Unicode and this option is set, backspace and Normal mode
  312. "x" delete each combining character on its own.  When it is off (the
  313. default) the character along with its combining characters are
  314. deleted.
  315. Note: When 'delcombine' is set "xx" may work different from "2x"!

  316. This is useful for Arabic, Hebrew and many other languages where one
  317. may have combining characters overtop of base characters, and want
  318. to remove only the combining ones.

  319. *'dictionary'* *'dict'*
  320. 'dictionary' 'dict'string(default "")
  321. global or local to buffer |global-local|
  322. {not in Vi}
  323. List of file names, separated by commas, that are used to lookup words
  324. for keyword completion commands |i_CTRL-X_CTRL-K|.  Each file should
  325. contain a list of words.  This can be one word per line, or several
  326. words per line, separated by non-keyword characters (white space is
  327. preferred).  Maximum line length is 510 bytes.
  328. To include a comma in a file name precede it with a backslash.Spaces
  329. after a comma are ignored, otherwise spaces are included in the file
  330. name.  See |option-backslash| about using backslashes.
  331. Where to find a list of words?
  332. - On FreeBSD, there is the file "/usr/share/dict/words".
  333. - In the Simtel archive, look in the "msdos/linguist" directory.
  334. - In "miscfiles" of the GNU collection.
  335. The use of |:set+=| and |:set-=| is preferred when adding or removing
  336. directories from the list.  This avoids problems when a future version
  337. uses another default.
  338. Backticks cannot be used in this option for security reasons.

  339. *'diff'* *'nodiff'*
  340. 'diff'boolean(default off)
  341. local to window
  342. {not in Vi}
  343. {not available when compiled without the |+diff|
  344. feature}
  345. Join the current window in the group of windows that shows differences
  346. between files.See |vimdiff|.

  347. *'dex'* *'diffexpr'*
  348. 'diffexpr' 'dex'string(default "")
  349. global
  350. {not in Vi}
  351. {not available when compiled without the |+diff|
  352. feature}
  353. Expression which is evaluated to obtain an ed-style diff file from two
  354. versions of a file.  See |diff-diffexpr|.
  355. This option cannot be set from a |modeline|, for security reasons.

  356. *'dip'* *'diffopt'*
  357. 'diffopt' 'dip'string(default "filler")
  358. global
  359. {not in Vi}
  360. {not available when compiled without the |+diff|
  361. feature}
  362. Option settings for diff mode.It can consist of the following items.
  363. All are optional.  Items must be separated by a comma.

  364. fillerShow filler lines, to keep the text
  365. synchronized with a window that has inserted
  366. lines at the same position.  Mostly useful
  367. when windows are side-by-side and 'scrollbind'
  368. is set.

  369. context:{n}Use a context of {n} lines between a change
  370. and a fold that contains unchanged lines.
  371. When omitted a context of six lines is used.
  372. See |fold-diff|.

  373. icaseIgnore changes in case of text.  "a" and "A"
  374. are considered the same.  Adds the "-i" flag
  375. to the "diff" command if 'diffexpr' is empty.

  376. iwhiteIgnore changes in amount of white space.  Adds
  377. the "-b" flag to the "diff" command if
  378. 'diffexpr' is empty.  Check the documentation
  379. of the "diff" command for what this does
  380. exactly.  It should ignore adding trailing
  381. white space, but not leading white space.

  382. Examples:

  383. :set diffopt=filler,context:4
  384. :set diffopt=
  385. :set diffopt=filler

  386.      *'digraph'* *'dg'* *'nodigraph'* *'nodg'*
  387. 'digraph' 'dg'boolean(default off)
  388. global
  389. {not in Vi}
  390. {not available when compiled without the |+digraphs|
  391. feature}
  392. Enable the entering of digraphs in Insert mode with {char1} <BS>
  393. {char2}.  See |digraphs|.
  394. NOTE: This option is reset when 'compatible' is set.

  395. *'directory'* *'dir'*
  396. 'directory' 'dir'string(default for Amiga: ".,t:",
  397. for MS-DOS and Win32: ".,c:\tmp,c:\temp"
  398. for Unix: ".,~/tmp,/var/tmp,/tmp")
  399. global
  400. List of directory names for the swap file, separated with commas.
  401. - The swap file will be created in the first directory where this is
  402.   possible.
  403. - Empty means that no swap file will be used (recovery is
  404.   impossible!).
  405. - A directory "." means to put the swap file in the same directory as
  406.   the edited file.  On Unix, a dot is prepended to the file name, so
  407.   it doesn't show in a directory listing.
  408. - A directory starting with "./" (or "." for MS-DOS et.al.) means to
  409.   put the swap file relative to where the edited file is.  The leading
  410.   "." is replaced with the path name of the edited file.
  411. - For Unix and Win32, if a directory ends in two path separators, the
  412.   swap file name will be built from the complete path to the file
  413.   with all path separators substituted to percent '%' signs. This will
  414.   ensure file name uniqueness in the preserve directory.
  415. - Spaces after the comma are ignored, other spaces are considered part
  416.   of the directory name.  To have a space at the start of a directory
  417.   name, precede it with a backslash.
  418. - To include a comma in a directory name precede it with a backslash.
  419. - A directory name may end in an ':' or '/'.
  420. - Environment variables are expanded |:set_env|.
  421. - Careful with '\' characters, type one before a space, type two to
  422.   get one in the option (see |option-backslash|), for example:
  423.     :set dir=c:\\tmp,\ dir\\,with\\,commas,\\\ dir\ with\ spaces
  424. - For backwards compatibility with Vim version 3.0 a '>' at the start
  425.   of the option is removed.
  426. Using "." first in the list is recommended.  This means that editing
  427. the same file twice will result in a warning.  Using "/tmp" on Unix is
  428. discouraged: When the system crashes you lose the swap file.
  429. "/var/tmp" is often not cleared when rebooting, thus is a better
  430. choice than "/tmp".  But it can contain a lot of files, your swap
  431. files get lost in the crowd.  That is why a "tmp" directory in your
  432. home directory is tried first.
  433. The use of |:set+=| and |:set-=| is preferred when adding or removing
  434. directories from the list.  This avoids problems when a future version
  435. uses another default.
  436. This option cannot be set from a |modeline|, for security reasons.
  437. {Vi: directory to put temp file in, defaults to "/tmp"}

  438. *'display'* *'dy'*
  439. 'display' 'dy'string(default "")
  440. global
  441. {not in Vi}
  442. Change the way text is displayed.  This is comma separated list of
  443. flags:
  444. lastlineWhen included, as much as possible of the last line
  445. in a window will be displayed.When not included, a
  446. last line that doesn't fit is replaced with "@" lines.
  447. uhexShow unprintable characters hexadecimal as <xx>
  448. instead of using ^C and ~C.

  449. *'eadirection'* *'ead'*
  450. 'eadirection' 'ead'string(default "both")
  451. global
  452. {not in Vi}
  453. {not available when compiled without the +vertsplit
  454. feature}
  455. Tells when the 'equalalways' option applies:
  456. ververtically, width of windows is not affected
  457. horhorizontally, height of windows is not affected
  458. bothwidth and height of windows is affected

  459.    *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
  460. 'edcompatible' 'ed'boolean(default off)
  461. global
  462. Makes the 'g' and 'c' flags of the ":substitute" command to be
  463. toggled each time the flag is given.  See |complex-change|.  See
  464. also 'gdefault' option.
  465. Switching this option on is discouraged!

  466. *'encoding'* *'enc'* *E543*
  467. 'encoding' 'enc'string (default: "latin1" or value from $LANG)
  468. global
  469. {only available when compiled with the |+multi_byte|
  470. feature}
  471. {not in Vi}
  472. Sets the character encoding used inside Vim.  It applies to text in
  473. the buffers, registers, Strings in expressions, text stored in the
  474. viminfo file, etc.  It sets the kind of characters which Vim can work
  475. with.  See |encoding-names| for the possible values.

  476. NOTE: Changing this option will not change the encoding of the
  477. existing text in Vim.  It may cause multi-byte text to become invalid.
  478. It should normally be kept at its default value, or set when Vim
  479. starts up.  See |multibyte|.

  480. NOTE: For GTK+ 2 it is highly recommended to set 'encoding' to
  481. "utf-8".  Although care has been taken to allow different values of
  482. 'encoding', "utf-8" is the natural choice for the environment and
  483. avoids unnecessary conversion overhead.  "utf-8" has not been made
  484. the default to prevent different behaviour of the GUI and terminal
  485. versions, and to avoid changing the encoding of newly created files
  486. without your knowledge (in case 'fileencodings' is empty).

  487. The character encoding of files can be different from 'encoding'.
  488. This is specified with 'fileencoding'.The conversion is done with
  489. iconv() or as specified with 'charconvert'.

  490. Normally 'encoding' will be equal to your current locale.  This will
  491. be the default if Vim recognizes your environment settings.  If
  492. 'encoding' is not set to the current locale, 'termencoding' must be
  493. set to convert typed and displayed text.  See |encoding-table|.

  494. When you set this option, it fires the |EncodingChanged| autocommand
  495. event so that you can set up fonts if necessary.

  496. When the option is set, the value is converted to lowercase.  Thus
  497. you can set it with uppercase values too.  Underscores are translated
  498. to '-' signs.
  499. When the encoding is recognized, it is changed to the standard name.
  500. For example "Latin-1" becomes "latin1", "ISO_88592" becomes
  501. "iso-8859-2" and "utf8" becomes "utf-8".

  502. Note: "latin1" is also used when the encoding could not be detected.
  503. This only works when editing files in the same encoding!  When the
  504. actual characterset is not latin1, make sure 'fileencoding' and
  505. 'fileencodings' are empty.  When conversion is needed, switch to using
  506. utf-8.

  507. When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8.
  508. You don't notice this while editing, but it does matter for the
  509. |viminfo-file|.  And Vim expects the terminal to use utf-8 too.  Thus
  510. setting 'encoding' to one of these values instead of utf-8 only has
  511. effect for encoding used for files when 'fileencoding' is empty.

  512. When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
  513. not set yet, the default for 'fileencodings' is changed.

  514. *'endofline'* *'eol'* *'noendofline'* *'noeol'*
  515. 'endofline' 'eol'boolean(default on)
  516. local to buffer
  517. {not in Vi}
  518. When writing a file and this option is off and the 'binary' option
  519. is on, no <EOL> will be written for the last line in the file.This
  520. option is automatically set when starting to edit a new file, unless
  521. the file does not have an <EOL> for the last line in the file, in
  522. which case it is reset.  Normally you don't have to set or reset this
  523. option.  When 'binary' is off the value is not used when writing the
  524. file.  When 'binary' is on it is used to remember the presence of a
  525. <EOL> for the last line in the file, so that when you write the file
  526. the situation from the original file can be kept.  But you can change
  527. it if you want to.

  528.      *'equalalways'* *'ea'* *'noequalalways'* *'noea'*
  529. 'equalalways' 'ea'boolean(default on)
  530. global
  531. {not in Vi}
  532. When on, all the windows are automatically made the same size after
  533. splitting or closing a window.When off, splitting a window will
  534. reduce the size of the current window and leave the other windows the
  535. same.  When closing a window the extra lines are given to the window
  536. next to it (depending on 'splitbelow' and 'splitright').
  537. When mixing vertically and horizontally split windows, a minimal size
  538. is computed and some windows may be larger if there is room.  The
  539. 'eadirection' option tells in which direction the size is affected.
  540. Changing the height of a window can be avoided by setting
  541. 'winfixheight'.

  542. *'equalprg'* *'ep'*
  543. 'equalprg' 'ep'string(default "")
  544. global or local to buffer |global-local|
  545. {not in Vi}
  546. External program to use for "=" command.  When this option is empty
  547. the internal formatting functions are used ('lisp', 'cindent' or
  548. 'indentexpr').
  549. Environment variables are expanded |:set_env|.See |option-backslash|
  550. about including spaces and backslashes.
  551. This option cannot be set from a |modeline|, for security reasons.

  552. *'errorbells'* *'eb'* *'noerrorbells'* *'noeb'*
  553. 'errorbells' 'eb'boolean(default off)
  554. global
  555. Ring the bell (beep or screen flash) for error messages.  This only
  556. makes a difference for error messages, the bell will be used always
  557. for a lot of errors without a message (e.g., hitting <Esc> in Normal
  558. mode).See 'visualbell' on how to make the bell behave like a beep,
  559. screen flash or do nothing.

  560. *'errorfile'* *'ef'*
  561. 'errorfile' 'ef'string(Amiga default: "AztecC.Err",
  562. others: "errors.err")
  563. global
  564. {not in Vi}
  565. {not available when compiled without the |+quickfix|
  566. feature}
  567. Name of the errorfile for the QuickFix mode (see |:cf|).
  568. When the "-q" command-line argument is used, 'errorfile' is set to the
  569. following argument.  See |-q|.
  570. NOT used for the ":make" command.  See 'makeef' for that.
  571. Environment variables are expanded |:set_env|.
  572. See |option-backslash| about including spaces and backslashes.
  573. This option cannot be set from a |modeline|, for security reasons.

  574. *'errorformat'* *'efm'*
  575. 'errorformat' 'efm'string(default is very long)
  576. global or local to buffer |global-local|
  577. {not in Vi}
  578. {not available when compiled without the |+quickfix|
  579. feature}
  580. Scanf-like description of the format for the lines in the error file
  581. (see |errorformat|).

  582.      *'esckeys'* *'ek'* *'noesckeys'* *'noek'*
  583. 'esckeys' 'ek'boolean(Vim default: on, Vi default: off)
  584. global
  585. {not in Vi}
  586. Function keys that start with an <Esc> are recognized in Insert
  587. mode.  When this option is off, the cursor and function keys cannot be
  588. used in Insert mode if they start with an <Esc>.  The advantage of
  589. this is that the single <Esc> is recognized immediately, instead of
  590. after one second.  Instead of resetting this option, you might want to
  591. try changing the values for 'timeoutlen' and 'ttimeoutlen'.  Note that
  592. when 'esckeys' is off, you can still map anything, but the cursor keys
  593. won't work by default.
  594. NOTE: This option is set to the Vi default value when 'compatible' is
  595. set and to the Vim default value when 'compatible' is reset.

  596. *'eventignore'* *'ei'*
  597. 'eventignore' 'ei'string(default "")
  598. global
  599. {not in Vi}
  600. {not available when compiled without the |+autocmd|
  601. feature}
  602. A list of autocommand event names, which are to be ignored.
  603. When set to "all", all autocommand events are ignored, autocommands
  604. will not be executed.
  605. Otherwise this is a comma separated list of event names.  Example:
  606.     :set ei=WinEnter,WinLeave

  607. *'expandtab'* *'et'* *'noexpandtab'* *'noet'*
  608. 'expandtab' 'et'boolean(default off)
  609. local to buffer
  610. {not in Vi}
  611. In Insert mode: Use the appropriate number of spaces to insert a
  612. <Tab>.Spaces are used in indents with the '>' and '<' commands and
  613. when 'autoindent' is on.  To insert a real tab when 'expandtab' is
  614. on, use CTRL-V<Tab>.  See also |:retab| and |ins-expandtab|.
  615. NOTE: This option is reset when 'compatible' is set.

  616. *'exrc'* *'ex'* *'noexrc'* *'noex'*
  617. 'exrc' 'ex'boolean (default off)
  618. global
  619. {not in Vi}
  620. Enables the reading of .vimrc, .exrc and .gvimrc in the current
  621. directory.  If you switch this option on you should also consider
  622. setting the 'secure' option (see |initialization|).  Using a local
  623. .exrc, .vimrc or .gvimrc is a potential security leak, use with care!
  624. also see |.vimrc| and |gui-init|.
  625. This option cannot be set from a |modeline|, for security reasons.

  626. *'fileencoding'* *'fenc'* *E213*
  627. 'fileencoding' 'fenc'string (default: "")
  628. local to buffer
  629. {only available when compiled with the |+multi_byte|
  630. feature}
  631. {not in Vi}
  632. Sets the character encoding for the file of this buffer.
  633. When 'fileencoding' is different from 'encoding', conversion will be
  634. done when reading and writing the file.
  635. When 'fileencoding' is empty, the same value as 'encoding' will be
  636. used (no conversion when reading or writing a file).
  637. WARNING: Conversion can cause loss of information!  When
  638. 'encoding' is "utf-8" conversion is most likely done in a way
  639. that the reverse conversion results in the same text.  When
  640. 'encoding' is not "utf-8" some characters may be lost!
  641. See 'encoding' for the possible values.  Additionally, values may be
  642. specified that can be handled by the converter, see
  643. |mbyte-conversion|.
  644. When reading a file 'fileencoding' will be set from 'fileencodings'.
  645. To read a file in a certain encoding it won't work by setting
  646. 'fileencoding', use the |++enc| argument.
  647. Prepending "8bit-" and "2byte-" has no meaning here, they are ignored.
  648. When the option is set, the value is converted to lowercase.  Thus
  649. you can set it with uppercase values too.  '_' characters are
  650. replaced with '-'.  If a name is recognized from the list for
  651. 'encoding', it is replaced by the standard name.  For example
  652. "ISO8859-2" becomes "iso-8859-2".
  653. When this option is set, after starting to edit a file, the 'modified'
  654. option is set, because the file would be different when written.
  655. If you do this in a modeline, you might want to set 'nomodified' to
  656. avoid this.
  657. This option can not be changed when 'modifiable' is off.

  658. *'fe'*
  659. NOTE: Before version 6.0 this option specified the encoding for the
  660. whole of Vim, this was a mistake.  Now use 'encoding' instead.The
  661. old short name was 'fe', which is no longer used.

  662. *'fileencodings'* *'fencs'*
  663. 'fileencodings' 'fencs'string (default: "ucs-bom", "ucs-bom,utf-8,latin1"
  664.     when 'encoding' is set to a Unicode value)
  665. global
  666. {only available when compiled with the |+multi_byte|
  667. feature}
  668. {not in Vi}
  669. This is a list of character encodings considered when starting to edit
  670. a file.  When a file is read, Vim tries to use the first mentioned
  671. character encoding.  If an error is detected, the next one in the list
  672. is tried.  When an encoding is found that works, 'fileencoding' is set
  673. to it.If all fail, 'fileencoding' is set to an empty string, which
  674. means the value of 'encoding' is used.
  675. WARNING: Conversion can cause loss of information!  When
  676. 'encoding' is "utf-8" (or one of the other Unicode variants)
  677. conversion is most likely done in a way that the reverse
  678. conversion results in the same text.  When 'encoding' is not
  679. "utf-8" special characters may be lost!
  680. For an empty file or a file with only ASCII characters most encodings
  681. will work and the first entry of 'fileencodings' will be used.If you
  682. prefer another encoding use an BufReadPost autocommand event to test
  683. if your preferred encoding is to be used.  Example:
  684. au BufReadPost * if search('\S', 'w') == 0 |
  685. \ set fenc=iso-2022-jp | endif
  686. This sets 'fileencoding' to "iso-2022-jp" if the file does not contain
  687. non-blank characters.
  688. The special value "ucs-bom" can be used to check for a Unicode BOM
  689. (Byte Order Mark) at the start of the file.  It must not be preceded
  690. by "utf-8" or another Unicode encoding for this to work properly.
  691. An entry for an 8-bit encoding (e.g., "latin1") should be the last,
  692. because Vim cannot detect an error, thus the encoding is always
  693. accepted.
  694. WRONG VALUES:WHAT'S WRONG:
  695. latin1,utf-8"latin1" will always be used
  696. utf-8,ucs-bom,latin1BOM won't be recognized in an utf-8
  697. file
  698. cp1250,latin1"cp1252" will always be used
  699. If 'fileencodings' is empty, 'fileencoding' is not modified.
  700. See 'fileencoding' for the possible values.
  701. Setting this option does not have an effect until the next time a file
  702. is read.



  703. *'fileformat'* *'ff'*
  704. 'fileformat' 'ff'string (MS-DOS, MS-Windows, OS/2 default: "dos",
  705. Unix default: "unix",
  706. Macintosh default: "mac")
  707. local to buffer
  708. {not in Vi}
  709. This gives the <EOL> of the current buffer, which is used for
  710. reading/writing the buffer from/to a file:
  711.     dos    <CR> <NL>
  712.     unix    <NL>
  713.     mac    <CR>
  714. When "dos" is used, CTRL-Z at the end of a file is ignored.
  715. See |file-formats| and |file-read|.
  716. For the character encoding of the file see 'fileencoding'.
  717. When 'binary' is set, the value of 'fileformat' is ignored, file I/O
  718. works like it was set to "unix'.
  719. This option is set automatically when starting to edit a file and
  720. 'fileformats' is not empty and 'binary' is off.
  721. When this option is set, after starting to edit a file, the 'modified'
  722. option is set, because the file would be different when written.
  723. This option can not be changed when 'modifiable' is off.
  724. For backwards compatibility: When this option is set to "dos",
  725. 'textmode' is set, otherwise 'textmode' is reset.

  726. *'fileformats'* *'ffs'*
  727. 'fileformats' 'ffs'string (default:
  728. Vim+ViMS-DOS, MS-Windows OS/2: "dos,unix",
  729. VimUnix: "unix,dos",
  730. VimMac: "mac,unix,dos",
  731. ViCygwin: "unix,dos",
  732. Viothers: "")
  733. global
  734. {not in Vi}
  735. This gives the end-of-line (<EOL>) formats that will be tried.It is
  736. used when starting to edit a new buffer and when reading a file into
  737. an existing buffer:
  738. - When empty, the format defined with 'fileformat' will be used
  739.   always.  It is not set automatically.
  740. - When set to one name, that format will be used whenever a new buffer
  741.   is opened.  'fileformat' is set accordingly for that buffer.The
  742.   'fileformats' name will be used when a file is read into an existing
  743.   buffer, no matter what 'fileformat' for that buffer is set to.
  744. - When more than one name is present, separated by commas, automatic
  745.   <EOL> detection will be done when reading a file.  When starting to
  746.   edit a file, a check is done for the <EOL>:
  747.   1. If all lines end in <CR><NL>, and 'fileformats' includes "dos",
  748.      'fileformat' is set to "dos".
  749.   2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
  750.      is set to "unix".Note that when a <NL> is found without a
  751.      preceding <CR>, "unix" is preferred over "dos".
  752.   3. If 'fileformats' includes "mac", 'fileformat' is set to "mac".
  753.      This means that "mac" is only chosen when "unix" is not present,
  754.      or when no <NL> is found in the file, and when "dos" is not
  755.      present, or no <CR><NL> is present in the file.
  756.      Also if "unix" was first chosen, but the first <CR> is before
  757.      the first <NL> and there appears to be more <CR>'s than <NL>'s in
  758.      the file, then 'fileformat' is set to "mac".
  759.   4. If 'fileformat' is still not set, the first name from
  760.      'fileformats' is used.
  761.   When reading a file into an existing buffer, the same is done, but
  762.   this happens like 'fileformat' has been set appropriately for that
  763.   file only, the option is not changed.
  764. When 'binary' is set, the value of 'fileformats' is not used.

  765. For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
  766. are ":source"ed and for vimrc files, automatic <EOL> detection may be
  767. done:
  768. - When 'fileformats' is empty, there is no automatic detection.  Dos
  769.   format will be used.
  770. - When 'fileformats' is set to one or more names, automatic detection
  771.   is done.  This is based on the first <NL> in the file: If there is a
  772.   <CR> in front of it, Dos format is used, otherwise Unix format is
  773.   used.
  774. Also see |file-formats|.
  775. For backwards compatibility: When this option is set to an empty
  776. string or one format (no comma is included), 'textauto' is reset,
  777. otherwise 'textauto' is set.
  778. NOTE: This option is set to the Vi default value when 'compatible' is
  779. set and to the Vim default value when 'compatible' is reset.

  780. *'filetype'* *'ft'*
  781. 'filetype' 'ft'string (default: "")
  782. local to buffer
  783. {not in Vi}
  784. {not available when compiled without the |+autocmd|
  785. feature}
  786. When this option is set, the FileType autocommand event is triggered.
  787. All autocommands that match with the value of this option will be
  788. executed.  Thus the value of 'filetype' is used in place of the file
  789. name.
  790. Otherwise this option does not always reflect the current file type.
  791. This option is normally set when the file type is detected.  To enable
  792. this use the ":filetype on" command. |:filetype|
  793. Setting this option to a different value is most useful in a modeline,
  794. for a file for which the file type is not automatically recognized.
  795. Example, for in an IDL file:
  796. /* vim: set filetype=idl : */
  797. |FileType| |filetypes|
  798. Do not confuse this option with 'osfiletype', which is for the file
  799. type that is actually stored with the file.
  800. This option is not copied to another buffer, independent of the 's' or
  801. 'S' flag in 'cpoptions'.

  802. *'fillchars'* *'fcs'*
  803. 'fillchars' 'fcs'string(default "vert:|,fold:-")
  804. global
  805. {not in Vi}
  806. {not available when compiled without the |+windows|
  807. and |+folding| features}
  808. Characters to fill the statuslines and vertical separators.
  809. It is a comma separated list of items:

  810.   itemdefaultUsed for
  811.   stl:c' ' or '^'statusline of the current window
  812.   stlnc:c' ' or '-'statusline of the non-current windows
  813.   vert:c'|'vertical separators |:vsplit|
  814.   fold:c'-'filling 'foldtext'
  815.   diff:c'-'deleted lines of the 'diff' option

  816. Any one that is omitted will fall back to the default.For "stl" and
  817. "stlnc" the space will be used when there is highlighting, '^' or '-'
  818. otherwise.

  819. Example:
  820.     :set fillchars=stl:^,stlnc:-,vert:\|,fold:-,diff:-
  821. This is similar to the default, except that these characters will also
  822. be used when there is highlighting.

  823. The highlighting used for these items:
  824.   itemhighlight group
  825.   stl:cStatusLine|hl-StatusLine|
  826.   stlnc:cStatusLineNC|hl-StatusLineNC|
  827.   vert:cVertSplit|hl-VertSplit|
  828.   fold:cFolded|hl-Folded|
  829.   diff:cDiffDelete|hl-DiffDelete|

  830. *'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
  831. 'fkmap' 'fk'boolean (default off)*E198*
  832. global
  833. {not in Vi}
  834. {only available when compiled with the |+rightleft|
  835. feature}
  836. When on, the keyboard is mapped for the Farsi character set.
  837. Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
  838. toggle this option |i_CTRL-_|.See |farsi|.

  839. *'foldclose'* *'fcl'*
  840. 'foldclose' 'fcl'string (default "")
  841. global
  842. {not in Vi}
  843. {not available when compiled without the |+folding|
  844. feature}
  845. When set to "all", a fold is closed when the cursor isn't in it and
  846. its level is higher than 'foldlevel'.  Useful if you want folds to
  847. automatically close when moving out of them.

  848. *'foldcolumn'* *'fdc'*
  849. 'foldcolumn' 'fdc'number (default 0)
  850. local to window
  851. {not in Vi}
  852. {not available when compiled without the |+folding|
  853. feature}
  854. When non-zero, a column with the specified width is shown at the side
  855. of the window which indicates open and closed folds.  The maximum
  856. value is 12.
  857. See |folding|.

  858. *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'*
  859. 'foldenable' 'fen'boolean (default on)
  860. local to window
  861. {not in Vi}
  862. {not available when compiled without the |+folding|
  863. feature}
  864. When off, all folds are open.  This option can be used to quickly
  865. switch between showing all text unfolded and viewing the text with
  866. folds (including manually opened or closed folds).  It can be toggled
  867. with the |zi| command.The 'foldcolumn' will remain blank when
  868. 'foldenable' is off.
  869. This option is set by commands that create a new fold or close a fold.
  870. See |folding|.

  871. *'foldexpr'* *'fde'*
  872. 'foldexpr' 'fde'string (default: "0")
  873. local to window
  874. {not in Vi}
  875. {not available when compiled without the |+folding|
  876. or |+eval| feature}
  877. The expression used for when 'foldmethod' is "expr".  It is evaluated
  878. for each line to obtain its fold level.  See |fold-expr|.  Also see
  879. |eval-sandbox|.

  880. *'foldignore'* *'fdi'*
  881. 'foldignore' 'fdi'string (default: "#")
  882. local to window
  883. {not in Vi}
  884. {not available when compiled without the |+folding|
  885. feature}
  886. Used only when 'foldmethod' is "indent".  Lines starting with
  887. characters in 'foldignore' will get their fold level from surrounding
  888. lines.White space is skipped before checking for this character.
  889. The default "#" works well for C programs.  See |fold-indent|.

  890. *'foldlevel'* *'fdl'*
  891. 'foldlevel' 'fdl'number (default: 0)
  892. local to window
  893. {not in Vi}
  894. {not available when compiled without the |+folding|
  895. feature}
  896. Sets the fold level: Folds with a higher level will be closed.
  897. Setting this option to zero will close all folds.  Higher numbers will
  898. close fewer folds.
  899. This option is set by commands like |zm|, |zM| and |zR|.
  900. See |fold-foldlevel|.

  901. *'foldlevelstart'* *'fdls'*
  902. 'foldlevelstart' 'fdls'number (default: -1)
  903. global
  904. {not in Vi}
  905. {not available when compiled without the |+folding|
  906. feature}
  907. Sets 'foldlevel' when starting to edit another buffer in a window.
  908. Useful to always start editing with all folds closed (value zero),
  909. some folds closed (one) or no folds closed (99).
  910. This is done before reading any modeline, thus a setting in a modeline
  911. overrules this option.Starting to edit a file for |diff-mode| also
  912. ignores this option and closes all folds.
  913. It is also done before BufReadPre autocommands, to allow an autocmd to
  914. overrule the 'foldlevel' value for specific files.
  915. When the value is negative, it is not used.

  916. *'foldmarker'* *'fmr'* *E536*
  917. 'foldmarker' 'fmr'string (default: "{{{,}}}")
  918. local to window
  919. {not in Vi}
  920. {not available when compiled without the |+folding|
  921. feature}
  922. The start and end marker used when 'foldmethod' is "marker".  There
  923. must be one comma, which separates the start and end marker.  The
  924. marker is a literal string (a regular expression would be too slow).
  925. See |fold-marker|.

  926. *'foldmethod'* *'fdm'*
  927. 'foldmethod' 'fdm'string (default: "manual")
  928. local to window
  929. {not in Vi}
  930. {not available when compiled without the |+folding|
  931. feature}
  932. The kind of folding used for the current window.  Possible values:
  933. |fold-manual|manual    Folds are created manually.
  934. |fold-indent|indent    Lines with equal indent form a fold.
  935. |fold-expr|expr    'foldexpr' gives the fold level of a line.
  936. |fold-marker|marker    Markers are used to specify folds.
  937. |fold-syntax|syntax    Syntax highlighting items specify folds.
  938. |fold-diff|diff    Fold text that is not changed.

  939. *'foldminlines'* *'fml'*
  940. 'foldminlines' 'fml'number (default: 1)
  941. local to window
  942. {not in Vi}
  943. {not available when compiled without the |+folding|
  944. feature}
  945. Sets the minimum number of screen lines for a fold to be displayed
  946. closed.  Also for manually closed folds.
  947. Note that this only has an effect of what is displayed.  After using
  948. "zc" to close a fold, which is displayed open because it's smaller
  949. than 'foldminlines', a following "zc" may close a containing fold.

  950. *'foldnestmax'* *'fdn'*
  951. 'foldnestmax' 'fdn'number (default: 20)
  952. local to window
  953. {not in Vi}
  954. {not available when compiled without the |+folding|
  955. feature}
  956. Sets the maximum nesting of folds for the "indent" and "syntax"
  957. methods.  This avoids that too many folds will be created.  Using more
  958. than 20 doesn't work, because the internal limit is 20.

  959. *'foldopen'* *'fdo'*
  960. 'foldopen' 'fdo'string (default: "block,hor,mark,percent,quickfix,
  961.      search,tag,undo")
  962. global
  963. {not in Vi}
  964. {not available when compiled without the |+folding|
  965. feature}
  966. Specifies for which type of commands folds will be opened, if the
  967. command moves the cursor into a closed fold.  It is a comma separated
  968. list of items.
  969. itemcommands
  970. allany
  971. block"(", "{", "[[", "[{", etc.
  972. horhorizontal movements: "l", "w", "fx", etc.
  973. insertany command in Insert mode
  974. jumpfar jumps: "G", "gg", etc.
  975. markjumping to a mark: "'m", CTRL-O, etc.
  976. percent"%"
  977. quickfix":cn", ":crew", ":make", etc.
  978. searchsearch for a pattern: "/", "n", "*", "gd", etc.
  979. (not for a search pattern in a ":" command)
  980. tagjumping to a tag: ":ta", CTRL-T, etc.
  981. undoundo or redo: "u" and CTRL-R
  982. When the command is part of a mapping this option is not used.Add
  983. the |zv| command to the mapping to get the same effect.
  984. When a movement command is used for an operator (e.g., "dl" or "y%")
  985. this option is not used.  This means the operator will include the
  986. whole closed fold.
  987. Note that vertical movements are not here, because it would make it
  988. very difficult to move onto a closed fold.
  989. In insert mode the folds containing the cursor will always be open
  990. when text is inserted.
  991. To close folds you can re-apply 'foldlevel' with the |zx| command or
  992. set the 'foldclose' option to "all".

  993. *'foldtext'* *'fdt'*
  994. 'foldtext' 'fdt'string (default: "foldtext()")
  995. local to window
  996. {not in Vi}
  997. {not available when compiled without the |+folding|
  998. feature}
  999. An expression which is used to specify the text displayed for a closed
  1000. fold.  See |fold-foldtext|.

  1001. *'formatoptions'* *'fo'*
  1002. 'formatoptions' 'fo'string (Vim default: "tcq", Vi default: "vt")
  1003. local to buffer
  1004. {not in Vi}
  1005. This is a sequence of letters which describes how automatic
  1006. formatting is to be done.  See |fo-table|.  When the 'paste' option is
  1007. on, no formatting is done (like 'formatoptions' is empty).  Commas can
  1008. be inserted for readability.
  1009. To avoid problems with flags that are added in the future, use the
  1010. "+=" and "-=" feature of ":set" |add-option-flags|.
  1011. NOTE: This option is set to the Vi default value when 'compatible' is
  1012. set and to the Vim default value when 'compatible' is reset.

  1013. *'formatprg'* *'fp'*
  1014. 'formatprg' 'fp'string (default "")
  1015. global
  1016. {not in Vi}
  1017. The name of an external program that will be used to format the lines
  1018. selected with the "gq" command.  The program must take the input on
  1019. stdin and produce the output on stdout.  The Unix program "fmt" is
  1020. such a program.  If this option is an empty string, the internal
  1021. format function will be used |C-indenting|.  Environment variables are
  1022. expanded |:set_env|.  See |option-backslash| about including spaces
  1023. and backslashes.
  1024. This option cannot be set from a |modeline|, for security reasons.

  1025.    *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
  1026. 'gdefault' 'gd'boolean(default off)
  1027. global
  1028. {not in Vi}
  1029. When on, the ":substitute" flag 'g' is default on.  This means that
  1030. all matches in a line are substituted instead of one.  When a 'g' flag
  1031. is given to a ":substitute" command, this will toggle the substitution
  1032. of all or one match.  See |complex-change|.

  1033. command'gdefault' on'gdefault' off
  1034. :s///  subst. all  subst. one
  1035. :s///g  subst. one  subst. all
  1036. :s///gg  subst. all  subst. one

  1037. NOTE: This option is reset when 'compatible' is set.

  1038. *'grepformat'* *'gfm'*
  1039. 'grepformat' 'gfm'string(default "%f:%l%m,%f  %l%m")
  1040. global
  1041. {not in Vi}
  1042. Format to recognize for the ":grep" command output.
  1043. This is a scanf-like string that uses the same format as the
  1044. 'errorformat' option: see |errorformat|.

  1045. *'grepprg'* *'gp'*
  1046. 'grepprg' 'gp'string(default "grep -n ",
  1047. Unix: "grep -n $* /dev/null",
  1048. Win32: "findstr /n" or "grep -n",
  1049.       VMS: "SEARCH/NUMBERS ")
  1050. global or local to buffer |global-local|
  1051. {not in Vi}
  1052. Program to use for the ":grep" command. This option may contain '%'
  1053. and '#' characters, which are expanded like when used in a command-
  1054. line.  The placeholder "$*" is allowed to specify where the arguments
  1055. will be included.  Environment variables are expanded |:set_env|.  See
  1056. |option-backslash| about including spaces and backslashes.
  1057. When your "grep" accepts the "-H" argument, use this to make ":grep"
  1058. also work well with a single file:
  1059. :set grepprg=grep\ -nH
  1060. See also the section |:make_makeprg|, since most of the comments there
  1061. apply equally to 'grepprg'.
  1062. For Win32, the default is "findstr /n" if "findstr.exe" can be found,
  1063. otherwise it's "grep -n".
  1064. This option cannot be set from a |modeline|, for security reasons.

  1065. *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*
  1066. 'guicursor' 'gcr'string(default "n-v-c:block-Cursor/lCursor,
  1067. ve:ver35-Cursor,
  1068. o:hor50-Cursor,
  1069. i-ci:ver25-Cursor/lCursor,
  1070. r-cr:hor20-Cursor/lCursor,
  1071. sm:block-Cursor
  1072. -blinkwait175-blinkoff150-blinkon175",
  1073. for MS-DOS and Win32 console:
  1074. "n-v-c:block,o:hor50,i-ci:hor15,
  1075. r-cr:hor30,sm:block")
  1076. global
  1077. {not in Vi}
  1078. {only available when compiled with GUI enabled, and
  1079. for MS-DOS and Win32 console}
  1080. This option tells Vim what the cursor should look like in different
  1081. modes.It fully works in the GUI.  In an MSDOS or Win32 console, only
  1082. the height of the cursor can be changed.  This can be done by
  1083. specifying a block cursor, or a percentage for a vertical or
  1084. horizontal cursor.

  1085. The option is a comma separated list of parts.Each part consist of a
  1086. mode-list and an argument-list:
  1087. mode-list:argument-list,mode-list:argument-list,..
  1088. The mode-list is a dash separated list of these modes:
  1089. nNormal mode
  1090. vVisual mode
  1091. veVisual mode with 'selection' "exclusive" (same as 'v',
  1092. if not specified)
  1093. oOperator-pending mode
  1094. iInsert mode
  1095. rReplace mode
  1096. cCommand-line Normal (append) mode
  1097. ciCommand-line Insert mode
  1098. crCommand-line Replace mode
  1099. smshowmatch in Insert mode
  1100. aall modes
  1101. The argument-list is a dash separated list of these arguments:
  1102. hor{N}horizontal bar, {N} percent of the character height
  1103. ver{N}vertical bar, {N} percent of the character width
  1104. blockblock cursor, fills the whole character
  1105. [only one of the above three should be present]
  1106. blinkwait{N}*cursor-blinking*
  1107. blinkon{N}
  1108. blinkoff{N}
  1109. blink times for cursor: blinkwait is the delay before
  1110. the cursor starts blinking, blinkon is the time that
  1111. the cursor is shown and blinkoff is the time that the
  1112. cursor is not shown.  The times are in msec.  When one
  1113. of the numbers is zero, there is no blinking.  The
  1114. default is: "blinkwait700-blinkon400-blinkoff250".
  1115. These numbers are used for a missing entry.  This
  1116. means that blinking is enabled by default.  To switch
  1117. blinking off you can use "blinkon0".  The cursor only
  1118. blinks when Vim is waiting for input, not while
  1119. executing a command.
  1120. To make the cursor blink in an xterm, see
  1121. |xterm-blink|.
  1122. {group-name}
  1123. a highlight group name, that sets the color and font
  1124. for the cursor
  1125. {group-name}/{group-name}
  1126. Two highlight group names, the first is used when
  1127. no language mappings are used, the other when they
  1128. are. |language-mapping|

  1129. Examples of parts:
  1130.    n-c-v:block-nCursorin Normal, Command-line and Visual mode, use a
  1131. block cursor with colors from the "nCursor"
  1132. highlight group
  1133.    i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150
  1134. In Insert and Command-line Insert mode, use a
  1135. 30% vertical bar cursor with colors from the
  1136. "iCursor" highlight group.  Blink a bit
  1137. faster.

  1138. The 'a' mode is different.  It will set the given argument-list for
  1139. all modes.  It does not reset anything to defaults.  This can be used
  1140. to do a common setting for all modes.  For example, to switch off
  1141. blinking: "a:blinkon0"

  1142. Examples of cursor highlighting:
  1143.     :highlight Cursor gui=reverse guifg=NONE guibg=NONE
  1144.     :highlight Cursor gui=NONE guifg=bg guibg=fg

  1145. *'guifont'* *'gfn'*
  1146.    *E235* *E596* *E610* *E611*
  1147. 'guifont' 'gfn'string(default "")
  1148. global
  1149. {not in Vi}
  1150. {only available when compiled with GUI enabled}
  1151. This is a list of fonts which will be used for the GUI version of Vim.
  1152. In its simplest form the value is just one font name.  When
  1153. the font cannot be found you will get an error message.  To try other
  1154. font names a list can be specified, font names separated with commas.
  1155. The first valid font is used.
  1156. When 'guifontset' is not empty, 'guifont' is not used.
  1157. Spaces after a comma are ignored.  To include a comma in a font name
  1158. precede it with a backslash.  Setting an option requires an extra
  1159. backslash before a space and a backslash.  See also
  1160. |option-backslash|.  For example:
  1161.     :set guifont=Screen15,\ 7x13,font\\,with\\,commas
  1162. will make vim try to use the font "Screen15" first, and if it fails it
  1163. will try to use "7x13" and then "font,with,commas" instead.
  1164. For the GTK+ 2 GUI the font name looks like this:
  1165.     :set guifont=Andale\ Mono\ 11
  1166. That's all.  XLFDs are no longer accepted.
  1167. *E236*
  1168. Note that the fonts must be mono-spaced (all characters have the same
  1169. width).
  1170. To preview a font on X11, you might be able to use the "xfontsel"
  1171. program.  The "xlsfonts" program gives a list of all available fonts.
  1172. For Win32, GTK and Photon only:
  1173.     :set guifont=*
  1174. will bring up a font requester, where you can pick the font you want.
  1175. If none of the fonts can be loaded, vim will keep the current setting.
  1176. If an empty font list is given, vim will try using other resource
  1177. settings (for X, it will use the Vim.font resource), and finally it
  1178. will try some builtin default which should always be there ("7x13" in
  1179. the case of X).  The font names given should be "normal" fonts.  Vim
  1180. will try to find the related bold and italic fonts.
  1181. For the Win32 GUI*E244* *E245*
  1182. - takes these options in the font name:
  1183. hXX - height is XX (points, can be floating-point)
  1184. wXX - width is XX (points, can be floating-point)
  1185. b   - bold
  1186. i   - italic
  1187. u   - underline
  1188. s   - strikeout
  1189. cXX - character set XX. valid charsets are: ANSI, ARABIC,
  1190.       BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK,
  1191.       HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS,
  1192.       SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC.



  1193.   Use a ':' to separate the options.
  1194. - A '_' can be used in the place of a space, so you don't need to use
  1195.   backslashes to escape the spaces.
  1196. - Examples:
  1197.     :set guifont=courier_new:h12:w5:b:cRUSSIAN
  1198.     :set guifont=Andale_Mono:h7.5:w4.5
  1199. Have a look at <[url]http://nova.bsuvc.bsu.edu/prn/monofont/[/url]> for
  1200. mono-spaced fonts and comments on them.
  1201. See also |font-sizes|.

  1202. *'guifontset'* *'gfs'*
  1203. *E250* *E252* *E234* *E597* *E598*
  1204. 'guifontset' 'gfs'string(default "")
  1205. global
  1206. {not in Vi}
  1207. {only available when compiled with GUI enabled and
  1208. with the |+xfontset| feature}
  1209. {not available in the GTK+ 2 GUI}
  1210. When not empty, specifies two (or more) fonts to be used.  The first
  1211. one for normal English, the second one for your special language.  See
  1212. |xfontset|.
  1213. Setting this option also means that all font names will be handled as
  1214. a fontset name.  Also the ones used for the "font" argument of the
  1215. |:highlight| command.
  1216. The fonts must match with the current locale.  If fonts for the
  1217. character sets that the current locale uses are not included, setting
  1218. 'guifontset' will fail.
  1219. Note the difference between 'guifont' and 'guifontset': In 'guifont'
  1220. the comma-separated names are alternative names, one of which will be
  1221. used.  In 'guifontset' the whole string is one fontset name,
  1222. including the commas.  It is not possible to specify alternative
  1223. fontset names.
  1224. This example works on many X11 systems:
  1225. :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*

  1226. *'guifontwide'* *'gfw'* *E231* *E533* *E534*
  1227. 'guifontwide' 'gfw'string(default "")
  1228. global
  1229. {not in Vi}
  1230. {only available when compiled with GUI enabled}
  1231. When not empty, specifies a comma-separated list of fonts to be used
  1232. for double-width characters.  The first font that can be loaded is
  1233. used.
  1234. Note: The size of these fonts must be exactly twice as wide as the one
  1235. specified with 'guifont' and the same height.

  1236. All GUI versions but GTK+ 2:

  1237. 'guifontwide' is only used when 'encoding' is set to "utf-8" and
  1238. 'guifontset' is empty or invalid.
  1239. When 'guifont' is set and a valid font is found in it and
  1240. 'guifontwide' is empty Vim will attempt to find a matching
  1241. double-width font and set 'guifontwide' to it.

  1242. GTK+ 2 GUI only:*guifontwide_gtk2*

  1243. If set and valid, 'guifontwide' is always used for double width
  1244. characters, even if 'encoding' is not set to "utf-8".
  1245. Vim does not attempt to find an appropriate value for 'guifontwide'
  1246. automatically.If 'guifontwide' is empty Pango/Xft will choose the
  1247. font for characters not available in 'guifont'.  Thus you do not need
  1248. to set 'guifontwide' at all unless you want to override the choice
  1249. made by Pango/Xft.

  1250. *'guiheadroom'* *'ghr'*
  1251. 'guiheadroom' 'ghr'number(default 50)
  1252. global
  1253. {not in Vi} {only for GTK and X11 GUI}
  1254. The number of pixels subtracted from the screen height when fitting
  1255. the GUI window on the screen.  Set this before the GUI is started,
  1256. e.g., in your |gvimrc| file.  When zero, the whole screen height will
  1257. be used by the window.When positive, the specified number of pixel
  1258. lines will be left for window decorations and other items on the
  1259. screen.  Set it to a negative value to allow windows taller than the
  1260. screen.

  1261. *'guioptions'* *'go'*
  1262. 'guioptions' 'go'string(default "gmrLtT"   (MS-Windows),
  1263. "agimrLtT" (GTK, Motif and Athena)
  1264. global
  1265. {not in Vi}
  1266. {only available when compiled with GUI enabled}
  1267. This option only has an effect in the GUI version of vim.  It is a
  1268. sequence of letters which describes what components and options of the
  1269. GUI should be used.
  1270. To avoid problems with flags that are added in the future, use the
  1271. "+=" and "-=" feature of ":set" |add-option-flags|.

  1272. Valid letters are as follows:
  1273. *guioptions_a*
  1274.   'a'Autoselect:  If present, then whenever VISUAL mode is started,
  1275. or the Visual area extended, Vim tries to become the owner of
  1276. the windowing system's global selection.  This means that the
  1277. Visually highlighted text is available for pasting into other
  1278. applications as well as into Vim itself.  When the Visual mode
  1279. ends, possibly due to an operation on the text, or when an
  1280. application wants to paste the selection, the highlighted text
  1281. is automatically yanked into the "* selection register.
  1282. Thus the selection is still available for pasting into other
  1283. applications after the VISUAL mode has ended.
  1284.     If not present, then Vim won't become the owner of the
  1285. windowing system's global selection unless explicitly told to
  1286. by a yank or delete operation for the "* register.
  1287. The same applies to the modeless selection.

  1288.   'A'Autoselect for the modeless selection.Like 'a', but only
  1289. applies to the modeless selection.

  1290.     'guioptions'   autoselect Visual  autoselect modeless
  1291. "" - -
  1292. "a"yesyes
  1293. "A" -yes
  1294. "aA"yesyes

  1295.   'c'Use console dialogs instead of popup dialogs for simple
  1296. choices.

  1297.   'f'Foreground: Don't use fork() to detach the GUI from the shell
  1298. where it was started.  Use this for programs that wait for the
  1299. editor to finish (e.g., an e-mail program).  Alternatively you
  1300. can use "gvim -f" or ":gui -f" to start the GUI in the
  1301. foreground.  |gui-fork|
  1302. Note: Set this option in the vimrc file.  The forking may have
  1303. happened already when the gvimrc file is read.

  1304.   'i'Use a Vim icon.  For GTK with KDE it is used in the left-upper
  1305. corner of the window.  It's black&white on non-GTK, because of
  1306. limitations of X11.  For a color icon, see |X11-icon|.

  1307.   'm'Menu bar is present.
  1308.   'M'The system menu "$VIMRUNTIME/menu.vim" is not sourced.Note
  1309. that this flag must be added in the .vimrc file, before
  1310. switching on syntax or filetype recognition (when the .gvimrc
  1311. file is sourced the system menu has already been loaded; the
  1312. ":syntax on" and ":filetype on" commands load the menu too).
  1313.   'g'Grey menu items: Make menu items that are not active grey.  If
  1314. 'g' is not included inactive menu items are not shown at all.
  1315. Exception: Athena will always use grey menu items.

  1316.   't'Include tearoff menu items.  Currently only works for Win32,
  1317. GTK+, and Motif 1.2 GUI.
  1318.   'T'Include Toolbar.  Currently only in Win32, GTK+, Motif, and
  1319. Athena GUIs.

  1320.   'r'Right-hand scrollbar is always present.
  1321.   'R'Right-hand scrollbar is present when there is a vertically
  1322. split window.
  1323.   'l'Left-hand scrollbar is always present.
  1324.   'L'Left-hand scrollbar is present when there is a vertically
  1325. split window.
  1326.   'b'Bottom (horizontal) scrollbar is present.  Its size depends on
  1327.   the longest visible line, or on the cursor line if the 'h'
  1328. flag is included. |gui-horiz-scroll|
  1329.   'h'Limit horizontal scrollbar size to the length of the cursor
  1330. line.  Reduces computations. |gui-horiz-scroll|

  1331. And yes, you may even have scrollbars on the left AND the right if
  1332. you really want to :-).  See |gui-scrollbars| for more information.

  1333.   'v'Use a vertical button layout for dialogs.  When not included,
  1334. a horizontal layout is preferred, but when it doesn't fit a
  1335. vertical layout is used anyway.
  1336.   'p'Use Pointer callbacks for X11 GUI.  This is required for some
  1337. window managers.  If the cursor is not blinking or hollow at
  1338. the right moment, try adding this flag.  This must be done
  1339. before starting the GUI.  Set it in your gvimrc.  Adding or
  1340. removing it after the GUI has started has no effect.
  1341.   'F'Add a footer.  Only for Motif.See |gui-footer|.

  1342. *'guipty'* *'noguipty'*
  1343. 'guipty'boolean(default on)
  1344. global
  1345. {not in Vi}
  1346. {only available when compiled with GUI enabled}
  1347. Only in the GUI: If on, an attempt is made to open a pseudo-tty for
  1348. I/O to/from shell commands.  See |gui-pty|.

  1349. *'helpfile'* *'hf'*
  1350. 'helpfile' 'hf'string(default (MSDOS)  "$VIMRUNTIME\doc\help.txt"
  1351. (others) "$VIMRUNTIME/doc/help.txt")
  1352. global
  1353. {not in Vi}
  1354. Name of the main help file.  All distributed help files should be
  1355. placed together in one directory.  Additionally, all "doc" directories
  1356. in 'runtimepath' will be used.
  1357. Environment variables are expanded |:set_env|.  For example:
  1358. "$VIMRUNTIME/doc/help.txt".  If $VIMRUNTIME is not set, $VIM is also
  1359. tried.Also see |$VIMRUNTIME| and |option-backslash| about including
  1360. spaces and backslashes.
  1361. This option cannot be set from a |modeline|, for security reasons.

  1362. *'helpheight'* *'hh'*
  1363. 'helpheight' 'hh'number(default 20)
  1364. global
  1365. {not in Vi}
  1366. {not available when compiled without the +windows
  1367. feature}
  1368. Minimal initial height of the help window when it is opened with the
  1369. ":help" command.  The initial height of the help window is half of the
  1370. current window, or (when the 'ea' option is on) the same as other
  1371. windows.  When the height is less than 'helpheight', the height is
  1372. set to 'helpheight'.  Set to zero to disable.

  1373. *'helplang'* *'hlg'*
  1374. 'helplang' 'hlg'string(default: messages language or emtpy)
  1375. global
  1376. {only available when compiled with the |+multi_lang|
  1377. feature}
  1378. {not in Vi}
  1379. Comma separated list of languages.  Vim will use the first language
  1380. for which the desired help can be found.  The English help will always
  1381. be used as a last resort.  You can add "en" to prefer English over
  1382. another language, but that will only find tags that exist in that
  1383. language and not in the English help.
  1384. Example:
  1385. :set helplang=de,it
  1386. This will first search German, then Italian and finally English help
  1387. files.
  1388. When using |CTRL-]| and ":help!" in a non-English help file Vim will
  1389. try to find the tag in the current language before using this option.
  1390. See |help-translated|.

  1391.      *'hidden'* *'hid'* *'nohidden'* *'nohid'*
  1392. 'hidden' 'hid'boolean(default off)
  1393. global
  1394. {not in Vi}
  1395. When off a buffer is unloaded when it is |abandon|ed.  When on a
  1396. buffer becomes hidden when it is |abandon|ed.  If the buffer is still
  1397. displayed in another window, it does not become hidden, of course.
  1398. The commands that move through the buffer list sometimes make a buffer
  1399. hidden although the 'hidden' option is off: When the buffer is
  1400. modified, 'autowrite' is off or writing is not possible, and the '!'
  1401. flag was used.See also |windows|.
  1402. This option is set for one command with ":hide {command}" |:hide|.
  1403. WARNING: It's easy to forget that you have changes in hidden buffers.
  1404. Think twice when using ":q!" or ":qa!".

  1405. *'highlight'* *'hl'*
  1406. 'highlight' 'hl'string(default (as a single string):
  1407.      "8:SpecialKey,@:NonText,d:Directory,
  1408.      e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,
  1409.      M:ModeMsg,n:LineNr,r:Question,
  1410.      s:StatusLine,S:StatusLineNC,c:VertSplit
  1411.      t:Title,v:Visual,w:WarningMsg,W:WildMenu,
  1412.      f:Folded,F:FoldColumn,A:DiffAdd,
  1413.      C:DiffChange,D:DiffDelete,T:DiffText,
  1414.      >:SignColumn")
  1415. global
  1416. {not in Vi}
  1417. This option can be used to set highlighting mode for various
  1418. occasions.  It is a comma separated list of character pairs.  The
  1419. first character in a pair gives the occasion, the second the mode to
  1420. use for that occasion.The occasions are:
  1421. |hl-SpecialKey| 8  Meta and special keys listed with ":map"
  1422. |hl-NonText| @  '~' and '@' at the end of the window and
  1423.     characters from 'showbreak'
  1424. |hl-Directory| d  directories in CTRL-D listing and other special
  1425.     things in listings
  1426. |hl-ErrorMsg| e  error messages
  1427. h  (obsolete, ignored)
  1428. |hl-IncSearch| i  'incsearch' highlighting
  1429. |hl-Search| l  last search pattern highlighting (see 'hlsearch')
  1430. |hl-MoreMsg| m  |more-prompt|
  1431. |hl-ModeMsg| M  Mode (e.g., "-- INSERT --")
  1432. |hl-LineNr| n  line number for ":number" and ":#" commands
  1433. |hl-Question| r  |hit-enter| prompt and yes/no questions
  1434. |hl-StatusLine| s  status line of current window |status-line|
  1435. |hl-StatusLineNC| S  status lines of not-current windows
  1436. |hl-Title| t  Titles for output from ":set all", ":autocmd" etc.
  1437. |hl-VertSplit| c  column used to separate vertically split windows
  1438. |hl-Visual| v  Visual mode
  1439. |hl-VisualNOS| V  Visual mode when Vim does is "Not Owning the
  1440.     Selection" Only X11 Gui's |gui-x11| and
  1441.     |xterm-clipboard|.
  1442. |hl-WarningMsg| w  warning messages
  1443. |hl-WildMenu| W  wildcard matches displayed for 'wildmenu'
  1444. |hl-Folded| f  line used for closed folds
  1445. |hl-FoldColumn| F  'foldcolumn'
  1446. |hl-SignColumn| >  column used for |signs|

  1447. The display modes are:
  1448. rreverse(termcap entry "mr" and "me")
  1449. iitalic(termcap entry "ZH" and "ZR")
  1450. bbold(termcap entry "md" and "me")
  1451. sstandout(termcap entry "so" and "se")
  1452. uunderline(termcap entry "us" and "ue")
  1453. nno highlighting
  1454. -no highlighting
  1455. :use a highlight group
  1456. The default is used for occasions that are not included.
  1457. If you want to change what the display modes do, see |dos-colors|
  1458. for an example.
  1459. When using the ':' display mode, this must be followed by the name of
  1460. a highlight group.  A highlight group can be used to define any type
  1461. of highlighting, including using color.  See |:highlight| on how to
  1462. define one.  The default uses a different group for each occasion.
  1463. See |highlight-default| for the default highlight groups.

  1464. *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
  1465. 'hlsearch' 'hls'boolean(default off)
  1466. global
  1467. {not in Vi}
  1468. {not available when compiled without the
  1469. |+extra_search| feature}
  1470. When there is a previous search pattern, highlight all its matches.
  1471. The type of highlighting used can be set with the 'l' occasion in the
  1472. 'highlight' option.  This uses the "Search" highlight group by
  1473. default.  Note that only the matching text is highlighted, any offsets
  1474. are not applied.
  1475. See also: 'incsearch' and |:match|.
  1476. When you get bored looking at the highlighted matches, you can turn it
  1477. off with |:nohlsearch|.  As soon as you use a search command, the
  1478. highlighting comes back.
  1479. When the search pattern can match an end-of-line, Vim will try to
  1480. highlight all of the matched text.  However, this depends on where the
  1481. search starts.This will be the first line in the window or the first
  1482. line below a closed fold.  A match in a previous line which is not
  1483. drawn may not continue in an newly drawn line.
  1484. NOTE: This option is reset when 'compatible' is set.

  1485. *'history'* *'hi'*
  1486. 'history' 'hi'number(Vim default: 20, Vi default: 0)
  1487. global
  1488. {not in Vi}
  1489. A history of ":" commands, and a history of previous search patterns
  1490. are remembered.  This option decides how many entries may be stored in
  1491. each of these histories (see |cmdline-editing|).
  1492. NOTE: This option is set to the Vi default value when 'compatible' is
  1493. set and to the Vim default value when 'compatible' is reset.

  1494. *'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
  1495. 'hkmap' 'hk'boolean (default off)
  1496. global
  1497. {not in Vi}
  1498. {only available when compiled with the |+rightleft|
  1499. feature}
  1500. When on, the keyboard is mapped for the Hebrew character set.
  1501. Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
  1502. toggle this option.  See |rileft|.
  1503. NOTE: This option is reset when 'compatible' is set.

  1504. *'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
  1505. 'hkmapp' 'hkp'boolean (default off)
  1506. global
  1507. {not in Vi}
  1508. {only available when compiled with the |+rightleft|
  1509. feature}
  1510. When on, phonetic keyboard mapping is used.  'hkmap' must also be on.
  1511. This is useful if you have a non-Hebrew keyboard.
  1512. See |rileft|.
  1513. NOTE: This option is reset when 'compatible' is set.

  1514. *'icon'* *'noicon'*
  1515. 'icon'boolean(default off, on when title can be restored)
  1516. global
  1517. {not in Vi}
  1518. {not available when compiled without the |+title|
  1519. feature}
  1520. When on, the icon text of the window will be set to the value of
  1521. 'iconstring' (if it is not empty), or to the name of the file
  1522. currently being edited.  Only the last part of the name is used.
  1523. Overridden by the 'iconstring' option.
  1524. Only works if the terminal supports setting window icons (currently
  1525. only X11 GUI and terminals with a non-empty 't_IS' option - these are
  1526. Unix xterm and iris-ansi by default, where 't_IS' is taken from the
  1527. builtin termcap).
  1528. When Vim was compiled with HAVE_X11 defined, the original icon will be
  1529. restored if possible |X11|. See |X11-icon| for changing the icon on
  1530. X11.

  1531. *'iconstring'*
  1532. 'iconstring'string(default "")
  1533. global
  1534. {not in Vi}
  1535. {not available when compiled without the |+title|
  1536. feature}
  1537. When this option is not empty, it will be used for the icon text of
  1538. the window.  This happens only when the 'icon' option is on.
  1539. Only works if the terminal supports setting window icon text
  1540. (currently only X11 GUI and terminals with a non-empty 't_IS' option).
  1541. Does not work for MS Windows.
  1542. When Vim was compiled with HAVE_X11 defined, the original icon will be
  1543. restored if possible |X11|.
  1544. When this option contains printf-style '%' items, they will be
  1545. expanded according to the rules used for 'statusline'.See
  1546. 'titlestring' for example settings.
  1547. {not available when compiled without the |+statusline| feature}

  1548. *'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
  1549. 'ignorecase' 'ic'boolean(default off)
  1550. global
  1551. Ignore case in search patterns.  Also used when searching in the tags
  1552. file.
  1553. Also see 'smartcase'.
  1554. Can be overruled by using "\c" or "\C" in the pattern, see
  1555. |/ignorecase|.

  1556. *'imactivatekey'* *'imak'*
  1557. 'imactivatekey' 'imak'string (default "")
  1558. global
  1559. {not in Vi}
  1560. {only available when compiled with |+xim| and
  1561. |+GUI_GTK|}
  1562. Specifies the key that your Input Method in X-Windows uses for
  1563. activation.  When this is specified correctly, vim can fully control
  1564. IM with 'imcmdline', 'iminsert' and 'imsearch'.
  1565. You can't use this option to change the activation key, the option
  1566. tells Vim what the key is.
  1567. Format:
  1568. [MODIFIER_FLAG-]KEY_STRING

  1569. These characters can be used for MODIFIER_FLAG (case is ignored):
  1570. S    Shift key
  1571. L    Lock key
  1572. C    Control key
  1573. 1    Mod1 key
  1574. 2    Mod2 key
  1575. 3    Mod3 key
  1576. 4    Mod4 key
  1577. 5    Mod5 key
  1578. Combinations are allowed, for example "S-C-space" or "SC-space" are
  1579. both shift+ctrl+space.
  1580. See <X11/keysymdef.h> and XStringToKeysym for KEY_STRING.

  1581. Example:
  1582. :set imactivatekey=S-space
  1583. "S-space" means shift+space.  This is the activation key for kinput2 +
  1584. canna (Japanese), and ami (Korean).

  1585. *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
  1586. 'imcmdline' 'imc'boolean (default off)
  1587. global
  1588. {not in Vi}
  1589. {only available when compiled with the |+xim|
  1590. |+multi_byte_ime| or |global-ime| feature}
  1591. When set the Input Method is always on when starting to edit a command
  1592. line, unless entering a search pattern (see 'imsearch' for that).
  1593. Setting this option is useful when your input method allows entering
  1594. English characters directly, e.g., when it's used to type accented
  1595. characters with dead keys.

  1596. *'imdisable'* *'imd'* *'nodisable'* *'noimd'*
  1597. 'imdisable' 'imd'boolean (default off, on for some systems (SGI))
  1598. global
  1599. {not in Vi}
  1600. {only available when compiled with the |+xim|
  1601. |+multi_byte_ime| or |global-ime| feature}
  1602. When set the Input Method is never used.  This is useful to disable
  1603. the IM when it doesn't work properly.
  1604. Currently this option is on by default for SGI/IRIX machines.  This
  1605. may change in later releases.

  1606. *'iminsert'* *'imi'*
  1607. 'iminsert' 'imi'number (default 0, 2 when an input method is supported)
  1608. local to buffer
  1609. {not in Vi}
  1610. Specifies whether :lmap or an Input Method (IM) is to be used in
  1611. Insert mode.  Valid values:
  1612. 0:lmap is off and IM is off
  1613. 1:lmap is ON and IM is off
  1614. 2:lmap is off and IM is ON
  1615. 2 is available only when compiled with the |+multi_byte_ime|, |+xim|
  1616. or |global-ime|.
  1617. To always reset the option to zero when leaving Insert mode with <Esc>
  1618. this can be used:
  1619. :inoremap <ESC> <ESC>:set iminsert=0<CR>
  1620. This makes :lmap and IM turn off automatically when leaving Insert
  1621. mode.
  1622. Note that this option changes when using CTRL-^ in Insert mode
  1623. |i_CTRL-^|.
  1624. The value is set to 1 when setting 'keymap' to a valid keymap name.
  1625. It is also used for the argument of commands like "r" and "f".
  1626. The value 0 may not work correctly with Athena and Motif with some XIM
  1627. methods.  Use 'imdisable' to disable XIM then.
复制代码
 楼主| 发表于 2004-8-14 00:35:44 | 显示全部楼层

  1. *'imsearch'* *'ims'*
  2. 'imsearch' 'ims'number (default 0, 2 when an input method is supported)
  3. local to buffer
  4. {not in Vi}
  5. Specifies whether :lmap or an Input Method (IM) is to be used when
  6. entering a search pattern.  Valid values:
  7. -1the value of 'iminsert' is used, makes it look like
  8. 'iminsert' is also used when typing a search pattern
  9. 0:lmap is off and IM is off
  10. 1:lmap is ON and IM is off
  11. 2:lmap is off and IM is ON
  12. Note that this option changes when using CTRL-^ in Insert mode
  13. |c_CTRL-^|.
  14. The value is set to 1 when it is not -1 and setting the 'keymap'
  15. option to a valid keymap name.
  16. The value 0 may not work correctly with Athena and Motif with some XIM
  17. methods.  Use 'imdisable' to disable XIM then.

  18. *'include'* *'inc'*
  19. 'include' 'inc'string(default "^\s*#\s*include")
  20. global or local to buffer |global-local|
  21. {not in Vi}
  22. {not available when compiled without the
  23. |+find_in_path| feature}
  24. Pattern to be used to find an include command.It is a search
  25. pattern, just like for the "/" command (See |pattern|).  The default
  26. value is for C programs.  This option is used for the commands "[i",
  27. "]I", "[d", etc..  The 'isfname' option is used to recognize the file
  28. name that comes after the matched pattern.  See |option-backslash|
  29. about including spaces and backslashes.

  30. *'includeexpr'* *'inex'*
  31. 'includeexpr' 'inex'string(default "")
  32. local to buffer
  33. {not in Vi}
  34. {not available when compiled without the
  35. |+find_in_path| or |+eval| feature}
  36. Expression to be used to transform the string found with the 'include'
  37. option to a file name.Mostly useful to change "." to "/" for Java:
  38. :set includeexpr=substitute(v:fname,'\\.','/','g')
  39. The "v:fname" variable will be set to the file name that was detected.
  40. Evaluated in the |sandbox|.
  41. Also used for the |gf| command if an unmodified file name can't be
  42. found.Allows doing "gf" on the name after an 'include' statement.
  43. Also used for |<cfile>|.

  44. *'incsearch'* *'is'* *'noincsearch'* *'nois'*
  45. 'incsearch' 'is'boolean(default off)
  46. global
  47. {not in Vi}
  48. {not available when compiled without the
  49. |+extra_search| feature}
  50. While typing a search pattern, show immediately where the so far
  51. typed pattern matches.The matched string is highlighted.  If the
  52. pattern is invalid or not found, nothing is shown.  The screen will
  53. be updated often, this is only useful on fast terminals.  Note that
  54. the match will be shown, but the cursor is not actually positioned
  55. there.You still need to finish the search command with <CR> to move
  56. the cursor.  The highlighting can be set with the 'i' flag in
  57. 'highlight'.  See also: 'hlsearch'.
  58. NOTE: This option is reset when 'compatible' is set.

  59. *'indentexpr'* *'inde'*
  60. 'indentexpr' 'inde'string(default "")
  61. local to buffer
  62. {not in Vi}
  63. {not available when compiled without the |+cindent|
  64. or |+eval| features}
  65. Expression which is evaluated to obtain the proper indent for a line.
  66. It is used when a new line is created, for the |=| operator and
  67. in Insert mode as specified with the 'indentkeys' option.
  68. When this option is not empty, it overrules the 'cindent' and
  69. 'smartindent' indenting.
  70. When 'paste' is set this option is not used for indenting.
  71. The expression is evaluated with |v:lnum| set to the line number for
  72. which the indent is to be computed.
  73. The expression must return the number of spaces worth of indent.  It
  74. can return "-1" to keep the current indent (this means 'autoindent' is
  75. used for the indent).
  76. Functions useful for computing the indent are |indent()|, |cindent()|
  77. and |lispindent()|.
  78. The evaluation of the expression must not have side effects!  It must
  79. not change the text, jump to another window, etc.  Afterwards the
  80. cursor position is always restored, thus the cursor may be moved.
  81. Normally this option would be set to call a function:
  82. :set indentexpr=GetMyIndent()
  83. Error messages will be suppressed, unless the 'debug' option contains
  84. "msg".
  85. See |indent-expression|.  Also see |eval-sandbox|.
  86. NOTE: This option is made empty when 'compatible' is set.

  87. *'indentkeys'* *'indk'*
  88. 'indentkeys' 'indk'string(default "0{,0},:,0#,!^F,o,O,e")
  89. local to buffer
  90. {not in Vi}
  91. {not available when compiled without the |+cindent|
  92. feature}
  93. A list of keys that, when typed in Insert mode, cause reindenting of
  94. the current line.  Only happens if 'indentexpr' isn't empty.
  95. The format is identical to 'cinkeys', see |indentkeys-format|.
  96. See |C-indenting| and |indent-expression|.

  97. *'infercase'* *'inf'* *'noinfercase'* *'noinf'*
  98. 'infercase' 'inf'boolean(default off)
  99. local to buffer
  100. {not in Vi}
  101. When doing keyword completion in insert mode |ins-completion|, and
  102. 'ignorecase' is also on, the case of the match is adjusted.  If the
  103. typed text contains a lowercase letter where the match has an upper
  104. case letter, the completed part is made lowercase.  If the typed text
  105. has no lowercase letters and the match has a lowercase letter where
  106. the typed text has an uppercase letter, and there is a letter before
  107. it, the completed part is made uppercase.

  108. *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
  109. 'insertmode' 'im'boolean(default off)
  110. global
  111. {not in Vi}
  112. Makes Vim work in a way that Insert mode is the default mode.  Useful
  113. if you want to use Vim as a modeless editor.  Used for |evim|.
  114. These Insert mode commands will be useful:
  115. - Use the cursor keys to move around.
  116. - Use CTRL-O to execute one Normal mode command |i_CTRL-O|).  When
  117.   this is a mapping, it is executed as if 'insertmode' was off.
  118.   Normal mode remains active until the mapping is finished.
  119. *i_CTRL-L*
  120. - Use CTRL-L to execute a number of Normal mode commands, then use
  121.   <Esc> to get back to Insert mode.

  122. These items change when 'insertmode' is set:
  123. - when starting to edit of a file, Vim goes to Insert mode.
  124. - <Esc> in Insert mode is a no-op and beeps.
  125. - <Esc> in Normal mode makes Vim go to Insert mode.
  126. - CTRL-L in Insert mode is a command, it is not inserted.
  127. - CTRL-Z in Insert mode suspends Vim, see |CTRL-Z|.*i_CTRL-Z*
  128. However, when <Esc> is used inside a mapping, it behaves like
  129. 'insertmode' was not set.  This was done to be able to use the same
  130. mappings with 'insertmode' set or not set.
  131. When executing commands with |:normal| 'insertmode' is not used.

  132. NOTE: This option is reset when 'compatible' is set.

  133. *'isfname'* *'isf'*
  134. 'isfname' 'isf'string(default for MS-DOS, Win32 and OS/2:
  135.      "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
  136.     for AMIGA: "@,48-57,/,.,-,_,+,,,$,:"
  137.     for VMS: "@,48-57,/,.,-,_,+,,,#,$,%,<,>,[,],:,;,~"
  138.     for OS/390: "@,240-249,/,.,-,_,+,,,#,$,%,~,="
  139.     otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
  140. global
  141. {not in Vi}
  142. The characters specified by this option are included in file names and
  143. path names.  Filenames are used for commands like "gf", "[i" and in
  144. the tags file.It is also used for "\f" in a |pattern|.
  145. Multi-byte characters 256 and above are always included, only the
  146. characters up to 255 are specified with this option.
  147. For UTF-8 the characters 0xa0 to 0xff are included as well.

  148. Note that on systems using a backslash as path separator, Vim tries to
  149. do its best to make it work as you would expect.  That is a bit
  150. tricky, since Vi originally used the backslash to escape special
  151. characters.  Vim will not remove a backslash in front of a normal file
  152. name character on these systems, but it will on Unix and alikes.  The
  153. '&' and '^' are not included by default, because these are special for
  154. cmd.exe.

  155. The format of this option is a list of parts, separated with commas.
  156. Each part can be a single character number or a range.A range is two
  157. character numbers with '-' in between.A character number can be a
  158. decimal number between 0 and 255 or the ASCII character itself (does
  159. not work for digits).  Example:
  160. "_,-,128-140,#-43"(include '_' and '-' and the range
  161. 128 to 140 and '#' to 43)
  162. If a part starts with '^', the following character number or range
  163. will be excluded from the option.  The option is interpreted from left
  164. to right.  Put the excluded character after the range where it is
  165. included.  To include '^' itself use it as the last character of the
  166. option or the end of a range.  Example:
  167. "^a-z,#,^"(exclude 'a' to 'z', include '#' and '^')
  168. If the character is '@', all characters where isalpha() returns TRUE
  169. are included.  Normally these are the characters a to z and A to Z,
  170. plus accented characters.  To include '@' itself use "@-@".  Examples:
  171. "@,^a-z"All alphabetic characters, excluding lower
  172. case letters.
  173. "a-z,A-Z,@-@"All letters plus the '@' character.
  174. A comma can be included by using it where a character number is
  175. expected.  Example:
  176. "48-57,,,_"Digits, comma and underscore.
  177. A comma can be excluded by prepending a '^'.  Example:
  178. " -~,^,,9"All characters from space to '~', excluding
  179. comma, plus <Tab>.
  180. See |option-backslash| about including spaces and backslashes.

  181. *'isident'* *'isi'*
  182. 'isident' 'isi'string(default for MS-DOS, Win32 and OS/2:
  183.    "@,48-57,_,128-167,224-235"
  184. otherwise: "@,48-57,_,192-255")
  185. global
  186. {not in Vi}
  187. The characters given by this option are included in identifiers.
  188. Identifiers are used in recognizing environment variables and after a
  189. match of the 'define' option.  It is also used for "\i" in a
  190. |pattern|. See 'isfname' for a description of the format of this
  191. option.
  192. Careful: If you change this option, it might break expanding
  193. environment variables.E.g., when '/' is included and Vim tries to
  194. expand "$HOME/.viminfo".  Maybe you should change 'iskeyword' instead.

  195. *'iskeyword'* *'isk'*
  196. 'iskeyword' 'isk'string (Vim default for MS-DOS and Win32:
  197.     "@,48-57,_,128-167,224-235"
  198.    otherwise:  "@,48-57,_,192-255"
  199. Vi default: "@,48-57,_")
  200. local to buffer
  201. {not in Vi}
  202. Keywords are used in searching and recognizing with many commands:
  203. "w", "*", "[i", etc.  It is also used for "\k" in a |pattern|.See
  204. 'isfname' for a description of the format of this option.  For C
  205. programs you could use "a-z,A-Z,48-57,_,.,-,>".
  206. For a help file it is set to all non-blank printable characters except
  207. '*', '"' and '|' (so that CTRL-] on a command finds the help for that
  208. command).
  209. When the 'lisp' option is on the '-' character is always included.
  210. NOTE: This option is set to the Vi default value when 'compatible' is
  211. set and to the Vim default value when 'compatible' is reset.

  212. *'isprint'* *'isp'*
  213. 'isprint' 'isp'string(default for MS-DOS, Win32, OS/2 and Macintosh:
  214. "@,~-255"; otherwise: "@,161-255")
  215. global
  216. {not in Vi}
  217. The characters given by this option are displayed directly on the
  218. screen.  It is also used for "\p" in a |pattern|.  The characters from
  219. space (ascii 32) to '~' (ascii 126) are always displayed directly,
  220. even when they are not included in 'isprint' or excluded.  See
  221. 'isfname' for a description of the format of this option.

  222. Non-printable characters are displayed with two characters:
  223.   0 -  31"^@" - "^_"
  224. 32 - 126always single characters
  225.    127"^?"
  226. 128 - 159"~@" - "~_"
  227. 160 - 254"| " - "|~"
  228.    255"~?"
  229. When 'encoding' is a Unicode one, illegal bytes from 128 to 255 are
  230. displayed as <xx>, with the hexadecimal value of the byte.
  231. When 'display' contains "uhex" all unprintable characters are
  232. displayed as <xx>.
  233. The NonText highlighting will be used for unprintable characters.
  234. |hl-NonText|

  235. Multi-byte characters 256 and above are always included, only the
  236. characters up to 255 are specified with this option.  When a character
  237. is printable but it is not available in the current font, a
  238. replacement character will be shown.
  239. Unprintable and zero-width Unicode characters are displayed as <xxxx>.
  240. There is no option to specify these characters.

  241. *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'*
  242. 'joinspaces' 'js'boolean(default on)
  243. global
  244. {not in Vi}
  245. Insert two spaces after a '.', '?' and '!' with a join command.
  246. When 'cpoptions' includes the 'j' flag, only do this after a '.'.
  247. Otherwise only one space is inserted.
  248. NOTE: This option is set when 'compatible' is set.

  249. *'key'*
  250. 'key'string(default "")
  251. local to buffer
  252. {not in Vi}
  253. The key that is used for encrypting and decrypting the current buffer.
  254. See |encryption|.
  255. Careful: Do not set the key value by hand, someone might see the typed
  256. key.  Use the |:X| command.  But you can make 'key' empty:
  257. :set key=
  258. It is not possible to get the value of this option with ":set key" or
  259. "echo &key".  This is to avoid showing it to someone who shouldn't
  260. know.  It also means you cannot see it yourself once you have set it,
  261. be careful not to make a typing error!

  262. *'keymap'* *'kmp'* *E544*
  263. 'keymap' 'kmp'string(default "")
  264. local to buffer
  265. {not in Vi}
  266. {only available when compiled with the |+keymap|
  267. feature}
  268. Name of a keyboard mapping.  See |mbyte-keymap|.
  269. Setting this option to a valid keymap name has the side effect of
  270. setting 'iminsert' to one, so that the keymap becomes effective.
  271. 'imsearch' is also set to one, unless it was -1

  272. *'keymodel'* *'km'*
  273. 'keymodel' 'km'string(default "")
  274. global
  275. {not in Vi}
  276. List of comma separated words, which enable special things that keys
  277. can do.  These values can be used:
  278.    startselUsing a shifted special key starts selection (either
  279. Select mode or Visual mode, depending on "key" being
  280. present in 'selectmode').
  281.    stopselUsing a not-shifted special key stops selection.
  282. Special keys in this context are the cursor keys, <End>, <Home>,
  283. <PageUp> and <PageDown>.
  284. The 'keymodel' option is set by the |:behave| command.

  285. *'keywordprg'* *'kp'*
  286. 'keywordprg' 'kp'string(default "man" or "man -s",  DOS: ":help",
  287. OS/2: "view /", VMS: "help")
  288. global or local to buffer |global-local|
  289. {not in Vi}
  290. Program to use for the |K| command.  Environment variables are
  291. expanded |:set_env|.  ":help" may be used to access the Vim internal
  292. help.  (Note that previously setting the global option to the empty
  293. value did this, which is now deprecated.)
  294. When "man" is used, Vim will automatically translate a count for the
  295. "K" command to a section number.  Also for "man -s", in which case the
  296. "-s" is removed when there is no count.
  297. See |option-backslash| about including spaces and backslashes.
  298. Example:
  299. :set keywordprg=man\ -s
  300. This option cannot be set from a |modeline|, for security reasons.

  301. *'langmap'* *'lmap'* *E357* *E358*
  302. 'langmap' 'lmap'string(default "")
  303. global
  304. {not in Vi}
  305. {only available when compiled with the |+langmap|
  306. feature}
  307. This option allows switching your keyboard into a special language
  308. mode.When you are typing text in Insert mode the characters are
  309. inserted directly.  When in command mode the 'langmap' option takes
  310. care of translating these special characters to the original meaning
  311. of the key.  This means you don't have to change the keyboard mode to
  312. be able to execute Normal mode commands.
  313. This is the opposite of the 'keymap' option, where characters are
  314. mapped in Insert mode.
  315. This only works for 8-bit characters.  The value of 'langmap' may be
  316. specified with multi-byte characters (e.g., UTF-8), but only the lower
  317. 8 bits of each character will be used.

  318. Example (for Greek):*greek*
  319.     :set langmap=罙,翨,谻,腄,臙,諪,肎,荋,蒊,蜫,蔏,薒,蘉,蚇,螼,蠵,QQ,裄,覵,訲,萓,賄,WW,譞,誝,芞,醓,鈈,鴆,鋎,錯,鰂,鉭,鏷,閕,頹,阫,雔,靘,韓,飋,餻,qq,駌,髎,魌,鑥,鵹,騱,鱴,鮵,鎧
  320. <Example (exchanges meaning of z and y for commands):
  321.     :set langmap=zy,yz,ZY,YZ

  322. The 'langmap' option is a list of parts, separated with commas.  Each
  323. part can be in one of two forms:
  324. 1.  A list of pairs.  Each pair is a "from" character immediately
  325.     followed by the "to" character.  Examples: "aA", "aAbBcC".
  326. 2.  A list of "from" characters, a semi-colon and a list of "to"
  327.     characters.  Example: "abc;ABC"
  328. Example: "aA,fgh;FGH,cCdDeE"
  329. Special characters need to be preceded with a backslash.  These are
  330. ";", ',' and backslash itself.

  331. This will allow you to activate vim actions without having to switch
  332. back and forth between the languages.  Your language characters will
  333. be understood as normal vim English characters (according to the
  334. langmap mappings) in the following cases:
  335. o Normal/Visual mode (commands, buffer/register names, user mappings)
  336. o Insert/Replace Mode: Register names after CTRL-R
  337. o Insert/Replace Mode: Mappings
  338. Characters entered in Command-line mode will NOT be affected by
  339. this option.   Note that this option can be changed at any time
  340. allowing to switch between mappings for different languages/encodings.
  341. Use a mapping to avoid having to type it each time!

  342. *'langmenu'* *'lm'*
  343. 'langmenu' 'lm'string(default "")
  344. global
  345. {not in Vi}
  346. {only available when compiled with the |+menu| and
  347. |+multi_lang| features}
  348. Language to use for menu translation.  Tells which file is loaded
  349. from the "lang" directory in 'runtimepath':
  350. "lang/menu_" . &langmenu . ".vim"
  351. (without the spaces).  For example, to always use the Dutch menus, no
  352. matter what $LANG is set to:
  353. :set langmenu=nl_NL.ISO_8859-1
  354. When 'langmenu' is empty, |v:lang| is used.
  355. If your $LANG is set to a non-English language but you do want to use
  356. the English menus:
  357. :set langmenu=none
  358. This option must be set before loading menus, switching on filetype
  359. detection or syntax highlighting.  Once the menus are defined setting
  360. this option has no effect.  But you could do this:
  361. :source $VIMRUNTIME/delmenu.vim
  362. :set langmenu=de_DE.ISO_8859-1
  363. :source $VIMRUNTIME/menu.vim
  364. Warning: This deletes all menus that you defined yourself!

  365. *'laststatus'* *'ls'*
  366. 'laststatus' 'ls'number(default 1)
  367. global
  368. {not in Vi}
  369. The value of this option influences when the last window will have a
  370. status line:
  371. 0: never
  372. 1: only if there are at least two windows
  373. 2: always
  374. The screen looks nicer with a status line if you have several
  375. windows, but it takes another screen line. |status-line|

  376. *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
  377. 'lazyredraw' 'lz'boolean(default off)
  378. global
  379. {not in Vi}
  380. When this option is set, the screen will not be redrawn while
  381. executing macros, registers and other commands that have not been
  382. typed.To force an update use |:redraw|.

  383. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'*
  384. 'linebreak' 'lbr'boolean(default off)
  385. local to window
  386. {not in Vi}
  387. {not available when compiled without the  |+linebreak|
  388. feature}
  389. If on Vim will wrap long lines at a character in 'breakat' rather
  390. than at the last character that fits on the screen.  Unlike
  391. 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
  392. it only affects the way the file is displayed, not its contents.  The
  393. value of 'showbreak' is used to put in front of wrapped lines.This
  394. option is not used when the 'wrap' option is off or 'list' is on.
  395. Note that <Tab> characters after an <EOL> are mostly not displayed
  396. with the right amount of white space.

  397. *'lines'* *E593*
  398. 'lines'number(default 24 or terminal height)
  399. global
  400. Number of lines in the display.  Normally you don't need to set this.
  401. That is done automatically by the terminal initialization code.
  402. When Vim is running in the GUI or in a resizable window, setting this
  403. option will cause the window size to be changed.  When you only want
  404. to use the size for the GUI, put the command in your |gvimrc| file.
  405. When you set this option and Vim is unable to change the physical
  406. number of lines of the display, the display may be messed up.

  407. *'linespace'* *'lsp'*
  408. 'linespace' 'lsp'number(default 0, 1 for Win32 GUI)
  409. global
  410. {not in Vi}
  411. {only in the GUI}
  412. Number of pixel lines inserted between characters.  Useful if the font
  413. uses the full character cell height, making lines touch each other.
  414. When non-zero there is room for underlining.

  415. *'lisp'* *'nolisp'*
  416. 'lisp'boolean(default off)
  417. local to buffer
  418. {not available when compiled without the |+lispindent|
  419. feature}
  420. Lisp mode: When <Enter> is typed in insert mode set the indent for
  421. the next line to Lisp standards (well, sort of).  Also happens with
  422. "cc" or "S".  'autoindent' must also be on for this to work.  The 'p'
  423. flag in 'cpoptions' changes the method of indenting: Vi compatible or
  424. better.  Also see 'lispwords'.
  425. The '-' character is included in keyword characters.  Redefines the
  426. "=" operator to use this same indentation algorithm rather than
  427. calling an external program if 'equalprg' is empty.
  428. This option is not used when 'paste' is set.
  429. {Vi: Does it a little bit differently}

  430. *'lispwords'* *'lw'*
  431. 'lispwords' 'lw'string(default is very long)
  432. global
  433. {not in Vi}
  434. {not available when compiled without the |+lispindent|
  435. feature}
  436. Comma separated list of words that influence the Lisp indenting.
  437. |'lisp'|

  438. *'list'* *'nolist'*
  439. 'list'boolean(default off)
  440. local to window
  441. List mode: Show tabs as CTRL-I, show end of line with $.  Useful to
  442. see the difference between tabs and spaces and for trailing blanks.
  443. Note that this will also affect formatting (set with 'textwidth' or
  444. 'wrapmargin') when 'cpoptions' includes 'L'.  See 'listchars' for
  445. changing the way tabs are displayed.

  446. *'listchars'* *'lcs'*
  447. 'listchars' 'lcs'string(default "eol:$")
  448. global
  449. {not in Vi}
  450. Strings to use in 'list' mode.It is a comma separated list of string
  451. settings.
  452.   eol:cCharacter to show at the end of each line.  When
  453. omitted, there is no extra character at the end of the
  454. line.
  455.   tab:xyTwo characters to be used to show a Tab.  The first
  456. char is used once.  The second char is repeated to
  457. fill the space that the Tab normally occupies.
  458. "tab:>-" will show a Tab that takes four spaces as
  459. ">---".  When omitted, a Tab is show as ^I.
  460.   trail:cCharacter to show for trailing spaces.When omitted,
  461. trailing spaces are blank.
  462.   extends:cCharacter to show in the last column, when 'wrap' is
  463. off and the line continues beyond the right of the
  464. screen.
  465.   precedes:cCharacter to show in the first column, when 'wrap'
  466. is off and there is text preceeding the character
  467. visible in the first column.

  468. The characters ':' and ',' should not be used.UTF-8 characters can
  469. be used when 'encoding' is "utf-8", otherwise only printable
  470. characters are allowed.

  471. Examples:
  472.     :set lcs=tab:>-,trail:-
  473.     :set lcs=tab:>-,eol:<
  474.     :set lcs=extends:>,precedes:<
  475. The "NonText" highlighting will be used for "eol", "extends" and
  476. "precedes".  "SpecialKey" for "tab" and "trail".

  477. *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
  478. 'loadplugins' 'lpl'boolean(default on)
  479. global
  480. {not in Vi}
  481. When on the plugin scripts are loaded when starting up |load-plugins|.
  482. This option can be reset in your |vimrc| file to disable the loading
  483. of plugins.
  484. Note that using the "-u NONE" and "--noplugin" command line arguments
  485. reset this option. |-u| |--noplugin|

  486. *'magic'* *'nomagic'*
  487. 'magic'boolean(default on)
  488. global
  489. Changes the special characters that can be used in search patterns.
  490. See |pattern|.
  491. NOTE: To avoid portability problems with using patterns, always keep
  492. this option at the default "on".  Only switch it off when working with
  493. old Vi scripts.  In any other situation write patterns that work when
  494. 'magic' is on.

  495. *'makeef'* *'mef'*
  496. 'makeef' 'mef'string(default: "")
  497. global
  498. {not in Vi}
  499. {not available when compiled without the |+quickfix|
  500. feature}
  501. Name of the errorfile for the |:make| command (see |:make_makeprg|)
  502. and the |:grep| command.
  503. When it is empty, an internally generated temp file will be used.
  504. When "##" is included, it is replaced by a number to make the name
  505. unique.  This makes sure that the ":make" command doesn't overwrite an
  506. existing file.
  507. NOT used for the ":cf" command.  See 'errorfile' for that.
  508. Environment variables are expanded |:set_env|.
  509. See |option-backslash| about including spaces and backslashes.
  510. This option cannot be set from a |modeline|, for security reasons.

  511. *'makeprg'* *'mp'*
  512. 'makeprg' 'mp'string(default "make", VMS: "MMS")
  513. global or local to buffer |global-local|
  514. {not in Vi}
  515. Program to use for the ":make" command.  See |:make_makeprg|.  This
  516. option may contain '%' and '#' characters, which are expanded like
  517. when used in a command-line.  Environment variables are expanded
  518. |:set_env|.  See |option-backslash| about including spaces and
  519. backslashes.  Note that a '|' must be escaped twice: once for ":set"
  520. and once for the interpretation of a command.  When you use a filter
  521. called "myfilter" do it like this:
  522.     :set makeprg=gmake\ \\\|\ myfilter
  523. The placeholder "$*" can be given (even multiple times) to specify
  524. where the arguments will be included, for example:
  525.     :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
  526. This option cannot be set from a |modeline|, for security reasons.

  527. *'matchpairs'* *'mps'*
  528. 'matchpairs' 'mps'string(default "(:),{:},[:]")
  529. local to buffer
  530. {not in Vi}
  531. Characters that form pairs.  The |%| command jumps from one to the
  532. other.Currently only single character pairs are allowed, and they
  533. must be different.  The characters must be separated by a colon.  The
  534. pairs must be separated by a comma.  Example for including '<' and '>'
  535. (HTML):
  536. :set mps+=<:>

  537. A more exotic example, to jump between the '=' and ';' in an
  538. assignment, useful for languages like C and Java:
  539. :au FileType c,cpp,java set mps+==:;

  540. For a more advanced way of using "%", see the matchit.vim plugin in
  541. the $VIMRUNTIME/macros directory. |add-local-help|

  542. *'matchtime'* *'mat'*
  543. 'matchtime' 'mat'number(default 5)
  544. global
  545. {not in Vi}{in Nvi}
  546. Tenths of a second to show the matching paren, when 'showmatch' is
  547. set.  Note that this is not in milliseconds, like other options that
  548. set a time.  This is to be compatible with Nvi.

  549. *'maxfuncdepth'* *'mfd'*
  550. 'maxfuncdepth' 'mfd'number(default 100)
  551. global
  552. {not in Vi}
  553. Maximum depth of function calls for user functions.  This normally
  554. catches endless recursion.  When using a recursive function with
  555. more depth, set 'maxfuncdepth' to a bigger number.  But this will use
  556. more memory, there is the danger of failing when memory is exhausted.
  557. See also |:function|.

  558. *'maxmapdepth'* *'mmd'* *E223*
  559. 'maxmapdepth' 'mmd'number(default 1000)
  560. global
  561. {not in Vi}
  562. Maximum number of times a mapping is done without resulting in a
  563. character to be used.  This normally catches endless mappings, like
  564. ":map x y" with ":map y x".  It still does not catch ":map g wg",
  565. because the 'w' is used before the next mapping is done.  See also
  566. |key-mapping|.

  567. *'maxmem'* *'mm'*
  568. 'maxmem' 'mm'number(default between 256 to 5120 (system
  569. dependent) or half the amount of memory
  570. available)
  571. global
  572. {not in Vi}
  573. Maximum amount of memory (in Kbyte) to use for one buffer.  When this
  574. limit is reached allocating extra memory for a buffer will cause
  575. other memory to be freed.  Maximum value 2000000.  Use this to work
  576. without a limit.  Also see 'maxmemtot'.

  577. *'maxmemtot'* *'mmt'*
  578. 'maxmemtot' 'mmt'number(default between 2048 and 10240 (system
  579. dependent) or half the amount of memory
  580. available)
  581. global
  582. {not in Vi}
  583. Maximum amount of memory (in Kbyte) to use for all buffers together.
  584. Maximum value 2000000.Use this to work without a limit.  Also see
  585. 'maxmem'.

  586. *'menuitems'* *'mis'*
  587. 'menuitems' 'mis'number(default 25)
  588. global
  589. {not in Vi}
  590. {not available when compiled without the |+menu|
  591. feature}
  592. Maximum number of items to use in a menu.  Used for menus that are
  593. generated from a list of items, e.g., the Buffers menu.  Changing this
  594. option has no direct effect, the menu must be refreshed first.

  595.    *'modeline'* *'ml'* *'nomodeline'* *'noml'*
  596. 'modeline' 'ml'boolean(Vim default: on, Vi default: off)
  597. local to buffer
  598. *'modelines'* *'mls'*
  599. 'modelines' 'mls'number(default 5)
  600. global
  601. {not in Vi}
  602. If 'modeline' is on 'modelines' gives the number of lines that is
  603. checked for set commands.  If 'modeline' is off or 'modelines' is zero
  604. no lines are checked.  See |modeline|.
  605. NOTE: 'modeline' is set to the Vi default value when 'compatible' is
  606. set and to the Vim default value when 'compatible' is reset.

  607. *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
  608. 'modifiable' 'ma'boolean(default on)
  609. local to buffer
  610. {not in Vi}*E21*
  611. When off the buffer contents cannot be changed.  The 'fileformat' and
  612. 'fileencoding' options also can't be changed.
  613. Can be reset with the |-M| command line argument.

  614. *'modified'* *'mod'* *'nomodified'* *'nomod'*
  615. 'modified' 'mod'boolean(default off)
  616. local to buffer
  617. {not in Vi}
  618. When on, the buffer is considered to be modified.  This option is set
  619. when:
  620. 1. A change was made to the text since it was last written.  Using the
  621.    |undo| command to go back to the original text will reset the
  622.    option.  But undoing changes that were made before writing the
  623.    buffer will set the option again, since the text is different from
  624.    when it was written.
  625. 2. 'fileformat' or 'fileencoding' is different from its original
  626.    value.  The original value is set when the buffer is read or
  627.    written.  A ":set nomodified" command also resets the original
  628.    values to the current values and the 'modified' option will be
  629.    reset.
  630. When 'buftype' is "nowrite" or "nofile" this option may be set, but
  631. will be ignored.

  632. *'more'* *'nomore'*
  633. 'more'boolean(Vim default: on, Vi default: off)
  634. global
  635. {not in Vi}
  636. When on, listings pause when the whole screen is filled.  You will get
  637. the |more-prompt|.  When this option is off there are no pauses, the
  638. listing continues until finished.
  639. NOTE: This option is set to the Vi default value when 'compatible' is
  640. set and to the Vim default value when 'compatible' is reset.

  641. *'mouse'* *E538*
  642. 'mouse'string(default "", "a" for GUI, MS-DOS and Win32)
  643. global
  644. {not in Vi}
  645. Enable the use of the mouse.  Only works for certain terminals
  646. (xterm, MS-DOS, Win32 |win32-mouse|, qnx pterm, and Linux console
  647. with gpm).  For using the mouse in the GUI, see |gui-mouse|.
  648. The mouse can be enabled for different modes:
  649. nNormal mode
  650. vVisual mode
  651. iInsert mode
  652. cCommand-line mode
  653. hall previous modes when editing a help file
  654. aall previous modes
  655. rfor |hit-enter| and |more-prompt| prompt
  656. Aauto-select in Visual mode
  657. Normally you would enable the mouse in all four modes with:
  658. :set mouse=a
  659. When the mouse is not enabled, the GUI will still use the mouse for
  660. modeless selection.  This doesn't move the text cursor.

  661. See |mouse-using|.  Also see |'clipboard'|.

  662. Note: When enabling the mouse in a terminal, copy/paste will use the
  663. "* register if there is access to an X-server.The xterm handling of
  664. the mouse buttons can still be used by keeping the shift key pressed.
  665. Also see the 'clipboard' option.

  666. *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
  667. 'mousefocus' 'mousef'boolean(default off)
  668. global
  669. {not in Vi}
  670. {only works in the GUI}
  671. The window that the mouse pointer is on is automatically activated.
  672. When changing the window layout or window focus in another way, the
  673. mouse pointer is moved to the window with keyboard focus.  Off is the
  674. default because it makes using the pull down menus a little goofy, as
  675. a pointer transit may activate a window unintentionally.

  676. *'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
  677. 'mousehide' 'mh'boolean(default on)
  678. global
  679. {not in Vi}
  680. {only works in the GUI}
  681. When on, the mouse pointer is hidden when characters are typed.
  682. The mouse pointer is restored when the mouse is moved.

  683. *'mousemodel'* *'mousem'*
  684. 'mousemodel' 'mousem'string(default "extend", "popup" for MS-DOS and Win32)
  685. global
  686. {not in Vi}
  687. Sets the model to use for the mouse.  The name mostly specifies what
  688. the right mouse button is used for:
  689.    extendRight mouse button extends a selection.  This works
  690. like in an xterm.
  691.    popupRight mouse button pops up a menu.  The shifted left
  692. mouse button extends a selection.  This works like
  693. with Microsoft Windows
  694.    popup_setpos Like "popup", but the cursor will be moved to the
  695. position where the mouse was clicked, and thus the
  696. selected operation will act upon the clicked object.
  697. If clicking inside a selection, that selection will
  698. be acted upon, ie. no cursor move.  This implies of
  699. course, that right clicking outside a selection will
  700. end Visual mode.
  701. Overview of what button does what for each model:
  702. mouse    extendpopup(_setpos)
  703. left click    place cursorplace cursor
  704. left drag    start selectionstart selection
  705. shift-left    search wordextend selection
  706. right click    extend selectionpopup menu (place cursor)
  707. right drag    extend selection-
  708. middle click    pastepaste

  709. In the "popup" model the right mouse button produces a pop-up menu.
  710. You need to define this first, see |popup-menu|.

  711. Note that you can further refine the meaning of buttons with mappings.
  712. See |gui-mouse-mapping|.  But mappings are NOT used for modeless
  713. selection (because that's handled in the GUI code directly).

  714. The 'mousemodel' option is set by the |:behave| command.

  715. *'mouseshape'* *'mouses'* *E547*
  716. 'mouseshape' 'mouses'string(default "i:beam,r:beam,s:updown,sd:cross,
  717. m:no,ml:up-arrow,v:rightup-arrow"
  718. global
  719. {not in Vi}
  720. {only available when compiled with the |+mouseshape|
  721. feature}
  722. This option tells Vim what the mouse pointer should look like in
  723. different modes.  The option is a comma separated list of parts, much
  724. like used for 'guicursor'.  Each part consist of a mode/location-list
  725. and an argument-list:
  726. mode-list:shape,mode-list:shape,..
  727. The mode-list is a dash separated list of these modes/locations:
  728. In a normal window:
  729. nNormal mode
  730. vVisual mode
  731. veVisual mode with 'selection' "exclusive" (same as 'v',
  732. if not specified)
  733. oOperator-pending mode
  734. iInsert mode
  735. rReplace mode

  736. Others:
  737. cappending to the command-line
  738. ciinserting in the command-line
  739. crreplacing in the command-line
  740. mat the 'Hit ENTER' or 'More' prompts
  741. mlidem, but cursor in the last line
  742. eany mode, pointer below last window
  743. sany mode, pointer on a status line
  744. sdany mode, while dragging a status line
  745. vsany mode, pointer on a vertical separator line
  746. vdany mode, while dragging a vertical separator line
  747. aeverywhere

  748. The shape is one of the following:
  749. availnamelooks like
  750. w xarrowNormal mouse pointer
  751. w xblankno pointer at all (use with care!)
  752. w xbeamI-beam
  753. w xupdownup-down sizing arrows
  754. w xleftrightleft-right sizing arrows
  755. w xbusyThe system's usual busy pointer
  756. w xnoThe system's usual 'no input' pointer
  757.   xudsizingindicates up-down resizing
  758.   xlrsizingindicates left-right resizing
  759.   xcrosshairlike a big thin +
  760.   xhand1black hand
  761.   xhand2white hand
  762.   xpencilwhat you write with
  763.   xquestionbig ?
  764.   xrightup-arrowarrow pointing right-up
  765. w xup-arrowarrow pointing up
  766.   x<number>any X11 pointer number (see X11/cursorfont.h)

  767. The "avail" column contains a 'w' if the shape is available for Win32,
  768. x for X11.
  769. Any modes not specifed or shapes not available use the normal mouse
  770. pointer.

  771. Example:
  772. :set mouseshape=s:udsizing,m:no
  773. will make the mouse turn to a sizing arrow over the status lines and
  774. indicate no input when the hit-enter prompt is displayed (since
  775. clicking the mouse has no effect in this state.)

  776. *'mousetime'* *'mouset'*
  777. 'mousetime' 'mouset'number(default 500)
  778. global
  779. {not in Vi}
  780. Only for GUI, MS-DOS, Win32 and Unix with xterm.  Defines the maximum
  781. time in msec between two mouse clicks for the second click to be
  782. recognized as a multi click.

  783. *'nrformats'* *'nf'*
  784. 'nrformats' 'nf'string(default "octal,hex")
  785. local to buffer
  786. {not in Vi}
  787. This defines what bases Vim will consider for numbers when using the
  788. CTRL-A and CTRL-X commands for adding to and subtracting from a number
  789. respectively; see |CTRL-A| for more info on these commands.
  790. alphaif included, single alphabetical characters will be
  791. incremented or decremented.  This is useful for a list with a
  792. letter index a), b), etc.
  793. octalif included, numbers that start with a zero will be considered
  794. to be octal.  Example: Using CTRL-A on "007" results in "010".
  795. hexif included, numbers starting with "0x" or "0X" will be
  796. considered to be hexadecimal.  Example: Using CTRL-X on
  797. "0x100" results in "0x0ff".
  798. Numbers which simply begin with a digit in the range 1-9 are always
  799. considered decimal.  This also happens for numbers that are not
  800. recognized as octal or hex.

  801. *'number'* *'nu'* *'nonumber'* *'nonu'*
  802. 'number' 'nu'boolean(default off)
  803. local to window
  804. Print the line number in front of each line.  When the 'n' option is
  805. excluded from 'cpoptions' a wrapped line will not use the column of
  806. line numbers (this is the default when 'compatible' isn't set).
  807. When a long, wrapped line doesn't start with the first character, '-'
  808. characters are put before the number.
  809. See |hl-LineNr| for the highlighting used for the number.

  810. *'osfiletype'* *'oft'* *E366*
  811. 'osfiletype' 'oft'string (RISC-OS default: "Text",
  812. others default: "")
  813. local to buffer
  814. {not in Vi}
  815. {only available when compiled with the |+osfiletype|
  816. feature}
  817. Some operating systems store extra information about files besides
  818. name, datestamp and permissions.  This option contains the extra
  819. information, the nature of which will vary between systems.
  820. The value of this option is usually set when the file is loaded, and
  821. use to set the file type when file is written.
  822. It can affect the pattern matching of the automatic commands.
  823. |autocmd-osfiletypes|

  824. *'paragraphs'* *'para'*
  825. 'paragraphs' 'para'string(default "IPLPPPQPP LIpplpipbp")
  826. global
  827. Specifies the nroff macros that separate paragraphs.  These are pairs
  828. of two letters (see |object-motions|).

  829. *'paste'* *'nopaste'*
  830. 'paste'boolean(default off)
  831. global
  832. {not in Vi}
  833. Put Vim in Paste mode.This is useful if you want to cut or copy
  834. some text from one window and paste it in Vim.This will avoid
  835. unexpected effects.
  836. Setting this option is useful when using Vim in a terminal, where Vim
  837. cannot distinguish between typed text and pasted text.In the GUI, Vim
  838. knows about pasting and will mostly do the right thing without 'paste'
  839. being set.  The same is true for a terminal where Vim handles the
  840. mouse clicks itself.
  841. When the 'paste' option is switched on (also when it was already on):
  842. - mapping in Insert mode and Command-line mode is disabled
  843. - abbreviations are disabled
  844. - 'textwidth' is set to 0
  845. - 'wrapmargin' is set to 0
  846. - 'autoindent' is reset
  847. - 'smartindent' is reset
  848. - 'softtabstop' is set to 0
  849. - 'revins' is reset
  850. - 'ruler' is reset
  851. - 'showmatch' is reset
  852. - 'formatoptions' is used like it is empty
  853. These options keep their value, but their effect is disabled:
  854. - 'lisp'
  855. - 'indentexpr'
  856. - 'cindent'
  857. NOTE: When you start editing another file while the 'paste' option is
  858. on, settings from the modelines or autocommands may change the
  859. settings again, causing trouble when pasting text.  You might want to
  860. set the 'paste' option again.
  861. When the 'paste' option is reset the mentioned options are restored to
  862. the value before the moment 'paste' was switched from off to on.
  863. Resetting 'paste' before ever setting it does not have any effect.
  864. Since mapping doesn't work while 'paste' is active, you need to use
  865. the 'pastetoggle' option to toggle the 'paste' option with some key.

  866. *'pastetoggle'* *'pt'*
  867. 'pastetoggle' 'pt'string(default "")
  868. global
  869. {not in Vi}
  870. When non-empty, specifies the key sequence that toggles the 'paste'
  871. option.  This is like specifying a mapping:
  872.     :map {keys} :set invpaste<CR>
  873. Where {keys} is the value of 'pastetoggle'.
  874. The difference is that it will work even when 'paste' is set.
  875. 'pastetoggle' works in Insert mode and Normal mode, but not in
  876. Command-line mode.
  877. Mappings are checked first, thus overrule 'pastetoggle'.  However,
  878. when 'paste' is on mappings are ignored in Insert mode, thus you can do
  879. this:
  880.     :map <F10> :set paste<CR>
  881.     :map <F11> :set nopaste<CR>
  882.     :imap <F10> <C-O>:set paste<CR>
  883.     :imap <F11> <nop>
  884.     :set pastetoggle=<F11>
  885. This will make <F10> start paste mode and <F11> stop paste mode.
  886. Note that typing <F10> in paste mode inserts "<F10>", since in paste
  887. mode everything is inserted literally, except the 'pastetoggle' key
  888. sequence.

  889. *'pex'* *'patchexpr'*
  890. 'patchexpr' 'pex'string(default "")
  891. global
  892. {not in Vi}
  893. {not available when compiled without the |+diff|
  894. feature}
  895. Expression which is evaluated to apply a patch to a file and generate
  896. the resulting new version of the file.See |diff-patchexpr|.

  897. *'patchmode'* *'pm'* *E206*
  898. 'patchmode' 'pm'string(default "")
  899. global
  900. {not in Vi}
  901. When non-empty the oldest version of a file is kept.  This can be used
  902. to keep the original version of a file if you are changing files in a
  903. source distribution.  Only the first time that a file is written a
  904. copy of the original file will be kept.  The name of the copy is the
  905. name of the original file with the string in the 'patchmode' option
  906. appended.  This option should start with a dot.  Use a string like
  907. ".org".  'backupdir' must not be empty for this to work (Detail: The
  908. backup file is renamed to the patchmode file after the new file has
  909. been successfully written, that's why it must be possible to write a
  910. backup file).  If there was no file to be backed up, an empty file is
  911. created.
  912. When the 'backupskip' pattern matches, a patchmode file is not made.
  913. Using 'patchmode' for compressed files appends the extension at the
  914. end (e.g., "file.gz.orig"), thus the resulting name isn't always
  915. recognized as a compressed file.

  916. *'path'* *'pa'* *E343* *E345* *E347*
  917. 'path' 'pa'string(default on Unix: ".,/usr/include,,"
  918.    on OS/2:  ".,/emx/include,,"
  919.    other systems: ".,,")
  920. global or local to buffer |global-local|
  921. {not in Vi}
  922. This is a list of directories which will be searched when using the
  923. |gf|, [f, ]f, ^Wf, |:find| and other commands, provided that the file
  924. being searched for has a relative path (not starting with '/').  The
  925. directories in the 'path' option may be relative or absolute.
  926. - Use commas to separate directory names:
  927. :set path=.,/usr/local/include,/usr/include
  928. - Spaces can also be used to separate directory names (for backwards
  929.   compatibility with version 3.0).  To have a space in a directory
  930.   name, precede it with an extra backslash, and escape the space:
  931. :set path=.,/dir/with\\\ space
  932. - To include a comma in a directory name precede it with an extra
  933.   backslash:
  934. :set path=.,/dir/with\\,comma
  935. <- To search relative to the directory of the current file, use:
  936. :set path=.
  937. - To search in the current directory use an empty string between two
  938.   commas:
  939. :set path=,,
  940. - A directory name may end in a ':' or '/'.
  941. - Environment variables are expanded |:set_env|.
  942. - When using |netrw.vim| URLs can be used.  For example, adding
  943.   "http://www.vim.org" will make ":find index.html" work.
  944. - Search upwards and downwards in a directory tree:
  945.   1) "*" matches a sequence of characters, e.g.:
  946. :set path=/usr/include/*
  947.      means all subdirectories in /usr/include (but not /usr/include
  948.      itself).
  949. :set path=/usr/*c
  950.      matches /usr/doc and /usr/src.
  951.   2) "**" matches a subtree, up to 100 directories deep.  Example:
  952. :set path=/home/user_x/src/**
  953.      means search in the whole subtree under "/home/usr_x/src".
  954.   3) If the path ends with a ';', this path is the startpoint
  955.      for upward search.
  956.   See |file-searching| for more info and exact syntax.
  957.   {not available when compiled without the |+path_extra| feature}
  958. - Careful with '\' characters, type two to get one in the option:
  959. :set path=.,c:\\include
  960. <  Or just use '/' instead:
  961. :set path=.,c:/include
  962. Don't forget "." or files won't even be found in the same directory as
  963. the file!
  964. The maximum length is limited.How much depends on the system, mostly
  965. it is something like 256 or 1024 characters.
  966. You can check if all the include files are found, using the value of
  967. 'path', see |:checkpath|.
  968. The use of |:set+=| and |:set-=| is preferred when adding or removing
  969. directories from the list.  This avoids problems when a future version
  970. uses another default.  To remove the current directory use:
  971. :set path-=
  972. <To add the current directory use:
  973. :set path+=
  974. To use an environment variable, you probably need to replace the
  975. separator.  Here is an example to append $INCL, in which directory
  976. names are separated with a semi-colon:
  977. :let &path = &path . "," . substitute($INCL, ';', ',', 'g')
  978. Replace the ';' with a ':' or whatever separator is used.  Note that
  979. this doesn't work when $INCL contains a comma or white space.

  980. *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
  981. 'preserveindent' 'pi'boolean(default off)
  982. local to buffer
  983. {not in Vi}
  984. When changing the indent of the current line, preserve as much of the
  985. indent structure as possible.  Normally the indent is replaced by a
  986. series of tabs followed by spaces as required (unless |'expandtab'| is
  987. enabled, in which case only spaces are used).  Enabling this option
  988. means the indent will preserve as many existing characters as possible
  989. for indenting, and only add additional tabs or spaces as required.
  990. NOTE: When using ">>" multiple times the resulting indent is a mix of
  991. tabs and spaces.  You might not like this.
  992. NOTE: 'preserveindent' is reset when 'compatible' is set.
  993. Also see 'copyindent'.
  994. Use |:retab| to clean up white space.

  995. *'previewheight'* *'pvh'*
  996. 'previewheight' 'pvh'number (default 12)
  997. global
  998. {not in Vi}
  999. {not available when compiled without the |+windows| or
  1000. |+quickfix| feature}
  1001. Default height for a preview window.  Used for |:ptag| and associated
  1002. commands.  Used for |CTRL-W_}| when no count is given.

  1003. *'previewwindow'* *'nopreviewwindow'*
  1004. *'pvw'* *'nopvw'* *E590*
  1005. 'previewwindow' 'pvw'boolean (default off)
  1006. local to window
  1007. {not in Vi}
  1008. {not available when compiled without the |+windows| or
  1009. |+quickfix| feature}
  1010. Identifies the preview window.Only one window can have this option
  1011. set.  It's normally not set directly, but by using one of the commands
  1012. |:ptag|, |:pedit|, etc.

  1013. *'printdevice'* *'pdev'*
  1014. 'printdevice' 'pdev'string(default empty)
  1015. global
  1016. {not in Vi}
  1017. {only available when compiled with the |+printer|
  1018. feature}
  1019. This defines the name of the printer to be used when the |:hardcopy|
  1020. command is issued with a bang (!) to skip the printer selection
  1021. dialog.  On Win32, it should be the printer name exactly as it appears
  1022. in the standard printer dialog.
  1023. If the option is empty, then vim will use the system default printer
  1024. for ":hardcopy!"

  1025. *'printencoding'* *'penc'* *E620*
  1026. 'printencoding' 'penc'String(default empty, except for:
  1027. Windows, OS/2: cp1252,
  1028. Macintosh: mac-roman,
  1029. VMS: dec-mcs,
  1030. HPUX: hp-roman8,
  1031. EBCDIC: ebcdic-uk)
  1032. global
  1033. {not in Vi}
  1034. {only available when compiled with the |+printer|
  1035. and |+postscript| features}
  1036. Sets the character encoding used when printing.  This option tells VIM
  1037. which print character encoding file from the "print" directory in
  1038. 'runtimepath' to use.

  1039. This option will accept any value from |encoding-names|.  Any
  1040. recognized names are converted to VIM standard names - see 'encoding'
  1041. for more details.  Names not recognized by VIM will just be converted
  1042. to lower case and underscores replaced with '-' signs.

  1043. If 'printencoding' is empty or VIM cannot find the file then it will
  1044. use 'encoding' (if VIM is compiled with |+multi_byte| and it is set an
  1045. 8-bit encoding) to find the print character encoding file.  If VIM is
  1046. unable to find a character encoding file then it will use the "latin1"
  1047. print character encoding file.

  1048. When 'encoding' is set to a multi-byte encoding, VIM will try to
  1049. convert characters to the printing encoding for printing (if
  1050. 'printencoding' is empty then the conversion will be to latin1).
  1051. Conversion to a printing encoding other than latin1 will require VIM
  1052. to be compiled with the |+iconv| feature.  If no conversion is
  1053. possible then printing will fail.  Any characters that cannot be
  1054. converted will be replaced with upside down question marks.

  1055. Four print character encoding files are provided to support default
  1056. Mac, VMS, HPUX, and EBCDIC character encodings and are used by default
  1057. on these platforms.  Code page 1252 print character encoding is used
  1058. by default on Windows and OS/2 platforms.


  1059. *'printexpr'* *'pexpr'*
  1060. 'printexpr' 'pexpr'String(default: see below)
  1061. global
  1062. {not in Vi}
  1063. {only available when compiled with the |+printer|
  1064. and |+postscript| features}
  1065. Expression that is evaluated to print the PostScript produced with
  1066. ":hardcopy".
  1067. The file name to be printed is in |v:fname_in|.
  1068. The arguments to the ":hardcopy" command are in |v:cmdarg|.
  1069. The expression must take care of deleting the file after printing it.
  1070. When there is an error, the expression must return a non-zero number.
  1071. If there is no error, return zero or an empty string.
  1072. The default for non MS-Windows or VMS systems is to simply use "lpr"
  1073. to print the file:

  1074.     system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)
  1075. . ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error

  1076. On MS-Windows machines the default is to copy the file to the
  1077. currently specified printdevice:

  1078.     system('copy' . ' ' . v:fname_in . ' "' . &printdevice . '"')
  1079. . delete(v:fname_in)

  1080. On VMS machines the default is to send the file to either the default
  1081. or currently specified printdevice:

  1082.     system('print' . (&printdevice == '' ? '' : ' /queue=' .
  1083. &printdevice) . ' ' . v:fname_in) . delete(v:fname_in)

  1084. If you change this option, using a function is an easy way to avoid
  1085. having to escape all the spaces.  Example:

  1086. :set printexpr=PrintFile(v:fname_in)
  1087. :function PrintFile(fname)
  1088. :  call system("ghostview " . a:fname)
  1089. :  call delete(a:fname)
  1090. :  return v:shell_error
  1091. :endfunc

  1092. Be aware that some print programs return control before they have read
  1093. the file.  If you delete the file too soon it will not be printed.
  1094. These programs usually offer an option to have them remove the file
  1095. when printing is done.
  1096. *E365*
  1097. If evaluating the expression fails or it results in a non-zero number,
  1098. you get an error message.  In that case Vim will delete the
  1099. file.  In the default value for non-MS-Windows a trick is used: Adding
  1100. "v:shell_error" will result in a non-zero number when the system()
  1101. call fails.
  1102. This option cannot be set from a |modeline|, for security reasons.

  1103. *'printfont'* *'pfn'* *E613*
  1104. 'printfont' 'pfn'string(default "courier")
  1105. global
  1106. {not in Vi}
  1107. {only available when compiled with the |+printer|
  1108. feature}
  1109. This is the name of the font that will be used for the |:hardcopy|
  1110. command's output.  It has the same format as the 'guifont' option,
  1111. except that only one font may be named, and the special "guifont=*"
  1112. syntax is not available.
  1113. In the Win32 GUI version this specifies a font name with its extra
  1114. attributes, as with the 'guifont' option.
  1115. For other systems, only ":h11" is recognized, where "11" is the point
  1116. size of the font.  When omitted, the points size is 10.

  1117. *'printheader'* *'pheader'*
  1118. 'printheader' 'pheader'  string  (default "%<%f%h%m%=Page %N")
  1119. global
  1120. {not in Vi}
  1121. {only available when compiled with the |+printer|
  1122. feature}
  1123. This defines the format of the header produced in |:hardcopy| output.
  1124. The option is defined in the same way as the 'statusline' option.
  1125. If Vim has not been compiled with the |+statusline| feature, this
  1126. option has no effect and a simple default header is used, which shows
  1127. the page number.

  1128. *'printoptions'* *'popt'*
  1129. 'printoptions' 'popt' string (default "")
  1130. global
  1131. {not in Vi}
  1132. {only available when compiled with |+printer| feature}
  1133. This is a comma-separated list of items that control the format of
  1134. the output of |:hardcopy|:

  1135.   left:{spec}left margin (default: 10pc)
  1136.   right:{spec}right margin (default: 5pc)
  1137.   top:{spec}top margin (default: 5pc)
  1138.   bottom:{spec}bottom margin (default: 5pc)
  1139. {spec} is a number followed by "in" for
  1140. inches, "pt" for points (1 point is 1/72 of an
  1141. inch), "mm" for millimetres or "pc" for a
  1142. percentage of the media size.
  1143. Weird example:
  1144.     left:2in,top:30pt,right:16mm,bottom:3pc
  1145. If the unit is not recognized there is no
  1146. error and the default value is used.

  1147.   header:{nr}Number of lines to reserve for the header.
  1148. Only the first line is actually filled, thus
  1149. when {nr} is 2 there is one empty line.  The
  1150. header is formatted according to
  1151. 'printheader'.
  1152.   header:0Do not print a header.
  1153.   header:2  (default)Use two lines for the header

  1154.   syntax:nDo not use syntax highlighting.  This is
  1155. faster and thus useful when printing large
  1156. files.
  1157.   syntax:yDo syntax highlighting.
  1158.   syntax:a  (default)Use syntax highlighting if the printer appears
  1159. to be able to print color or grey.

  1160.   number:yInclude line numbers in the printed output.
  1161.   number:n  (default)No line numbers.

  1162.   wrap:y    (default)Wrap long lines.
  1163.   wrap:nTruncate long lines.

  1164.   duplex:offPrint on one side.
  1165.   duplex:long (default)Print on both sides (when possible), bind on
  1166. long side.
  1167.   duplex:shortPrint on both sides (when possible), bind on
  1168. short side.

  1169.   collate:y  (default)Collating: 1 2 3, 1 2 3, 1 2 3
  1170.   collate:nNo collating: 1 1 1, 2 2 2, 3 3 3

  1171.   jobsplit:n (default)Do all copies in one print job
  1172.   jobsplit:yDo each copy as a separate print job.  Useful
  1173. when doing N-up postprocessing.

  1174.   portrait:y (default)Orientation is portrait.
  1175.   portrait:nOrientation is landscape.
  1176. *a4* *letter*
  1177.   paper:A4   (default)Paper size: A4
  1178.   paper:{name}Paper size from this table:
  1179. {name}    size in cm     size in inch
  1180. 10x14    25.4  x 35.57    10    x 14
  1181. A3    29.7  x 42     11.69 x 16.54
  1182. A4    21  x 29.7      8.27 x 11.69
  1183. A5    14.8  x 21      5.83 x  8.27
  1184. B4    25  x 35.3     10.12 x 14.33
  1185. B5    17.6  x 25      7.17 x 10.12
  1186. executive   18.42 x 26.67     7.25 x 10.5
  1187. folio    21  x 33      8.27 x 13
  1188. ledger    43.13 x 27.96    17    x 11
  1189. legal    21.59 x 35.57     8.5  x 14
  1190. letter    21.59 x 27.96     8.5  x 11
  1191. quarto    21.59 x 27.5      8.5  x 10.83
  1192. statement   13.97 x 21.59     5.5  x  8.5
  1193. tabloid     27.96 x 43.13    11    x 17

  1194.   formfeed:n (default)Treat form feed characters (0x0c) as a normal
  1195. print character.
  1196.   formfeed:yWhen a form feed character is encountered,
  1197. continue printing of the current line at the
  1198. beginning of the first line on a new page.

  1199. The item indicated with (default) is used when the item is not
  1200. present.  The values are not always used, especially when using a
  1201. dialog to select the printer and options.
  1202. Example:
  1203. :set printoptions=paper:letter,duplex:off

  1204.    *'readonly'* *'ro'* *'noreadonly'* *'noro'*
  1205. 'readonly' 'ro'boolean(default off)
  1206. local to buffer
  1207. If on, writes fail unless you use a '!'.  Protects you from
  1208. accidentally overwriting a file.  Default on when Vim is started
  1209. in read-only mode ("vim -R") or when the executable is called "view".
  1210. {not in Vi:}  When using the ":view" command the 'readonly' option is
  1211. set for the newly edited buffer.  When using ":w!" the 'readonly'
  1212. option is reset for the current buffer.

  1213. *'remap'* *'noremap'*
  1214. 'remap'boolean(default on)
  1215. global
  1216. Allows for mappings to work recursively.  If you do not want this for
  1217. a single entry, use the :noremap[!] command.

  1218. *'report'*
  1219. 'report'number(default 2)
  1220. global
  1221. Threshold for reporting number of lines changed.  When the number of
  1222. changed lines is more than 'report' a message will be given for most
  1223. ":" commands.  If you want it always, set 'report' to 0.
  1224. For the ":substitute" command the number of substitutions is used
  1225. instead of the number of lines.

  1226. *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
  1227. 'restorescreen' 'rs'boolean(default on)
  1228. global
  1229. {not in Vi}  {Windows 95/NT console version only}
  1230. When set, the screen contents is restored when exiting Vim.  This also
  1231. happens when executing external commands.

  1232. For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
  1233. options in your .vimrc.  To disable restoring:
  1234. set t_ti= t_te=
  1235. To enable restoring (for an xterm):
  1236. set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
  1237. (Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)

  1238. *'revins'* *'ri'* *'norevins'* *'nori'*
  1239. 'revins' 'ri'boolean(default off)
  1240. global
  1241. {not in Vi}
  1242. {only available when compiled with the |+rightleft|
  1243. feature}
  1244. Inserting characters in Insert mode will work backwards.  See "typing
  1245. backwards" |ins-reverse|.  This option can be toggled with the CTRL-_
  1246. command in Insert mode, when 'allowrevins' is set.
  1247. NOTE: This option is reset when 'compatible' or 'paste' is set.

  1248. *'rightleft'* *'rl'* *'norightleft'* *'norl'*
  1249. 'rightleft' 'rl'boolean(default off)
  1250. local to window
  1251. {not in Vi}
  1252. {only available when compiled with the |+rightleft|
  1253. feature}
  1254. When on, display orientation becomes right-to-left, i.e., character
  1255. that are stored in the file appear from the right to the left.
  1256. Using this option, it is possible to edit files for languages that
  1257. are written from the right to the left such as Hebrew and Arabic.
  1258. This option is per window, so it is possible to edit mixed files
  1259. simultaneously, or to view the same file in both ways (this is
  1260. useful whenever you have a mixed text file with both right-to-left
  1261. and left-to-right strings so that both sets are displayed properly
  1262. in different windows).  Also see |rileft|.

  1263. *'rightleftcmd'* *'rlc'* *'norightleftcmd'* *'norlc'*
  1264. 'rightleftcmd' 'rlc'string(default "search")
  1265. local to window
  1266. {not in Vi}
  1267. {only available when compiled with the |+rightleft|
  1268. feature}
  1269. Each word in this option enables the command line editing to work in
  1270. right-to-left mode for a group of commands:

  1271. search"/" and "?" commands

  1272. This is useful for languages such as Hebrew, Arabic and Farsi.
  1273. The 'rightleft' option must be set for 'rightleftcmd' to take effect.

  1274. *'ruler'* *'ru'* *'noruler'* *'noru'*
  1275. 'ruler' 'ru'boolean(default off)
  1276. global
  1277. {not in Vi}
  1278. {not available when compiled without the
  1279. |+cmdline_info| feature}
  1280. Show the line and column number of the cursor position, separated by a
  1281. comma.When there is room, the relative position of the displayed
  1282. text in the file is shown on the far right:
  1283. Topfirst line is visible
  1284. Botlast line is visible
  1285. Allfirst and last line are visible
  1286. 45%relative position in the file
  1287. If 'rulerformat' is set, it will determine the contents of the ruler.
  1288. Each window has its own ruler.If a window has a status line, the
  1289. ruler is shown there.  Otherwise it is shown in the last line of the
  1290. screen.  If the statusline is given by 'statusline' (ie. not empty),
  1291. this option takes precedence over 'ruler' and 'rulerformat'
  1292. If the number of characters displayed is different from the number of
  1293. bytes in the text (e.g., for a TAB or a multi-byte character), both
  1294. the text column (byte number) and the screen column are shown,
  1295. separated with a dash.
  1296. For an empty line "0-1" is shown.
  1297. For an empty buffer the line number will also be zero: "0,0-1".
  1298. This option is reset when the 'paste' option is set.
  1299. If you don't want to see the ruler all the time but want to know where
  1300. you are, use "g CTRL-G" |g_CTRL-G|.
  1301. NOTE: This option is reset when 'compatible' is set.

  1302. *'rulerformat'* *'ruf'*
  1303. 'rulerformat' 'ruf'string(default empty)
  1304. global
  1305. {not in Vi}
  1306. {not available when compiled without the |+statusline|
  1307. feature}
  1308. When this option is not empty, it determines the content of the ruler
  1309. string, as displayed for the 'ruler' option.
  1310. The format of this option, is like that of 'statusline'.
  1311. The default ruler width is 17 characters.  To make the ruler 15
  1312. characters wide, put "%15(" at the start and "%)" at the end.
  1313. Example:
  1314. :set rulerformat=%15(%c%V\ %p%%%)

  1315. *'runtimepath'* *'rtp'* *vimfiles*
  1316. 'runtimepath' 'rtp'string(default:
  1317. Unix: "$HOME/.vim,
  1318. $VIM/vimfiles,
  1319. $VIMRUNTIME,
  1320. $VIM/vimfiles/after,
  1321. $HOME/.vim/after"
  1322. Amiga: "home:vimfiles,
  1323. $VIM/vimfiles,
  1324. $VIMRUNTIME,
  1325. $VIM/vimfiles/after,
  1326. home:vimfiles/after"
  1327. PC, OS/2: "$HOME/vimfiles,
  1328. $VIM/vimfiles,
  1329. $VIMRUNTIME,
  1330. $VIM/vimfiles/after,
  1331. $HOME/vimfiles/after"
  1332. Macintosh: "$VIM:vimfiles,
  1333. $VIMRUNTIME,
  1334. $VIM:vimfiles:after"
  1335. RISC-OS: "Choices:vimfiles,
  1336. $VIMRUNTIME,
  1337. Choices:vimfiles/after"
  1338. VMS: "sys$login:vimfiles,
  1339. $VIM/vimfiles,
  1340. $VIMRUNTIME,
  1341. $VIM/vimfiles/after,
  1342. sys$login:vimfiles/after"
  1343. global
  1344. {not in Vi}
  1345. This is a list of directories which will be searched for runtime
  1346. files:
  1347.   filetype.vimfiletypes by file name |new-filetype|
  1348.   scripts.vimfiletypes by file contents |new-filetype-scripts|
  1349.   colors/color scheme files |:colorscheme|
  1350.   compiler/compiler files |:compiler|
  1351.   doc/documentation |write-local-help|
  1352.   ftplugin/filetype plugins |write-filetype-plugin|
  1353.   indent/indent scripts |indent-expression|
  1354.   keymap/key mapping files |mbyte-keymap|
  1355.   lang/menu translations |:menutrans|
  1356.   menu.vimGUI menus |menu.vim|
  1357.   plugin/plugin scripts |write-plugin|
  1358.   syntax/syntax files |mysyntaxfile|
  1359.   tutor/files for vimtutor |tutor|

  1360. And any other file searched for with the |:runtime| command.

  1361. The defaults for most systems are setup to search five locations:
  1362. 1. In your home directory, for your personal preferences.
  1363. 2. In a system-wide Vim directory, for preferences from the system
  1364.    administrator.
  1365. 3. In $VIMRUNTIME, for files distributed with Vim.
  1366. *after-directory*
  1367. 4. In the "after" directory in the system-wide Vim directory.  This is
  1368.    for the system administrator to overrule or add to the distributed
  1369.    defaults (rarely needed)
  1370. 5. In the "after" directory in your home directory.  This is for
  1371.    personal preferences to overrule or add to the distributed defaults
  1372.    or system-wide settings (rarely needed).
复制代码
 楼主| 发表于 2004-8-14 00:39:22 | 显示全部楼层

  1. Note that, unlike 'path', no wildcards like "**" are allowed.  Normal
  2. wildcards are allowed, but can significantly slow down searching for
  3. runtime files.For speed, use as few items as possible and avoid
  4. wildcards.
  5. See |:runtime|.
  6. Example:
  7. :set runtimepath=~/vimruntime,/mygroup/vim,$VIMRUNTIME
  8. This will use the directory "~/vimruntime" first (containing your
  9. personal Vim runtime files), then "/mygroup/vim" (shared between a
  10. group of people) and finally "$VIMRUNTIME" (the distributed runtime
  11. files).
  12. You probably should always include $VIMRUNTIME somewhere, to use the
  13. distributed runtime files.  You can put a directory before $VIMRUNTIME
  14. to find files which replace a distributed runtime files.  You can put
  15. a directory after $VIMRUNTIME to find files which add to distributed
  16. runtime files.
  17. This option cannot be set from a |modeline|, for security reasons.

  18. *'scroll'* *'scr'*
  19. 'scroll' 'scr'number(default: half the window height)
  20. local to window
  21. Number of lines to scroll with CTRL-U and CTRL-D commands.  Will be
  22. set to half the number of lines in the window when the window size
  23. changes.  If you give a count to the CTRL-U or CTRL-D command it will
  24. be used as the new value for 'scroll'.Reset to half the window
  25. height with ":set scroll=0".   {Vi is a bit different: 'scroll' gives
  26. the number of screen lines instead of file lines, makes a difference
  27. when lines wrap}

  28. *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'*
  29. 'scrollbind' 'scb'boolean  (default off)
  30. local to window
  31. {not in Vi}
  32. {not available when compiled without the |+scrollbind|
  33. feature}
  34. See also |scroll-binding|.  When this option is set, the current
  35. window scrolls as other scrollbind windows (windows that also have
  36. this option set) scroll.  This option is useful for viewing the
  37. differences between two versions of a file, see 'diff'.
  38. See |'scrollopt'| for options that determine how this option should be
  39. interpreted.
  40. This option is mostly reset when splitting a window to edit another
  41. file.  This means that ":split | edit file" results in two windows
  42. with scroll-binding, but ":split file" does not.

  43. *'scrolljump'* *'sj'*
  44. 'scrolljump' 'sj'number(default 1)
  45. global
  46. {not in Vi}
  47. Minimal number of lines to scroll when the cursor gets off the
  48. screen (e.g., with "j").  Not used for scroll commands (e.g., CTRL-E,
  49. CTRL-D).  Useful if your terminal scrolls very slowly.
  50. NOTE: This option is set to 1 when 'compatible' is set.

  51. *'scrolloff'* *'so'*
  52. 'scrolloff' 'so'number(default 0)
  53. global
  54. {not in Vi}
  55. Minimal number of screen lines to keep above and below the cursor.
  56. This will make some context visible around where you are working.  If
  57. you set it to a very large value (999) the cursor line will always be
  58. in the middle of the window (except at the start or end of the file or
  59. when long lines wrap).
  60. For scrolling horizontallly see 'sidescrolloff'.
  61. NOTE: This option is set to 0 when 'compatible' is set.

  62. *'scrollopt'* *'sbo'*
  63. 'scrollopt' 'sbo'string(default "ver,jump")
  64. global
  65. {not available when compiled without the |+scrollbind|
  66. feature}
  67. {not in Vi}
  68. This is a comma-separated list of words that specifies how
  69. 'scrollbind' windows should behave.
  70. The following words are available:
  71.     verBind vertical scrolling for 'scrollbind' windows
  72.     horBind horizontal scrolling for 'scrollbind' windows
  73.     jumpApplies to the offset between two windows for vertical
  74. scrolling.  This offset is the difference in the first
  75. displayed line of the bound windows.  When moving
  76. around in a window, another 'scrollbind' window may
  77. reach a position before the start or after the end of
  78. the buffer.  The offset is not changed though, when
  79. moving back the 'scrollbind' window will try to scroll
  80. to the desired position when possible.
  81. When now making that window the current one, two
  82. things can be done with the relative offset:
  83. 1. When "jump" is not included, the relative offset is
  84.    adjusted for the scroll position in the new current
  85.    window.  When going back to the other window, the
  86.    the new relative offset will be used.
  87. 2. When "jump" is included, the other windows are
  88.    scrolled to keep the same relative offset.  When
  89.    going back to the other window, it still uses the
  90.    same relative offset.
  91. Also see |scroll-binding|.

  92. *'sections'* *'sect'*
  93. 'sections' 'sect'string(default "SHNHH HUnhsh")
  94. global
  95. Specifies the nroff macros that separate sections.  These are pairs of
  96. two letters (See |object-motions|).  The default makes a section start
  97. at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh".

  98. *'secure'* *'nosecure'* *E523*
  99. 'secure'boolean(default off)
  100. global
  101. {not in Vi}
  102. When on, ":autocmd", shell and write commands are not allowed in
  103. ".vimrc" and ".exrc" in the current directory and map commands are
  104. displayed.  Switch it off only if you know that you will not run into
  105. problems, or when the 'exrc' option is off.  On Unix this option is
  106. only used if the ".vimrc" or ".exrc" is not owned by you.  This can be
  107. dangerous if the systems allows users to do a "chown".You better set
  108. 'secure' at the end of your ~/.vimrc then.
  109. This option cannot be set from a |modeline|, for security reasons.

  110. *'selection'* *'sel'*
  111. 'selection' 'sel'string(default "inclusive")
  112. global
  113. {not in Vi}
  114. This option defines the behavior of the selection.  It is only used
  115. in Visual and Select mode.
  116. Possible values:
  117.    valuepast line     inclusive
  118.    old   noyes
  119.    inclusive   yesyes
  120.    exclusive   yesno
  121. "past line" means that the cursor is allowed to be positioned one
  122. character past the line.
  123. "inclusive" means that the last character of the selection is included
  124. in an operation.  For example, when "x" is used to delete the
  125. selection.

  126. The 'selection' option is set by the |:behave| command.

  127. *'selectmode'* *'slm'*
  128. 'selectmode' 'slm'string(default "")
  129. global
  130. {not in Vi}
  131. This is a comma separated list of words, which specifies when to start
  132. Select mode instead of Visual mode, when a selection is started.
  133. Possible values:
  134.    mousewhen using the mouse
  135.    keywhen using shifted special keys
  136.    cmdwhen using "v", "V" or CTRL-V
  137. See |Select-mode|.
  138. The 'selectmode' option is set by the |:behave| command.

  139. *'sessionoptions'* *'ssop'*
  140. 'sessionoptions' 'ssop'string(default: "blank,buffers,curdir,folds,
  141. help,options,winsize")
  142. global
  143. {not in Vi}
  144. {not available when compiled without the +mksession
  145. feature}
  146. Changes the effect of the |:mksession| command.  It is a comma
  147. separated list of words.  Each word enables saving and restoring
  148. something:
  149.    wordsave and restore
  150.    blankempty windows
  151.    buffershidden and unloaded buffers, not just those in windows
  152.    curdirthe current directory
  153.    foldsmanually created folds, opened/closed folds and local
  154. fold options
  155.    globalsglobal variables that start with an uppercase letter
  156. and contain at least one lowercase letter.
  157.    helpthe help window
  158.    localoptionsoptions and mappings local to a window or buffer (not
  159. global values for local options)
  160.    optionsall options and mappings (also global values for local
  161. options)
  162.    resizesize of the Vim window: 'lines' and 'columns'
  163.    sesdirthe directory in which the session file is located
  164. will become the current directory (useful with
  165. projects accessed over a network from different
  166. systems)
  167.    slashbackslashes in file names replaced with forward
  168. slashes
  169.    unixwith Unix end-of-line format (single <NL>), even when
  170. on Windows or DOS
  171.    winposposition of the whole Vim window
  172.    winsizewindow sizes

  173. Don't include both "curdir" and "sesdir".
  174. When "curdir" nor "sesdir" is included, file names are stored with
  175. absolute paths.
  176. "slash" and "unix" are useful on Windows when sharing session files
  177. with Unix.  The Unix version of Vim cannot source dos format scripts,
  178. but the Windows version of Vim can source unix format scripts.

  179. *'shell'* *'sh'* *E91*
  180. 'shell' 'sh'string(default $SHELL or "sh",
  181. MS-DOS and Win32: "command.com" or
  182. "cmd.exe", OS/2: "cmd")
  183. global
  184. Name of the shell to use for ! and :! commands.  When changing the
  185. value also check these options: 'shelltype', 'shellpipe', 'shellslash'
  186. 'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'.
  187. It is allowed to give an argument to the command, e.g."csh -f".
  188. See |option-backslash| about including spaces and backslashes.
  189. Environment variables are expanded |:set_env|.
  190. If the name of the shell contains a space, you might need to enclose
  191. it in quotes.  Example:
  192. :set shell="c:\program\ files\unix\sh.exe"\ -f
  193. Note the backslash before each quote (to avoid starting a comment) and
  194. each space (to avoid ending the option value).Also note that the
  195. "-f" is not inside the quotes, because it is not part of the command
  196. name.  And Vim automagically recognizes the backslashes that are path
  197. separators.
  198. For Dos 32 bits (DJGPP), you can set the $DJSYSFLAGS environment
  199. variable to change the way external commands are executed.  See the
  200. libc.inf file of DJGPP.
  201. Under MS-Windows, when the executable ends in ".com" it must be
  202. included.  Thus setting the shell to "command.com" or "4dos.com"
  203. works, but "command" and "4dos" do not work for all commands (e.g.,
  204. filtering).
  205. For unknown reasons, when using "4dos.com" the current directory is
  206. changed to "C:".  To avoid this set 'shell' like this:
  207. :set shell=command.com\ /c\ 4dos
  208. This option cannot be set from a |modeline|, for security reasons.

  209. *'shellcmdflag'* *'shcf'*
  210. 'shellcmdflag' 'shcf'string(default: "-c", MS-DOS and Win32, when 'shell'
  211. does not contain "sh" somewhere: "/c")
  212. global
  213. {not in Vi}
  214. Flag passed to the shell to execute "!" and ":!" commands; e.g.,
  215. "bash.exe -c ls" or "command.com /c dir".  For the MS-DOS-like
  216. systems, the default is set according to the value of 'shell', to
  217. reduce the need to set this option by the user.  It's not used for
  218. OS/2 (EMX figures this out itself).  See |option-backslash| about
  219. including spaces and backslashes.  See |dos-shell|.
  220. This option cannot be set from a |modeline|, for security reasons.

  221. *'shellpipe'* *'sp'*
  222. 'shellpipe' 'sp'string(default ">", "| tee", "|& tee" or "2>&1| tee")
  223. global
  224. {not in Vi}
  225. {not available when compiled without the |+quickfix|
  226. feature}
  227. String to be used to put the output of the ":make" command in the
  228. error file.  See also |:make_makeprg|.See |option-backslash| about
  229. including spaces and backslashes.
  230. The name of the temporary file can be represented by "%s" if necessary
  231. (the file name is appended automatically if no %s appears in the value
  232. of this option).
  233. For the Amiga and MS-DOS the default is ">".  The output is directly
  234. saved in a file and not echoed to the screen.
  235. For Unix the default it "| tee".  The stdout of the compiler is saved
  236. in a file and echoed to the screen.  If the 'shell' option is "csh" or
  237. "tcsh" after initializations, the default becomes "|& tee".  If the
  238. 'shell' option is "sh", "ksh", "zsh" or "bash" the default becomes
  239. "2>&1| tee".  This means that stderr is also included.
  240. The initialization of this option is done after reading the ".vimrc"
  241. and the other initializations, so that when the 'shell' option is set
  242. there, the 'shellpipe' option changes automatically, unless it was
  243. explicitly set before.
  244. When 'shellpipe' is set to an empty string, no redirection of the
  245. ":make" output will be done.  This is useful if you use a 'makeprg'
  246. that writes to 'makeef' by itself.  If you want no piping, but do
  247. want to include the 'makeef', set 'shellpipe' to a single space.
  248. Don't forget to precede the space with a backslash: ":set sp=\ ".
  249. In the future pipes may be used for filtering and this option will
  250. become obsolete (at least for Unix).
  251. This option cannot be set from a |modeline|, for security reasons.

  252. *'shellquote'* *'shq'*
  253. 'shellquote' 'shq'string(default: ""; MS-DOS and Win32, when 'shell'
  254. contains "sh" somewhere: """)
  255. global
  256. {not in Vi}
  257. Quoting character(s), put around the command passed to the shell, for
  258. the "!" and ":!" commands.  The redirection is kept outside of the
  259. quoting.  See 'shellxquote' to include the redirection.  It's
  260. probably not useful to set both options.
  261. This is an empty string by default.  Only known to be useful for
  262. third-party shells on MS-DOS-like systems, such as the MKS Korn Shell
  263. or bash, where it should be """.  The default is adjusted according
  264. the value of 'shell', to reduce the need to set this option by the
  265. user.  See |dos-shell|.
  266. This option cannot be set from a |modeline|, for security reasons.

  267. *'shellredir'* *'srr'*
  268. 'shellredir' 'srr'string(default ">", ">&" or ">%s 2>&1")
  269. global
  270. {not in Vi}
  271. String to be used to put the output of a filter command in a temporary
  272. file.  See also |:!|.  See |option-backslash| about including spaces
  273. and backslashes.
  274. The name of the temporary file can be represented by "%s" if necessary
  275. (the file name is appended automatically if no %s appears in the value
  276. of this option).
  277. The default is ">".  For Unix, if the 'shell' option is "csh", "tcsh"
  278. or "zsh" during initializations, the default becomes ">&".  If the
  279. 'shell' option is "sh", "ksh" or "bash" the default becomes
  280. ">%s 2>&1".  This means that stderr is also included.
  281. For Win32, the Unix checks are done and additionally "cmd" is checked
  282. for, which makes the default ">%s 2>&1".  Also, the same names with
  283. ".exe" appended are checked for.
  284. The initialization of this option is done after reading the ".vimrc"
  285. and the other initializations, so that when the 'shell' option is set
  286. there, the 'shellredir' option changes automatically unless it was
  287. explicitly set before.
  288. In the future pipes may be used for filtering and this option will
  289. become obsolete (at least for Unix).
  290. This option cannot be set from a |modeline|, for security reasons.

  291. *'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
  292. 'shellslash' 'ssl'boolean(default off)
  293. global
  294. {not in Vi} {only for MSDOS, MS-Windows and OS/2}
  295. When set, a forward slash is used when expanding file names.  This is
  296. useful when a Unix-like shell is used instead of command.com or
  297. cmd.exe.  Backward slashes can still be typed, but they are changed to
  298. forward slashes by Vim.
  299. Note that setting or resetting this option has no effect for some
  300. existing file names, thus this option needs to be set before opening
  301. any file for best results.  This might change in the future.
  302. 'shellslash' only works when a backslash can be used as a path
  303. separator.  To test if this is so use:
  304. if exists('+shellslash')

  305. *'shelltype'* *'st'*
  306. 'shelltype' 'st'number(default 0)
  307. global
  308. {not in Vi} {only for the Amiga}
  309. On the Amiga this option influences the way how the commands work
  310. which use a shell.
  311. 0 and 1: always use the shell
  312. 2 and 3: use the shell only to filter lines
  313. 4 and 5: use shell only for ':sh' command
  314. When not using the shell, the command is executed directly.

  315. 0 and 2: use "shell 'shellcmdflag' cmd" to start external commands
  316. 1 and 3: use "shell cmd" to start external commands

  317. *'shellxquote'* *'sxq'*
  318. 'shellxquote' 'sxq'string(default: "";
  319. for Win32, when 'shell' contains "sh"
  320. somewhere: """
  321. for Unix, when using system(): """)
  322. global
  323. {not in Vi}
  324. Quoting character(s), put around the command passed to the shell, for
  325. the "!" and ":!" commands.  Includes the redirection.  See
  326. 'shellquote' to exclude the redirection.  It's probably not useful
  327. to set both options.
  328. This is an empty string by default.  Known to be useful for
  329. third-party shells when using the Win32 version, such as the MKS Korn
  330. Shell or bash, where it should be """.  The default is adjusted
  331. according the value of 'shell', to reduce the need to set this option
  332. by the user.  See |dos-shell|.
  333. This option cannot be set from a |modeline|, for security reasons.

  334. *'shiftround'* *'sr'* *'noshiftround'* *'nosr'*
  335. 'shiftround' 'sr'boolean(default off)
  336. global
  337. {not in Vi}
  338. Round indent to multiple of 'shiftwidth'.  Applies to > and <
  339. commands.  CTRL-T and CTRL-D in Insert mode always round the indent to
  340. a multiple of 'shiftwidth' (this is Vi compatible).
  341. NOTE: This option is reset when 'compatible' is set.

  342. *'shiftwidth'* *'sw'*
  343. 'shiftwidth' 'sw'number(default 8)
  344. local to buffer
  345. Number of spaces to use for each step of (auto)indent.Used for
  346. |'cindent'|, |>>|, |<<|, etc.

  347. *'shortmess'* *'shm'*
  348. 'shortmess' 'shm'string(Vim default "filnxtToO", Vi default: "")
  349. global
  350. {not in Vi}
  351. This option helps to avoid all the |hit-enter| prompts caused by file
  352. messages, for example  with CTRL-G, and to avoid some other messages.
  353. It is a list of flags:
  354. flagmeaning when present
  355.   fuse "(3 of 5)" instead of "(file 3 of 5)"
  356.   iuse "[noeol]" instead of "[Incomplete last line]"
  357.   luse "999L, 888C" instead of "999 lines, 888 characters"
  358.   muse "[+]" instead of "[Modified]"
  359.   nuse "[New]" instead of "[New File]"
  360.   ruse "[RO]" instead of "[readonly]"
  361.   wuse "[w]" instead of "written" for file write message
  362. and "[a]" instead of "appended" for ':w >> file' command
  363.   xuse "[dos]" instead of "[dos format]", "[unix]" instead of
  364. "[unix format]" and "[mac]" instead of "[mac format]".
  365.   aall of the above abbreviations

  366.   ooverwrite message for writing a file with subsequent message
  367. for reading a file (useful for ":wn" or when 'autowrite' on)
  368.   Omessage for reading a file overwrites any previous message.
  369. Also for quickfix message (e.g., ":cn").
  370.   sdon't give "search hit BOTTOM, continuing at TOP" or "search
  371. hit TOP, continuing at BOTTOM" messages
  372.   ttruncate file message at the start if it is too long to fit
  373. on the command-line, "<" will appear in the left most column.
  374. Ignored in Ex mode.
  375.   Ttruncate other messages in the middle if they are too long to
  376. fit on the command line. "..." will appear in the middle.
  377. Ignored in Ex mode.
  378.   Wdon't give "written" or "[w]" when writing a file
  379.   Adon't give the "ATTENTION" message when an existing swap file
  380. is found.
  381.   Idon't give the intro message when starting Vim |:intro|.

  382. This gives you the opportunity to avoid that a change between buffers
  383. requires you to hit <Enter>, but still gives as useful a message as
  384. possible for the space available.  To get the whole message that you
  385. would have got with 'shm' empty, use ":file!"
  386. Useful values:
  387.     shm=No abbreviation of message.
  388.     shm=aAbbreviation, but no loss of information.
  389.     shm=atAbbreviation, and truncate message when necessary.

  390. NOTE: This option is set to the Vi default value when 'compatible' is
  391. set and to the Vim default value when 'compatible' is reset.

  392. *'shortname'* *'sn'* *'noshortname'* *'nosn'*
  393. 'shortname' 'sn'boolean(default off)
  394. local to buffer
  395. {not in Vi, not in MS-DOS versions}
  396. Filenames are assumed to be 8 characters plus one extension of 3
  397. characters.  Multiple dots in file names are not allowed.  When this
  398. option is on, dots in file names are replaced with underscores when
  399. adding an extension (".~" or ".swp").  This option is not available
  400. for MS-DOS, because then it would always be on.  This option is useful
  401. when editing files on an MS-DOS compatible filesystem, e.g., messydos
  402. or crossdos.  When running the Win32 GUI version under Win32s, this
  403. option is always on by default.

  404. *'showbreak'* *'sbr'* *E595*
  405. 'showbreak' 'sbr'string(default "")
  406. global
  407. {not in Vi}
  408. {not available when compiled without the  |+linebreak|
  409. feature}
  410. String to put at the start of lines that have been wrapped.  Useful
  411. values are "> " or "+++ ".
  412. Only printable single-cell characters are allowed, excluding <Tab> and
  413. comma (in a future version the comma might be used to separate the
  414. part that is shown at the end and at the start of a line).
  415. The characters are highlighted according to the '@' flag in
  416. 'highlight'.
  417. Note that tabs after the showbreak will be displayed differently.
  418. If you want the 'showbreak' to appear in between line numbers, add the
  419. "n" flag to 'cpoptions'.

  420.      *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
  421. 'showcmd' 'sc'boolean(Vim default: on, off for Unix, Vi default:
  422. off)
  423. global
  424. {not in Vi}
  425. {not available when compiled without the
  426. |+cmdline_info| feature}
  427. Show (partial) command in status line.Set this option off if your
  428. terminal is slow.
  429. In Visual mode the size of the selected area is shown:
  430. - When selecting characters within a line, the number of characters.
  431. - When selecting more than one line, the number of lines.
  432. - When selecting a block, the size in screen characters: linesxcolumns.
  433. NOTE: This option is set to the Vi default value when 'compatible' is
  434. set and to the Vim default value when 'compatible' is reset.

  435. *'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
  436. 'showfulltag' 'sft'boolean (default off)
  437. global
  438. {not in Vi}
  439. When completing a word in insert mode (see |ins-completion|) from the
  440. tags file, show both the tag name and a tidied-up form of the search
  441. pattern (if there is one) as possible matches.Thus, if you have
  442. matched a C function, you can see a template for what arguments are
  443. required (coding style permitting).

  444. *'showmatch'* *'sm'* *'noshowmatch'* *'nosm'*
  445. 'showmatch' 'sm'boolean(default off)
  446. global
  447. When a bracket is inserted, briefly jump to the matching one.  The
  448. jump is only done if the match can be seen on the screen.  The time to
  449. show the match can be set with 'matchtime'.
  450. A Beep is given if there is no match (no matter if the match can be
  451. seen or not).  This option is reset when the 'paste' option is set.
  452. When the 'm' flag is not included in 'cpoptions', typing a character
  453. will immediately move the cursor back to where it belongs.
  454. See the "sm" field in 'guicursor' for setting the cursor shape and
  455. blinking when showing the match.
  456. Note: For the use of the short form parental guidance is advised.

  457. *'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
  458. 'showmode' 'smd'boolean(Vim default: on, Vi default: off)
  459. global
  460. If in Insert, Replace or Visual mode put a message on the last line.
  461. Use the 'M' flag in 'highlight' to set the type of highlighting for
  462. this message.
  463. When |XIM| may be used the message will include "XIM".But this
  464. doesn't mean XIM is really active, especially when 'imactivatekey' is
  465. not set.
  466. NOTE: This option is set to the Vi default value when 'compatible' is
  467. set and to the Vim default value when 'compatible' is reset.

  468. *'sidescroll'* *'ss'*
  469. 'sidescroll' 'ss'number(default 0)
  470. global
  471. {not in Vi}
  472. The minimal number of columns to scroll horizontally.  Used only when
  473. the 'wrap' option is off and the cursor is moved off of the screen.
  474. When it is zero the cursor will be put in the middle of the screen.
  475. When using a slow terminal set it to a large number or 0.  When using
  476. a fast terminal use a small number or 1.  Not used for "zh" and "zl"
  477. commands.

  478. *'sidescrolloff'* *'siso'*
  479. 'sidescrolloff' 'siso'number (default 0)
  480. global
  481. {not in Vi}
  482. The minimal number of screen columns to keep to the left and to the
  483. right of the cursor if 'nowrap' is set. Setting this option to a value
  484. greater than 0 while having |'sidescroll'| also at a non-zero value
  485. makes some context visible in the line you are scrolling in
  486. horizontally (except at the end and beginning of the line).  Setting
  487. this option to a large value (like 999) has the effect of keeping the
  488. cursor horizontally centered in the window, as long as one does not
  489. come too close to the beginning or end of the line.
  490. NOTE: This option is set to 0 when 'compatible' is set.

  491. Example: Try this together with 'sidescroll' and 'listchars' as
  492. in the following example to never allow the cursor to move
  493. onto the "extends" character:

  494. :set nowrap sidescroll=1 listchars=extends:>,precedes:<
  495. :set sidescrolloff=1


  496. *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
  497. 'smartcase' 'scs'boolean(default off)
  498. global
  499. {not in Vi}
  500. Override the 'ignorecase' option if the search pattern contains upper
  501. case characters.  Only used when the search pattern is typed and
  502. 'ignorecase' option is on.  Used for the commands "/", "?", "n", "N",
  503. ":g" and ":s".Not used for "*", "#", "gd", tag search, etc..After
  504. "*" and "#" you can make 'smartcase' used by doing a "/" command,
  505. recalling the search pattern from history and hitting <Enter>.
  506. NOTE: This option is reset when 'compatible' is set.

  507.      *'smartindent'* *'si'* *'nosmartindent'* *'nosi'*
  508. 'smartindent' 'si'boolean(default off)
  509. local to buffer
  510. {not in Vi}
  511. {not available when compiled without the
  512. |+smartindent| feature}
  513. Do smart autoindenting when starting a new line.  Works for C-like
  514. programs, but can also be used for other languages.  'cindent' does
  515. something like this, works better in most cases, but is more strict,
  516. see |C-indenting|.  When 'cindent' is on, setting 'si' has no effect.
  517. 'indentexpr' is a more advanced alternative.
  518. Normally 'autoindent' should also be on when using 'smartindent'.
  519. An indent is automatically inserted:
  520. - After a line ending in '{'.
  521. - After a line starting with a keyword from 'cinwords'.
  522. - Before a line starting with '}' (only with the "O" command).
  523. When typing '}' as the first character in a new line, that line is
  524. given the same indent as the matching '{'.
  525. When typing '#' as the first character in a new line, the indent for
  526. that line is removed, the '#' is put in the first column.  The indent
  527. is restored for the next line.If you don't want this, use this
  528. mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
  529. When using the ">>" command, lines starting with '#' are not shifted
  530. right.
  531. NOTE: 'smartindent' is reset when 'compatible' is set.When 'paste'
  532. is set smart indenting is disabled.

  533. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
  534. 'smarttab' 'sta'boolean(default off)
  535. global
  536. {not in Vi}
  537. When on, a <Tab> in front of a line inserts blanks according to
  538. 'shiftwidth'.  'tabstop' is used in other places.  A <BS> will delete
  539. a 'shiftwidth' worth of space at the start of the line.
  540. When off a <Tab> always inserts blanks according to 'tabstop'.
  541. 'shiftwidth' is only used for shifting text left or right
  542. |shift-left-right|.
  543. What gets inserted (a Tab or spaces) depends on the 'expandtab'
  544. option.  Also see |ins-expandtab|.  When 'expandtab' is not set, the
  545. number of spaces minimized by using <Tab>s.
  546. NOTE: This option is reset when 'compatible' is set.

  547. *'softtabstop'* *'sts'*
  548. 'softtabstop' 'sts'number(default 0)
  549. local to buffer
  550. {not in Vi}
  551. Number of spaces that a <Tab> counts for while performing editing
  552. operations, like inserting a <Tab> or using <BS>.  It "feels" like
  553. <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is
  554. used.  This is useful to keep the 'ts' setting at its standard value
  555. of 8, while being able to edit like it is set to 'sts'.  However,
  556. commands like "x" still work on the actual characters.
  557. When 'sts' is zero, this feature is off.
  558. 'softtabstop' is set to 0 when the 'paste' option is set.
  559. See also |ins-expandtab|.  When 'expandtab' is not set, the number of
  560. spaces is minimized by using <Tab>s.
  561. NOTE: This option is set to 0 when 'compatible' is set.

  562. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
  563. 'splitbelow' 'sb'boolean(default off)
  564. global
  565. {not in Vi}
  566. {not available when compiled without the +windows
  567. feature}
  568. When on, splitting a window will put the new window below the current
  569. one. |:split|

  570. *'splitright'* *'spr'* *'nosplitright'* *'nospr'*
  571. 'splitright' 'spr'boolean(default off)
  572. global
  573. {not in Vi}
  574. {not available when compiled without the +vertsplit
  575. feature}
  576. When on, splitting a window will put the new window right of the
  577. current one. |:vsplit|

  578.    *'startofline'* *'sol'* *'nostartofline'* *'nosol'*
  579. 'startofline' 'sol'boolean(default on)
  580. global
  581. {not in Vi}
  582. When "on" the commands listed below move the cursor to the first
  583. blank of the line.  When off the cursor is kept in the same column
  584. (if possible).This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
  585. CTRL-F, "G", "H", "M", "L", , and to the commands "d", "<<" and ">>"
  586. with a linewise operator, with "%" with a count and to buffer changing
  587. commands (CTRL-^, :bnext, :bNext, etc.).  Also for an Ex command that
  588. only has a line number, e.g., ":25" or ":+".
  589. In case of buffer changing commands the cursor is placed at the column
  590. where it was the last time the buffer was edited.
  591. NOTE: This option is set when 'compatible' is set.

  592.    *'statusline'* *'stl'* *E540* *E541* *E542*
  593. 'statusline' 'stl'string(default empty)
  594. global
  595. {not in Vi}
  596. {not available when compiled without the |+statusline|
  597. feature}
  598. When nonempty, this option determines the content of the status line.
  599. Also see |status-line|.

  600. The option consists of printf style '%' items interspersed with
  601. normal text.  Each status line item is of the form:
  602.   %-0{minwid}.{maxwid}{item}
  603. All fields except the {item} is optional.  A single percent sign can
  604. be given as "%%".  Up to 80 items can be specified.

  605. Note that the only effect of 'ruler' when this option is set (and
  606. 'laststatus' is 2) is controlling the output of |CTRL-G|.

  607. field    meaning
  608. -    Left justify the item. The default is right justified
  609.     when minwid is larger than the length of the item.
  610. 0    Leading zeroes in numeric items. Overridden by '-'.
  611. minwid    Minimum width of the item, padding as set by '-' & '0'.
  612.     Value must be 50 or less.
  613. maxwid    Maximum width of the item.Truncation occurs with a '<'
  614.     on the left for text items.  Numeric items will be
  615.     shifted down to maxwid-2 digits followed by '>'number
  616.     where number is the amount of missing digits, much like
  617.     an exponential notation.
  618. item    A one letter code as described below.

  619. Following is a description of the possible statusline items.  The
  620. second character in "item" is the type:
  621. N for number
  622. S for string
  623. F for flags as described below
  624. - not applicable

  625. item  meaning
  626. f S   Path to the file in the buffer, relative to current directory.
  627. F S   Full path to the file in the buffer.
  628. t S   File name (tail) of file in the buffer.
  629. m F   Modified flag, text is " [+]" or " [-]" if 'modifiable' is off.
  630. M F   Modified flag, text is ",+" or ",-".
  631. r F   Readonly flag, text is " [RO]".
  632. R F   Readonly flag, text is ",RO".
  633. h F   Help buffer flag, text is " [help]".
  634. H F   Help buffer flag, text is ",HLP".
  635. w F   Preview window flag, text is " [Preview]".
  636. W F   Preview window flag, text is ",PRV".
  637. y F   Type of file in the buffer, e.g., " [vim]".  See 'filetype'.
  638. Y F   Type of file in the buffer, e.g., ",VIM".  See 'filetype'.
  639.       {not available when compiled without |+autocmd| feature}
  640. k S   Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
  641.       being used: "<keymap>"
  642. n N   Buffer number.
  643. b N   Value of byte under cursor.
  644. B N   As above, in hexadecimal.
  645. o N   Byte number in file of byte under cursor, first byte is 1.
  646.       Mnemonic: Offset from start of file (with one added)
  647.       {not available when compiled without |+byte_offset| feature}
  648. O N   As above, in hexadecimal.
  649. N N   Printer page number. (Only works in the 'printheader' option.)
  650. l N   Line number.
  651. L N   Number of lines in buffer.
  652. c N   Column number.
  653. v N   Virtual column number.
  654. V N   Virtual column number as -{num}.Not displayed if equal to 'c'.
  655. p N   Percentage through file in lines as in |CTRL-G|.
  656. P S   Percentage through file of displayed window.  This is like the
  657.       percentage described for 'ruler'.  Always 3 in length.
  658. a S   Argument list status as in default title. ({current} of {max})
  659.       Empty if the argument file count is zero or one.
  660. { NF  Evaluate expression between '{' and '}' and substitute result.
  661. ( -   Start of item group.  Can be used for setting the width and
  662.       alignment of a section.  Must be followed by %) somewhere.
  663. ) -   End of item group.  No width fields allowed.
  664. < -   Where to truncate line if too long.  Default is at the start.
  665.       No width fields allowed.
  666. = -   Separation point between left and right aligned items.
  667.       No width fields allowed.
  668. * -   Set highlight group to User{N}, where {N} is taken from the
  669.       minwid field. eg. %1*.  Restore normal highlight with %* or %0*.
  670.       The difference between User{N} and StatusLine  will be applied
  671.       to StatusLineNC for the statusline of non-current windows.
  672.       The number N must be between 1 and 9.  See |hl-User1..9|

  673. Display of flags are controlled by the following heuristic:
  674. If a flag text starts with comma it is assumed that it wants to
  675. separate itself from anything but preceding plaintext.If it starts
  676. with a space it is assumed that it wants to separate itself from
  677. anything but other flags.  That is: A leading comma is removed if the
  678. preceding character stems from plaintext.  A leading space is removed
  679. if the preceding character stems from another active flag. This will
  680. make a nice display when flags are used like in the examples below.

  681. When all items in a group becomes an empty string (ie. flags that are
  682. not set) and a minwid is not set for the group, the whole group will
  683. become empty.  This will make a group like the following disappear
  684. completely from the statusline when none of the flags are set.
  685. :set statusline=...%(\ [%M%R%H]%)...

  686. Beware that an expression is evaluated each and every time the status
  687. line is displayed.  The current buffer and current window will be set
  688. temporarily to that of the window (and buffer) whose statusline is
  689. currently being drawn. The expression will evaluate in this context.
  690. The variable "actual_curbuf" is set to the 'bufnr()' number of the
  691. real current buffer.  The expression is evaluated in the |sandbox|.

  692. If the statusline is not updated when you want it (e.g., after setting
  693. a variable that's used in an expression), you can force an update by
  694. setting an option without changing its value.  Example:
  695. :let &ro = &ro

  696. A result of all digits is regarded a number for display purposes.
  697. Otherwise the result is taken as flag text and applied to the rules
  698. described above.

  699. Watch out for errors in expressions.  They may render Vim unusable !
  700. If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and
  701. edit your .vimrc or whatever with "vim -u NONE" to get it right.

  702. Examples:
  703. Emulate standard status line with 'ruler' set
  704.   :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
  705. <Similar, but add ascii value of char under the cursor (like "ga")
  706.   :set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
  707. <Display byte count and byte value, modified flag in red.
  708.   :set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
  709.   :hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
  710. <Display a ,GZ flag if a compressed file is loaded
  711.   :set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
  712. <In the |:autocmd|'s:
  713.   :let b:gzflag = 1
  714. <And:
  715.   :unlet b:gzflag
  716. <And define this function:
  717.   :function VarExists(var, val)
  718.   :    if exists(a:var) | return a:val | else | return '' | endif
  719.   :endfunction

  720. *'suffixes'* *'su'*
  721. 'suffixes' 'su'string(default ".bak,~,.o,.h,.info,.swp,.obj")
  722. global
  723. {not in Vi}
  724. Files with these suffixes get a lower priority when multiple files
  725. match a wildcard.  See |suffixes|.  Commas can be used to separate the
  726. suffixes.  Spaces after the comma are ignored.A dot is also seen as
  727. the start of a suffix.To avoid a dot or comma being recognized as a
  728. separator, precede it with a backslash (see |option-backslash| about
  729. including spaces and backslashes).
  730. See 'wildignore' for completely ignoring files.
  731. The use of |:set+=| and |:set-=| is preferred when adding or removing
  732. suffixes from the list.  This avoids problems when a future version
  733. uses another default.

  734. *'suffixesadd'* *'sua'*
  735. 'suffixesadd' 'sua'string(default "")
  736. local to buffer
  737. {not in Vi}
  738. {not available when compiled without the
  739. |+file_in_path| feature}
  740. Comma separated list of suffixes, which are used when searching for a
  741. file for the "gf", "[I", etc. commands.  Example:
  742. :set suffixesadd=.java

  743. *'swapfile'* *'swf'* *'noswapfile'* *'noswf'*
  744. 'swapfile' 'swf'boolean (default on)
  745. local to buffer
  746. {not in Vi}
  747. Use a swapfile for the buffer.This option can be reset when a
  748. swapfile is not wanted for a specific buffer.  For example, with
  749. confidential information that even root must not be able to access.
  750. Careful: All text will be in memory:
  751. - Don't use this for big files.
  752. - Recovery will be impossible!
  753. A swapfile will only be present when |'updatecount'| is non-zero and
  754. 'swapfile' is set.
  755. When 'swapfile' is reset, the swap file for the current buffer is
  756. immediately deleted.  When 'swapfile' is set, and 'updatecount' is
  757. non-zero, a swap file is immediately created.
  758. Also see |swap-file| and |'swapsync'|.

  759. This option is used together with 'bufhidden' and 'buftype' to
  760. specify special kinds of buffers.   See |special-buffers|.
复制代码
 楼主| 发表于 2004-8-14 00:39:37 | 显示全部楼层

  1. *'swapsync'* *'sws'*
  2. 'swapsync' 'sws'string(default "fsync")
  3. global
  4. {not in Vi}
  5. When this option is not empty a swap file is synced to disk after
  6. writing to it.This takes some time, especially on busy unix systems.
  7. When this option is empty parts of the swap file may be in memory and
  8. not written to disk.  When the system crashes you may lose more work.
  9. On Unix the system does a sync now and then without Vim asking for it,
  10. so the disadvantage of setting this option off is small.  On some
  11. systems the swap file will not be written at all.  For a unix system
  12. setting it to "sync" will use the sync() call instead of the default
  13. fsync(), which may work better on some systems.

  14. *'switchbuf'* *'swb'*
  15. 'switchbuf' 'swb'string(default "")
  16. global
  17. {not in Vi}
  18. This option controls the behavior when switching between buffers.
  19. Possible values (comma separated list):
  20.    useopenIf included, jump to the first open window that
  21. contains the specified buffer (if there is one).
  22. Otherwise: Do not examine other windows.
  23. This setting is checked with |quickfix| commands, when
  24. jumping to errors (":cc", ":cn", "cp", etc.).  It is
  25. also used in all buffer related split commands, for
  26. example ":sbuffer", ":sbnext", or ":sbrewind".
  27.    splitIf included, split the current window before loading
  28. a buffer. Otherwise: do not split, use current window.
  29. Supported in |quickfix| commands that display errors.



  30. *'syntax'* *'syn'*
  31. 'syntax' 'syn'string(default emtpy)
  32. local to buffer
  33. {not in Vi}
  34. {not available when compiled without the |+syntax|
  35. feature}
  36. When this option is set, the syntax with this name is loaded, unless
  37. syntax highlighting has been switched off with ":syntax off".
  38. Otherwise this option does not always reflect the current syntax (the
  39. b:current_syntax variable does).
  40. This option is most useful in a modeline, for a file which syntax is
  41. not automatically recognized.  Example, for in an IDL file:
  42. /* vim: set syntax=idl : */
  43. <To switch off syntax highlighting for the current file, use:
  44. :set syntax=OFF
  45. To switch syntax highlighting on according to the current value of the
  46. 'filetype' option:
  47. :set syntax=ON
  48. What actually happens when setting the 'syntax' option is that the
  49. Syntax autocommand event is triggered with the value as argument.
  50. This option is not copied to another buffer, independent of the 's' or
  51. 'S' flag in 'cpoptions'.

  52. *'tabstop'* *'ts'*
  53. 'tabstop' 'ts'number(default 8)
  54. local to buffer
  55. Number of spaces that a <Tab> in the file counts for.  Also see
  56. |:retab| command, and 'softtabstop' option.

  57. Note: Setting 'tabstop' to any other value than 8 can make your file
  58. appear wrong in many places (e.g., when printing it).

  59. There are four main ways to use tabs in Vim:
  60. 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
  61.    (or 3 or whatever you prefer) and use 'noexpandtab'.  Then Vim
  62.    will use a mix of tabs and spaces, but typing Tab and BS will
  63.    behave like a tab appears every 4 (or 3) characters.
  64. 2. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use
  65.    'expandtab'.  This way you will always insert spaces.  The
  66.    formatting will never be messed up when 'tabstop' is changed.
  67. 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a
  68.    |modeline| to set these values when editing the file again.Only
  69.    works when using Vim to edit the file.
  70. 4. Always set 'tabstop' and 'shiftwidth' to the same value, and
  71.    'noexpandtab'.  This should then work (for initial indents only)
  72.    for any tabstop setting that people use.  It might be nice to have
  73.    tabs after the first non-blank inserted as spaces if you do this
  74.    though.  Otherwise aligned comments will be wrong when 'tabstop' is
  75.    changed.

  76. *'tagbsearch'* *'tbs'* *'notagbsearch'* *'notbs'*
  77. 'tagbsearch' 'tbs'boolean(default on)
  78. global
  79. {not in Vi}
  80. When searching for a tag (e.g., for the |:ta| command), Vim can either
  81. use a binary search or a linear search in a tags file.Binary
  82. searching makes searching for a tag a LOT faster, but a linear search
  83. will find more tags if the tags file wasn't properly sorted.
  84. Vim normally assumes that your tags files are sorted, or indicate that
  85. they are not sorted.  Only when this is not the case does the
  86. 'tagbsearch' option need to be switched off.

  87. When 'tagbsearch' is on, binary searching is first used in the tags
  88. files.In certain situations, Vim will do a linear search instead for
  89. certain files, or retry all files with a linear search.  When
  90. 'tagbsearch' is off, only a linear search is done.

  91. Linear searching is done anyway, for one file, when Vim finds a line
  92. at the start of the file indicating that it's not sorted:
  93.    !_TAG_FILE_SORTED0/some command/
  94. [The whitespace before and after the '0' must be a single <Tab>]

  95. When a binary search was done and no match was found in any of the
  96. files listed in 'tags', and 'ignorecase' is set or a pattern is used
  97. instead of a normal tag name, a retry is done with a linear search.
  98. Tags in unsorted tags files, and matches with different case will only
  99. be found in the retry.

  100. If a tag file indicates that is is case-fold sorted, the second,
  101. linear search can be avoided for the 'ignorecase' case.  Use a value
  102. of '2' in the "!_TAG_FILE_SORTED" line for this.  A tag file can be
  103. case-fold sorted with the -f switch to "sort" in most unices, as in
  104. the command: "sort -f -o tags tags".  For "excuberant ctags" version
  105. 5.3 or higher the -f or --fold-case-sort switch can be used for this
  106. as well.  Note that case must be folded to uppercase for this to work.

  107. When 'tagbsearch' is off, tags searching is slower when a full match
  108. exists, but faster when no full match exists.  Tags in unsorted tags
  109. files may only be found with 'tagbsearch' off.
  110. When the tags file is not sorted, or sorted in a wrong way (not on
  111. ASCII byte value), 'tagbsearch' should be off, or the line given above
  112. must be included in the tags file.
  113. This option doesn't affect commands that find all matching tags (e.g.,
  114. command-line completion and ":help").
  115. {Vi: always uses binary search in some versions}

  116. *'taglength'* *'tl'*
  117. 'taglength' 'tl'number(default 0)
  118. global
  119. If non-zero, tags are significant up to this number of characters.

  120. *'tagrelative'* *'tr'* *'notagrelative'* *'notr'*
  121. 'tagrelative' 'tr'boolean(Vim default: on, Vi default: off)
  122. global
  123. {not in Vi}
  124. If on and using a tag file in another directory, file names in that
  125. tag file are relative to the directory where the tag file is.
  126. NOTE: This option is set to the Vi default value when 'compatible' is
  127. set and to the Vim default value when 'compatible' is reset.

  128. *'tags'* *'tag'* *E433*
  129. 'tags' 'tag'string(default "./tags,tags", when compiled with
  130. |+emacs_tags|: "./tags,./TAGS,tags,TAGS")
  131. global or local to buffer |global-local|
  132. Filenames for the tag command, separated by spaces or commas.  To
  133. include a space or comma in a file name, precede it with a backslash
  134. (see |option-backslash| about including spaces and backslashes).
  135. When a file name starts with "./", the '.' is replaced with the path
  136. of the current file.  But only when the 'd' flag is not included in
  137. 'cpoptions'.  Environment variables are expanded |:set_env|.  Also see
  138. |tags-option|.
  139. "*", "**" and other wildcards can be used to search for tags files in
  140. a directory tree.  See |file-searching|.  {not available when compiled
  141. without the |+path_extra| feature}
  142. If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag
  143. files are also supported.  They are automatically recognized.  The
  144. default value becomes "./tags,./TAGS,tags,TAGS", unless case
  145. differences are ignored (MS-Windows).  |emacs-tags|
  146. The use of |:set+=| and |:set-=| is preferred when adding or removing
  147. file names from the list.  This avoids problems when a future version
  148. uses another default.
  149. {Vi: default is "tags /usr/lib/tags"}

  150. *'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
  151. 'tagstack' 'tgst'boolean(default on)
  152. global
  153. {not in all versions of Vi}
  154. When on, the |tagstack| is used normally.  When off, a ":tag" or
  155. ":tselect" command with an argument will not push the tag onto the
  156. tagstack.  A following ":tag" without an argument, a ":pop" command or
  157. any other command that uses the tagstack will use the unmodified
  158. tagstack, but does change the pointer to the active entry.
  159. Resetting this option is useful when using a ":tag" command in a
  160. mapping which should not change the tagstack.

  161. *'term'* *E529* *E530* *E531*
  162. 'term'string(default is $TERM, if that fails:
  163.       in the GUI: "builtin_gui"
  164. on Amiga: "amiga"
  165. on BeOS: "beos-ansi"
  166.   on Mac: "mac-ansi"
  167. on MiNT: "vt52"
  168.        on MS-DOS: "pcterm"
  169. on OS/2: "os2ansi"
  170. on Unix: "ansi"
  171.   on VMS: "ansi"
  172.        on Win 32: "win32")
  173. global
  174. Name of the terminal.  Used for choosing the terminal control
  175. characters.  Environment variables are expanded |:set_env|.
  176. For example:
  177. :set term=$TERM
  178. See |termcap|.

  179. *'termbidi'* *'tbidi'*
  180. *'notermbidi'* *'notbidi'*
  181. 'termbidi' 'tbidi'boolean (default off, on for "mlterm")
  182. global
  183. {not in Vi}
  184. {only available when compiled with the |+arabic|
  185. feature}
  186. The terminal is in charge of Bi-directionality of text (as specified
  187. by Unicode).  The terminal is also expected to do the required shaping
  188. that some languages (such as Arabic) require.
  189. Setting this option implies that 'rightleft' will not be set when
  190. 'arabic' is set and the value of 'arabicshape' will be ignored.
  191. Note that setting 'termbidi' has the immediate effect that
  192. 'arabicshape' is ignored, but 'rightleft' isn't changed automatically.
  193. This option is reset when the GUI is started.
  194. For further details see |arabic|.

  195. *'termencoding'* *'tenc'*
  196. 'termencoding' 'tenc'string(default "")
  197. global
  198. {only available when compiled with the |+multi_byte|
  199. feature}
  200. {not in Vi}
  201. Encoding used for the terminal.  This specifies what character
  202. encoding the keyboard produces and the display will understand.  For
  203. the GUI it only applies to the keyboard ('encoding' is used for the
  204. display).
  205. *E617*
  206. Note: This does not apply to the GTK+ 2 GUI.  After the GUI has been
  207. successfully initialized, 'termencoding' is forcibly set to "utf-8".
  208. Any attempts to set a different value will be rejected, and an error
  209. message is shown.
  210. When empty, the same encoding is used as for the 'encoding' option.
  211. This is the normal value.
  212. Not all combinations for 'termencoding' and 'encoding' are valid.  See
  213. |encoding-table|.
  214. The value for this option must be supported by iconv().  When iconv()
  215. cannot handle the value, no conversion will be done and you will
  216. probably experience problems with non-ASCII characters.
  217. Example: You are working with the locale set to euc-jp (Japanese) and
  218. want to edit a UTF-8 file:
  219. :let &termencoding = &encoding
  220. :set encoding=utf-8
  221. You need to do this when your system has no locale support for UTF-8.

  222. *'terse'* *'noterse'*
  223. 'terse'boolean(default off)
  224. global
  225. When set: Add 's' flag to 'shortmess' option (this makes the message
  226. for a search that hits the start or end of the file not being
  227. displayed).  When reset: Remove 's' flag from 'shortmess' option.  {Vi
  228. shortens a lot of messages}

  229.    *'textauto'* *'ta'* *'notextauto'* *'nota'*
  230. 'textauto' 'ta'boolean(Vim default: on, Vi default: off)
  231. global
  232. {not in Vi}
  233. This option is obsolete.  Use 'fileformats'.
  234. For backwards compatibility, when 'textauto' is set, 'fileformats' is
  235. set to the default value for the current system.  When 'textauto' is
  236. reset, 'fileformats' is made empty.
  237. NOTE: This option is set to the Vi default value when 'compatible' is
  238. set and to the Vim default value when 'compatible' is reset.

  239.    *'textmode'* *'tx'* *'notextmode'* *'notx'*
  240. 'textmode' 'tx'boolean(MS-DOS, Win32 and OS/2: default on,
  241. others: default off)
  242. local to buffer
  243. {not in Vi}
  244. This option is obsolete.  Use 'fileformat'.
  245. For backwards compatibility, when 'textmode' is set, 'fileformat' is
  246. set to "dos".  When 'textmode' is reset, 'fileformat' is set to
  247. "unix".

  248. *'textwidth'* *'tw'*
  249. 'textwidth' 'tw'number(default 0)
  250. local to buffer
  251. {not in Vi}
  252. Maximum width of text that is being inserted.  A longer line will be
  253. broken after white space to get this width.  A zero value disables
  254. this.  'textwidth' is set to 0 when the 'paste' option is set.When
  255. 'textwidth' is zero, 'wrapmargin' may be used.See also
  256. 'formatoptions' and |ins-textwidth|.
  257. NOTE: This option is set to 0 when 'compatible' is set.

  258. *'thesaurus'* *'tsr'*
  259. 'thesaurus' 'tsr'string(default "")
  260. global or local to buffer |global-local|
  261. {not in Vi}
  262. List of file names, separated by commas, that are used to lookup words
  263. for thesesaurus completion commands |i_CTRL-X_CTRL-T|.Each line in
  264. the file should contain words with similar meaning, separated by
  265. non-keyword characters (white space is preferred).  Maximum line
  266. length is 510 bytes.
  267. To obtain a file to be used here, check out the wordlist FAQ at
  268. [url]http://www.hyphenologist.co.uk[/url] .
  269. To include a comma in a file name precede it with a backslash.Spaces
  270. after a comma are ignored, otherwise spaces are included in the file
  271. name.  See |option-backslash| about using backslashes.
  272. The use of |:set+=| and |:set-=| is preferred when adding or removing
  273. directories from the list.  This avoids problems when a future version
  274. uses another default.
  275. Backticks cannot be used in this option for security reasons.

  276.      *'tildeop'* *'top'* *'notildeop'* *'notop'*
  277. 'tildeop' 'top'boolean(default off)
  278. global
  279. {not in Vi}
  280. When on: The tilde command "~" behaves like an operator.
  281. NOTE: This option is reset when 'compatible' is set.

  282. *'timeout'* *'to'* *'notimeout'* *'noto'*
  283. 'timeout' 'to'boolean (default on)
  284. global
  285. *'ttimeout'* *'nottimeout'*
  286. 'ttimeout'boolean (default off)
  287. global
  288. {not in Vi}
  289. These two options together determine the behavior when part of a
  290. mapped key sequence or keyboard code has been received:

  291. 'timeout'    'ttimeout'action
  292.    offoffdo not time out
  293.    onon or offtime out on :mappings and key codes
  294.    offontime out on key codes

  295. If both options are off, Vim will wait until either the complete
  296. mapping or key sequence has been received, or it is clear that there
  297. is no mapping or key sequence for the received characters.  For
  298. example: if you have mapped "vl" and Vim has received 'v', the next
  299. character is needed to see if the 'v' is followed by an 'l'.
  300. When one of the options is on, Vim will wait for about 1 second for
  301. the next character to arrive.  After that the already received
  302. characters are interpreted as single characters.  The waiting time can
  303. be changed with the 'timeoutlen' option.
  304. On slow terminals or very busy systems timing out may cause
  305. malfunctioning cursor keys.  If both options are off, Vim waits
  306. forever after an entered <Esc> if there are key codes that start
  307. with <Esc>.  You will have to type <Esc> twice.  If you do not have
  308. problems with key codes, but would like to have :mapped key
  309. sequences not timing out in 1 second, set the 'ttimeout' option and
  310. reset the 'timeout' option.

  311. NOTE: 'ttimeout' is reset when 'compatible' is set.

  312. *'timeoutlen'* *'tm'*
  313. 'timeoutlen' 'tm'number(default 1000)
  314. global
  315. {not in all versions of Vi}
  316. *'ttimeoutlen'* *'ttm'*
  317. 'ttimeoutlen' 'ttm'number(default -1)
  318. global
  319. {not in Vi}
  320. The time in milliseconds that is waited for a key code or mapped key
  321. sequence to complete.  Normally only 'timeoutlen' is used and
  322. 'ttimeoutlen' is -1.  When a different timeout value for key codes is
  323. desired set 'ttimeoutlen' to a non-negative number.

  324. ttimeoutlenmapping delay   key code delay
  325.    < 0'timeoutlen'   'timeoutlen'
  326.   >= 0'timeoutlen'   'ttimeoutlen'

  327. The timeout only happens when the 'timeout' and 'ttimeout' options
  328. tell so.  A useful setting would be
  329. :set timeout timeoutlen=3000 ttimeoutlen=100
  330. (time out on mapping after three seconds, time out on key codes after
  331. a tenth of a second).

  332. *'title'* *'notitle'*
  333. 'title'boolean(default off, on when title can be restored)
  334. global
  335. {not in Vi}
  336. {not available when compiled without the |+title|
  337. feature}
  338. When on, the title of the window will be set to the value of
  339. 'titlestring' (if it is not empty), or to:
  340. filename [+=-] (path) - VIM
  341. Where:
  342. filenamethe name of the file being edited
  343. -indicates the file canot be modified, 'ma' off
  344. +indicates the file was modified
  345. =indicates the file is read-only
  346. =+indicates the file is read-only and modified
  347. (path)is the path of the file being edited
  348. - VIMthe server name |v:servername| or "VIM"
  349. Only works if the terminal supports setting window titles
  350. (currently Amiga console, Win32 console, all GUI versions and
  351. terminals with a non- empty 't_ts' option - these are Unix xterm and
  352. iris-ansi by default, where 't_ts' is taken from the builtin termcap).
  353. *X11*
  354. When Vim was compiled with HAVE_X11 defined, the original title will
  355. be restored if possible.  The output of ":version" will include "+X11"
  356. when HAVE_X11 was defined, otherwise it will be "-X11".  This also
  357. works for the icon name |'icon'|.
  358. But: When Vim was started with the |-X| argument, restoring the title
  359. will not work (except in the GUI).
  360. If the title cannot be restored, it is set to the value of 'titleold'.
  361. You might want to restore the title outside of Vim then.
  362. When using an xterm from a remote machine you can use this command:
  363.     rsh machine_name xterm -display $DISPLAY &
  364. then the WINDOWID environment variable should be inherited and the
  365. title of the window should change back to what it should be after
  366. exiting Vim.

  367. *'titlelen'*
  368. 'titlelen'number(default 85)
  369. global
  370. {not in Vi}
  371. {not available when compiled without the |+title|
  372. feature}
  373. Gives the percentage of 'columns' to use for the length of the window
  374. title.When the title is longer, only the end of the path name is
  375. shown.A '<' character before the path name is used to indicate this.
  376. Using a percentage makes this adapt to the width of the window.  But
  377. it won't work perfectly, because the actual number of characters
  378. available also depends on the font used and other things in the title
  379. bar.  When 'titlelen' is zero the full path is used.  Otherwise,
  380. values from 1 to 30000 percent can be used.
  381. 'titlelen' is also used for the 'titlestring' option.

  382. *'titleold'*
  383. 'titleold'string(default "Thanks for flying Vim")
  384. global
  385. {not in Vi}
  386. {only available when compiled with the |+title|
  387. feature}
  388. This option will be used for the window title when exiting Vim if the
  389. original title cannot be restored.  Only happens if 'title' is on or
  390. 'titlestring' is not empty.
  391. *'titlestring'*
  392. 'titlestring'string(default "")
  393. global
  394. {not in Vi}
  395. {not available when compiled without the |+title|
  396. feature}
  397. When this option is not empty, it will be used for the title of the
  398. window.  This happens only when the 'title' option is on.
  399. Only works if the terminal supports setting window titles (currently
  400. Amiga console, Win32 console, all GUI versions and terminals with a
  401. non-empty 't_ts' option).
  402. When Vim was compiled with HAVE_X11 defined, the original title will
  403. be restored if possible |X11|.
  404. When this option contains printf-style '%' items, they will be
  405. expanded according to the rules used for 'statusline'.
  406. Example:
  407.     :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p")
  408.     :set title titlestring=%<%F%=%l/%L-%P titlelen=70
  409. The value of 'titlelen' is used to align items in the middle or right
  410. of the available space.
  411. Some people prefer to have the file name first:
  412.     :set titlestring=%t%(\ %M%)%(\ (%{expand("%:~:.:h")})%)%(\ %a%)
  413. Note the use of "%{ }" and an expression to get the path of the file,
  414. without the file name.The "%( %)" constructs are used to add a
  415. separating space only when needed.
  416. NOTE: Use of special characters in 'titlestring' may cause the display
  417. to be garbled (e.g., when it contains a CR or NL character).
  418. {not available when compiled without the |+statusline| feature}

  419. *'toolbar'* *'tb'*
  420. 'toolbar' 'tb'string(default "icons,tooltips")
  421. global
  422. {only for |+GUI_GTK|, |+GUI_Athena|, |+GUI_Motif| and
  423. |+GUI_Photon|}
  424. The contents of this option controls various toolbar settings.The
  425. possible values are:
  426. iconsToolbar buttons are shown with icons.
  427. textToolbar buttons shown with text.
  428. horizIcon and text of a toolbar button are
  429. horizontally arranged.{only in GTK+ 2 GUI}
  430. tooltipsTooltips are active for toolbar buttons.
  431. Tooltips refer to the popup help text which appears after the mouse
  432. cursor is placed over a toolbar button for a brief moment.

  433. If you want the toolbar to be shown with icons as well as text, do the
  434. following:
  435. :set tb=icons,text
  436. Motif and Athena cannot display icons and text at the same time.  They
  437. will show icons if both are requested.

  438. If none of the strings specified in 'toolbar' are valid or if
  439. 'toolbar' is empty, this option is ignored.  If you want to disable
  440. the toolbar, you need to set the 'guioptions' option.  For example:
  441. :set guioptions-=T
  442. Also see |gui-toolbar|.

  443. *'toolbariconsize'* *'tbis'*
  444. 'toolbariconsize' 'tbis'string(default "small")
  445. global
  446. {not in Vi}
  447. {only in the GTK+ 2 GUI}
  448. Controls the size of toolbar icons.  The possible values are:
  449. tinyUse tiny toolbar icons.
  450. smallUse small toolbar icons (default).
  451. mediumUse medium-sized toolbar icons.
  452. largeUse large toolbar icons.
  453. The exact dimensions in pixels of the various icon sizes depend on
  454. the current theme.  Common dimensions are large=32x32, medium=24x24,
  455. small=20x20 and tiny=16x16.

  456. If 'toolbariconsize' is empty, the global default size as determined
  457. by user preferences or the current theme is used.

  458.      *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
  459. 'ttybuiltin' 'tbi'boolean(default on)
  460. global
  461. {not in Vi}
  462. When on, the builtin termcaps are searched before the external ones.
  463. When off the builtin termcaps are searched after the external ones.
  464. When this option is changed, you should set the 'term' option next for
  465. the change to take effect, for example:
  466. :set notbi term=$TERM
  467. See also |termcap|.
  468. Rationale: The default for this option is "on", because the builtin
  469. termcap entries are generally better (many systems contain faulty
  470. xterm entries...).

  471.      *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
  472. 'ttyfast' 'tf'boolean(default off, on when 'term' is xterm, hpterm,
  473. sun-cmd, screen, rxvt, dtterm or
  474. iris-ansi; also on when running Vim in
  475. a DOS console)
  476. global
  477. {not in Vi}
  478. Indicates a fast terminal connection.  More characters will be sent to
  479. the screen for redrawing, instead of using insert/delete line
  480. commands.  Improves smoothness of redrawing when there are multiple
  481. windows and the terminal does not support a scrolling region.
  482. Also enables the extra writing of characters at the end of each screen
  483. line for lines that wrap.  This helps when using copy/paste with the
  484. mouse in an xterm and other terminals.

  485. *'ttymouse'* *'ttym'*
  486. 'ttymouse' 'ttym'string(default depends on 'term')
  487. global
  488. {not in Vi}
  489. {only in Unix and VMS, doesn't work in the GUI; not
  490. available when compiled without |+mouse|}
  491. Name of the terminal type for which mouse codes are to be recognized.
  492. Currently these three strings are valid:
  493. *xterm-mouse*
  494.    xtermxterm-like mouse handling.  The mouse generates
  495. "<Esc>[Mscr", where "scr" is three bytes:
  496. "s"  = button state
  497. "c"  = column plus 33
  498. "r"  = row plus 33
  499.    xterm2Works like "xterm", but with the xterm reporting the
  500. mouse position while the mouse is dragged.  This works
  501. much faster and more precise.  Your xterm must at
  502. least at patchlevel 88/ XFree 3.3.3 for this to
  503. work.  See below for how Vim detects this
  504. automatically.
  505. *netterm-mouse*
  506.    nettermNetTerm mouse handling.  The mouse generates
  507. "<Esc>}r,c<CR>", where "r,c" are two decimal numbers
  508. for the row and column.
  509. *dec-mouse*
  510.    decDEC terminal mouse handling.  The mouse generates a
  511. rather complex sequence, starting with "<Esc>[".
  512. *jsbterm-mouse*
  513.    jsbtermJSB term mouse handling.
  514. *pterm-mouse*
  515.    ptermQNX pterm mouse handling.

  516. The mouse handling must be enabled at compile time |+mouse_xterm|
  517. |+mouse_dec| |+mouse_netterm|.
  518. Only "xterm"(2) is really recognized.  NetTerm mouse codes are always
  519. recognized, if enabled at compile time.  DEC terminal mouse codes
  520. are recognized if enabled at compile time, and 'ttymouse' is not
  521. "xterm" (because the xterm and dec mouse codes conflict).
  522. This option is automatically set to "xterm", when the 'term' option is
  523. set to a name that starts with "xterm", and 'ttymouse' is not "xterm"
  524. or "xterm2" already.  The main use of this option is to set it to
  525. "xterm", when the terminal name doesn't start with "xterm", but it can
  526. handle xterm mouse codes.
  527. The "xterm2" value will be set if the xterm version is reported to be
  528. 95 of higher.  This only works when compiled with the |+termresponse|
  529. feature and if |t_RV| is set to the escape sequence to request the
  530. xterm version number.  Otherwise "xterm2" must be set explicitly.
  531. If you do not want 'ttymouse' to be set to "xterm2" automatically, set
  532. t_RV to an empty string:
  533. :set t_RV=

  534. *'ttyscroll'* *'tsl'*
  535. 'ttyscroll' 'tsl'number(default 999)
  536. global
  537. Maximum number of lines to scroll the screen.  If there are more lines
  538. to scroll the window is redrawn.  For terminals where scrolling is
  539. very slow and redrawing is not slow this can be set to a small number,
  540. e.g., 3, to speed up displaying.

  541. *'ttytype'* *'tty'*
  542. 'ttytype' 'tty'string(default from $TERM)
  543. global
  544. Alias for 'term', see above.

  545. *'undolevels'* *'ul'*
  546. 'undolevels' 'ul'number(default 100, 1000 for Unix, VMS,
  547. Win32 and OS/2)
  548. global
  549. {not in Vi}
  550. Maximum number of changes that can be undone.  Since undo information
  551. is kept in memory, higher numbers will cause more memory to be used
  552. (nevertheless, a single change can use an unlimited amount of memory).
  553. Set to 0 for Vi compatibility: One level of undo and "u" undoes
  554. itself:
  555. set ul=0
  556. But you can also get Vi compatibility by including the 'u' flag in
  557. 'cpoptions', and still be able to use CTRL-R to repeat undo.
  558. Set to a negative number for no undo at all:
  559. set ul=-1
  560. This helps when you run out of memory for a single change.
  561. Also see |undo-two-ways|.

  562. *'updatecount'* *'uc'*
  563. 'updatecount' 'uc'number(default: 200)
  564. global
  565. {not in Vi}
  566. After typing this many characters the swap file will be written to
  567. disk.  When zero, no swap file will be created at all (see chapter on
  568. recovery |crash-recovery|).  'updatecount' is set to zero by starting
  569. Vim with the "-n" option, see |startup|.  When editing in readonly
  570. mode this option will be initialized to 10000.
  571. The swapfile can be disabled per buffer with |'swapfile'|.
  572. When 'updatecount' is set from non-zero to zero, swap files are
  573. created for all buffers that have 'swapfile' set.  When 'updatecount'
  574. is set to zero, existing swap files are not deleted.
  575. Also see |'swapsync'|.
  576. This option has no meaning in buffers where |'buftype'| is "nofile"
  577. or "nowrite".

  578. *'updatetime'* *'ut'*
  579. 'updatetime' 'ut'number(default 4000)
  580. global
  581. {not in Vi}
  582. If this many milliseconds nothing is typed the swap file will be
  583. written to disk (see |crash-recovery|).  Also used for the
  584. |CursorHold| autocommand event.

  585. *'verbose'* *'vbs'*
  586. 'verbose' 'vbs'number(default 0)
  587. global
  588. {not in Vi, although some versions have a boolean
  589. verbose option}
  590. When bigger than zero, Vim will give messages about what it is doing.
  591. Currently, these messages are given:
  592. >= 1When the viminfo file is read or written.
  593. >= 2When a file is ":source"'ed.
  594. >= 5Every searched tags file.
  595. >= 8Files for which a group of autocommands is executed.
  596. >= 9Every executed autocommand.
  597. >= 12Every executed function.
  598. >= 13When an exception is thrown, caught, finished, or discarded.
  599. >= 14Anything pending in a ":finally" clause.
  600. >= 15Every executed Ex command (truncated at 200 characters).

  601. This option can also be set with the "-V" argument.  See |-V|.
  602. This option is also set by the |:verbose| command.

  603. *'viewdir'* *'vdir'*
  604. 'viewdir' 'vdir'string(default for Amiga, MS-DOS, OS/2 and Win32:
  605. "$VIM/vimfiles/view",
  606. for Unix: "~/.vim/view",
  607. for Macintosh: "$VIM:vimfiles:view"
  608. for VMS: "sys$login:vimfiles/view"
  609. for RiscOS: "Choices:vimfiles/view")
  610. global
  611. {not in Vi}
  612. {not available when compiled without the +mksession
  613. feature}
  614. Name of the directory where to store files for |:mkview|.
  615. This option cannot be set from a |modeline|, for security reasons.

  616. *'viewoptions'* *'vop'*
  617. 'viewoptions' 'vop'string(default: "folds,options,cursor")
  618. global
  619. {not in Vi}
  620. {not available when compiled without the +mksession
  621. feature}
  622. Changes the effect of the |:mkview| command.  It is a comma separated
  623. list of words.Each word enables saving and restoring something:
  624.    wordsave and restore
  625.    cursorcursor position in file and in window
  626.    foldsmanually created folds, opened/closed folds and local
  627. fold options
  628.    optionsoptions and mappings local to a window or buffer (not
  629. global values for local options)
  630.    slashbackslashes in file names replaced with forward
  631. slashes
  632.    unixwith Unix end-of-line format (single <NL>), even when
  633. on Windows or DOS

  634. "slash" and "unix" are useful on Windows when sharing view files
  635. with Unix.  The Unix version of Vim cannot source dos format scripts,
  636. but the Windows version of Vim can source unix format scripts.

  637. *'viminfo'* *'vi'* *E526* *E527* *E528*
  638. 'viminfo' 'vi'string(Vi default: "", Vim default for MS-DOS,
  639.    Windows and OS/2: '20,<50,s10,h,rA:,rB:,
  640.    for Amiga: '20,<50,s10,h,rdf0:,rdf1:,rdf2:
  641.    for others: '20,<50,s10,h)
  642. global
  643. {not in Vi}
  644. {not available when compiled without the  |+viminfo|
  645. feature}
  646. When non-empty, the viminfo file is read upon startup and written
  647. when exiting Vim (see |viminfo-file|).The string should be a comma
  648. separated list of parameters, each consisting of a single character
  649. identifying the particular parameter, followed by a number or string
  650. which specifies the value of that parameter.  If a particular
  651. character is left out, then the default value is used for that
  652. parameter.  The following is a list of the identifying characters and
  653. the effect of their value.
  654. CHARVALUE
  655. !When included, save and restore global variables that start
  656. with an uppercase letter, and don't contain a lowercase
  657. letter.  Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
  658. and "_K_L_M" are not.
  659. "Maximum number of lines saved for each register.  Old name of
  660. the '<' item, with the disadvantage that you need to put a
  661. backslash before the ", otherwise it will be recognized as the
  662. start of a comment!
  663. %When included, save and restore the buffer list.  If Vim is
  664. started with a file name argument, the buffer list is not
  665. restored.  If Vim is started without a file name argument, the
  666. buffer list is restored from the viminfo file.Buffers
  667. without a file name and buffers for help files are not written
  668. to the viminfo file.
  669. 'Maximum number of previously edited files for which the marks
  670. are remembered.  This parameter must always be included when
  671. 'viminfo' is non-empty.
  672. Including this item also means that the |jumplist| and the
  673. |changelist| are stored in the viminfo file.
  674. /Maximum number of items in the search pattern history to be
  675. saved.If non-zero, then the previous search and substitute
  676. patterns are also saved.  When not included, the value of
  677. 'history' is used.
  678. :Maximum number of items in the command-line history to be
  679. saved.When not included, the value of 'history' is used.
  680. <Maximum number of lines saved for each register.  If zero then
  681. registers are not saved.  When not included, all lines are
  682. saved.  '"' is the old name for this item.
  683. Also see the 's' item below: limit specified in Kbyte.
  684. @Maximum number of items in the input-line history to be
  685. saved.When not included, the value of 'history' is used.
  686. cWhen included, convert the text in the viminfo file from the
  687. 'encoding' used when writing the file to the current
  688. 'encoding'. See |viminfo-encoding|.
  689. fWhether file marks need to be stored.  If zero, file marks ('0
  690. to '9, 'A to 'Z) are not stored.  When not present or when
  691. non-zero, they are all stored.'0 is used for the current
  692. cursor position (when exiting or when doing ":wviminfo").
  693. hDisable the effect of 'hlsearch' when loading the viminfo
  694. file.  When not included, it depends on whether ":nohlsearch"
  695. has been used since the last search command.
  696. nName of the viminfo file.  The name must immediately follow
  697. the 'n'.  Must be the last one!  If the "-i" argument was
  698. given when starting Vim, that file name overrides the one
  699. given here with 'viminfo'.  Environment variables are expanded
  700. when opening the file, not when setting the option.
  701. rRemovable media.  The argument is a string (up to the next
  702. ',').  This parameter can be given several times.  Each
  703. specifies the start of a path for which no marks will be
  704. stored.  This is to avoid removable media.  For MS-DOS you
  705. could use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:".  You can
  706. also use it for temp files, e.g., for Unix: "r/tmp".  Case is
  707. ignored.  Maximum length of each 'r' argument is 50
  708. characters.
  709. sMaximum size of an item in Kbyte.  If zero then registers are
  710. not saved.  Currently only applies to registers.  The default
  711. "s10" will exclude registers with more than 10 Kbyte of text.
  712. Also see the '<' item above: line count limit.

  713. Example:
  714.     :set viminfo='50,<1000,s100,:0,n~/vim/viminfo

  715. '50Marks will be remembered for the last 50 files you
  716. edited.
  717. <1000Contents of registers (up to 1000 lines each) will be
  718. remembered.
  719. s100Registers with more than 100 Kbyte text are skipped.
  720. :0Command-line history will not be saved.
  721. n~/vim/viminfoThe name of the file to use is "~/vim/viminfo".
  722. no /Since '/' is not specified, the default will be used,
  723. that is, save all of the search history, and also the
  724. previous search and substitute patterns.
  725. no %The buffer list will not be saved nor read back.
  726. no h'hlsearch' highlighting will be restored.

  727. This option cannot be set from a |modeline|, for security reasons.

  728.     *'virtualedit'* *'ve'*
  729. 'virtualedit' 've'string(default "")
  730. global
  731. {not in Vi}
  732. {not available when compiled without the
  733. |+virtualedit| feature}
  734. A comma separated list of these words:
  735.     blockAllow virtual editing in Visual block mode.
  736.     insertAllow virtual editing in Insert mode.
  737.     allAllow virtual editing in all modes.
  738. Virtual editing means that the cursor can be positioned where there is
  739. no actual character.  This can be halfway into a Tab or beyond the end
  740. of the line.  Useful for selecting a rectangle in Visual mode and
  741. editing a table.

  742. *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
  743. 'visualbell' 'vb'boolean(default off)
  744. global
  745. {not in Vi}
  746. Use visual bell instead of beeping.  The terminal code to display the
  747. visual bell is given with 't_vb'.  When no beep or flash is wanted,
  748. use ":set vb t_vb=".
  749. Note: When the GUI starts, 't_vb' is reset to its default value.  You
  750. might want to set it again in your |gvimrc|.
  751. In the GUI, 't_vb' defaults to "<Esc>|f", which inverts the display
  752. for 20 msec.  If you want to use a different time, use "<Esc>|40f",
  753. where 40 is the time in msec.
  754. Does not work on the Amiga, you always get a screen flash.
  755. Also see 'errorbells'.

  756. *'warn'* *'nowarn'*
  757. 'warn'boolean(default on)
  758. global
  759. Give a warning message when a shell command is used while the buffer
  760. has been changed.

  761.      *'weirdinvert'* *'wiv'* *'noweirdinvert'* *'nowiv'*
  762. 'weirdinvert' 'wiv'boolean(default off)
  763. global
  764. {not in Vi}
  765. This option has the same effect as the 't_xs' termcap option.
  766. It is provided for backwards compatibility with version 4.x.
  767. Setting 'weirdinvert' has the effect of making 't_xs' non-empty, and
  768. vice versa.  Has no effect when the GUI is running.

  769. *'whichwrap'* *'ww'*
  770. 'whichwrap' 'ww'string(Vim default: "b,s", Vi default: "")
  771. global
  772. {not in Vi}
  773. Allow specified keys that move the cursor left/right to wrap to the
  774. previous/next line when the cursor is on the first/last character in
  775. the line.  Concatenate characters to allow this for these keys:
  776. char   key  mode
  777. b    <BS> Normal and Visual
  778. s    <Space> Normal and Visual
  779. h    "h" Normal and Visual
  780. l    "l" Normal and Visual
  781. <    <Left> Normal and Visual
  782. >    <Right> Normal and Visual
  783. ~    "~" Normal
  784. [    <Left> Insert and Replace
  785. ]    <Right> Insert and Replace
  786. For example:
  787. :set ww=<,>,[,]
  788. allows wrap only when cursor keys are used.
  789. When the movement keys are used in combination with a delete or change
  790. operator, the <EOL> also counts for a character.  This makes "3h"
  791. different from "3dh" when the cursor crosses the end of a line.  This
  792. is also true for "x" and "X", because they do the same as "dl" and
  793. "dh".  If you use this, you may also want to use the mapping
  794. ":map <BS> X" to make backspace delete the character in front of the
  795. cursor.
  796. When 'l' is included, you get a side effect: "yl" on an empty line
  797. will include the <EOL>, so that "p" will insert a new line.
  798. NOTE: This option is set to the Vi default value when 'compatible' is
  799. set and to the Vim default value when 'compatible' is reset.

  800. *'wildchar'* *'wc'*
  801. 'wildchar' 'wc'number(Vim default: <Tab>, Vi default: CTRL-E)
  802. global
  803. {not in Vi}
  804. Character you have to type to start wildcard expansion in the
  805. command-line, as specified with 'wildmode'.
  806. The character is not recognized when used inside a macro.  See
  807. 'wildcharm' for that.
  808. Although 'wc' is a number option, you can set it to a special key:
  809. :set wc=<Esc>
  810. NOTE: This option is set to the Vi default value when 'compatible' is
  811. set and to the Vim default value when 'compatible' is reset.

  812. *'wildcharm'* *'wcm'*
  813. 'wildcharm' 'wcm'number(default: none (0))
  814. global
  815. {not in Vi}
  816. 'wildcharm' works exactly like 'wildchar', except that it is
  817. recognized when used inside a macro. You can find "spare" command-line
  818. keys suitable for this option by looking at |ex-edit-index|. Normally
  819. you'll never actually type 'wildcharm', just use it in mappings that
  820. automatically invoke completion mode, e.g.:
  821. :set wcm=<C-Z>
  822. :cmap ss so $vim/sessions/*.vim<C-Z>
  823. Then after typing :ss you can use CTRL-P & CTRL-N.

  824. *'wildignore'* *'wig'*
  825. 'wildignore' 'wig'string(default "")
  826. global
  827. {not in Vi}
  828. {not available when compiled without the |+wildignore|
  829. feature}
  830. A list of file patterns.  A file that matches with one of these
  831. patterns is ignored when completing file or directory names.
  832. The pattern is used like with |:autocmd|, see |autocmd-patterns|.
  833. Also see 'suffixes'.
  834. Example:
  835. :set wildignore=*.o,*.obj
  836. The use of |:set+=| and |:set-=| is preferred when adding or removing
  837. a pattern from the list.  This avoids problems when a future version
  838. uses another default.

  839. *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
  840. 'wildmenu' 'wmnu'boolean(default off)
  841. global
  842. {not in Vi}
  843. {not available if compiled without the |+wildmenu|
  844. feature}
  845. When 'wildmenu' is on, command-line completion operates in an enhanced
  846. mode.  On pressing 'wildchar' (usually <Tab>) to invoke completion,
  847. the possible matches are shown just above the command line, with the
  848. first match highlighted (overwriting the status line, if there is
  849. one).  Keys that show the previous/next match, such as <Tab> or
  850. CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
  851. When 'wildmode' is used, "wildmenu" mode is used where "full" is
  852. specified.  "longest" and "list" do not start "wildmenu" mode.
  853. If there are more matches than can fit in the line, a ">" is shown on
  854. the right and/or a "<" is shown on the left.  The status line scrolls
  855. as needed.
  856. The "wildmenu" mode is abandoned when a key is hit that is not used
  857. for selecting a completion.
  858. While the "wildmenu" is active the following keys have special
  859. meanings:

  860. <Left> <Right>- select previous/next match (like CTRL-P/CTRL-N)
  861. <Down>- in filename/menu name completion: move into a
  862.   subdirectory or submenu.
  863. <CR>- in menu completion, when the cursor is just after a
  864.   dot: move into a submenu.
  865. <Up>- in filename/menu name completion: move up into
  866.   parent directory or parent menu.

  867. This makes the menus accessible from the console |console-menus|.

  868. If you prefer the <Left> and <Right> keys to move the cursor instead
  869. of selecting a different match, use this:
  870. :cnoremap <Left> <Space><BS><Left>
  871. :cnoremap <Right> <Space><BS><Right>

  872. The "WildMenu" highlighting is used for displaying the current match
  873. |hl-WildMenu|.

  874. *'wildmode'* *'wim'*
  875. 'wildmode' 'wim'string(Vim default: "full")
  876. global
  877. {not in Vi}
  878. Completion mode that is used for the character specified with
  879. 'wildchar'.  It is a comma separated list of up to four parts.Each
  880. part specifies what to do for each consecutive use of 'wildchar.  The
  881. first part specifies the behavior for the first use of 'wildchar',
  882. The second part for the second use, etc.
  883. These are the possible values for each part:
  884. ""Complete only the first match.
  885. "full"Complete the next full match.  After the last match,
  886. the original string is used and then the first match
  887. again.
  888. "longest"Complete till longest common string.  If this doesn't
  889. result in a longer string, use the next part.
  890. "longest:full"Like "longest", but also start 'wildmenu' if it is
  891. enabled.
  892. "list"When more than one match, list all matches.
  893. "list:full"When more than one match, list all matches and
  894. complete first match.
  895. "list:longest"When more than one match, list all matches and
  896. complete till longest common string.
  897. When there is only a single match, it is fully completed in all cases.

  898. Examples:
  899. :set wildmode=full
  900. <Complete first full match, next match, etc. (the default)
  901. :set wildmode=longest,full
  902. <Complete longest common string, then each full match
  903. :set wildmode=list:full
  904. <List all matches and complete each full match
  905. :set wildmode=list,full
  906. <List all matches without completing, then each full match
  907. :set wildmode=longest,list
  908. Complete longest common string, then list alternatives.

  909. *'winaltkeys'* *'wak'*
  910. 'winaltkeys' 'wak'string(default "menu")
  911. global
  912. {not in Vi}
  913. {only used in Win32, Motif, GTK and Photon GUI}
  914. Some GUI versions allow the access to menu entries by using the ALT
  915. key in combination with a character that appears underlined in the
  916. menu.  This conflicts with the use of the ALT key for mappings and
  917. entering special characters.  This option tells what to do:
  918.   noDon't use ALT keys for menus.  ALT key combinations can be
  919. mapped, but there is no automatic handling.  This can then be
  920. done with the |:simalt| command.
  921.   yesALT key handling is done by the windowing system.  ALT key
  922. combinations cannot be mapped.
  923.   menuUsing ALT in combination with a character that is a menu
  924. shortcut key, will be handled by the windowing system.Other
  925. keys can be mapped.
  926. If the menu is disabled by excluding 'm' from 'guioptions', the ALT
  927. key is never used for the menu.
  928. In the Win32 version, the <F10> key is handled like this too, since
  929. Windows uses it to select a menu.

  930. *'winheight'* *'wh'* *E591*
  931. 'winheight' 'wh'number(default 1)
  932. global
  933. {not in Vi}
  934. {not available when compiled without the +windows
  935. feature}
  936. Minimal number of lines for the current window.  This is not a hard
  937. minimum, Vim will use fewer lines if there is not enough room.If the
  938. current window is smaller, its size is increased, at the cost of the
  939. height of other windows.  Set it to 999 to make the current window
  940. always fill the screen.  Set it to a small number for normal editing.
  941. Minimum value is 1.
  942. The height is not adjusted after one of the commands to change the
  943. height of the current window.
  944. 'winheight' applies to the current window.  Use 'winminheight' to set
  945. the minimal height for other windows.

  946. *'winfixheight'* *'wfh'*
  947. 'winfixheight' 'wfh'boolean(default off)
  948. local to window
  949. {not in Vi}
  950. {not available when compiled without the +windows
  951. feature}
  952. Keep the window height when windows are opened or closed and
  953. 'equalalways' is set.  Set by default for the |preview-window| and
  954. |quickfix-window|.
  955. The height may be changed anyway when running out of room.

  956. *'winminheight'* *'wmh'*
  957. 'winminheight' 'wmh'number(default 1)
  958. global
  959. {not in Vi}
  960. {not available when compiled without the +windows
  961. feature}
  962. The minimal height of a window, when it's not the current window.
  963. This is a hard minimum, windows will never become smaller.
  964. When set to zero, windows may be "squashed" to zero lines (i.e. just a
  965. status bar) if necessary.  They will return to at least one line when
  966. they become active (since the cursor has to have somewhere to go.)
  967. Use 'winheight' to set the minimal height of the current window.
  968. This option is only checked when making a window smaller.  Don't use a
  969. large number, it will cause errors when opening more than a few
  970. windows.  A value of 0 to 3 is reasonable.

  971. *'winminwidth'* *'wmw'*
  972. 'winminwidth' 'wmw'number(default 1)
  973. global
  974. {not in Vi}
  975. {not available when compiled without the +vertsplit
  976. feature}
  977. The minimal width of a window, when it's not the current window.
  978. This is a hard minimum, windows will never become smaller.
  979. When set to zero, windows may be "squashed" to zero columns (i.e. just
  980. a vertical separator) if necessary.  They will return to at least one
  981. line when they become active (since the cursor has to have somewhere
  982. to go.)
  983. Use 'winwidth' to set the minimal width of the current window.
  984. This option is only checked when making a window smaller.  Don't use a
  985. large number, it will cause errors when opening more than a few
  986. windows.  A value of 0 to 12 is reasonable.

  987. *'winwidth'* *'wiw'* *E592*
  988. 'winwidth' 'wiw'number(default 20)
  989. global
  990. {not in Vi}
  991. {not available when compiled without the +vertsplit
  992. feature}
  993. Minimal number of columns for the current window.  This is not a hard
  994. minimum, Vim will use fewer columns if there is not enough room.  If
  995. the current window is smaller, its size is increased, at the cost of
  996. the width of other windows.  Set it to 999 to make the current window
  997. always fill the screen.  Set it to a small number for normal editing.
  998. The width is not adjusted after one of the commands to change the
  999. width of the current window.
  1000. 'winwidth' applies to the current window.  Use 'winminwidth' to set
  1001. the minimal width for other windows.

  1002. *'wrap'* *'nowrap'*
  1003. 'wrap'boolean(default on)
  1004. local to window
  1005. {not in Vi}
  1006. This option changes how text is displayed.  It doesn't change the text
  1007. in the buffer, see 'textwidth' for that.
  1008. When on, lines longer than the width of the window will wrap and
  1009. displaying continues on the next line.When off lines will not wrap
  1010. and only part of long lines will be displayed.When the cursor is
  1011. moved to a part that is not shown, the screen will scroll
  1012. horizontally.
  1013. The line will be broken in the middle of a word if necessary.  See
  1014. 'linebreak' to get the break at a word boundary.
  1015. To make scrolling horizontally a bit more useful, try this:
  1016. :set sidescroll=5
  1017. :set listchars+=precedes:<,extends:>
  1018. See 'sidescroll', 'listchars' and |wrap-off|.

  1019. *'wrapmargin'* *'wm'*
  1020. 'wrapmargin' 'wm'number(default 0)
  1021. local to buffer
  1022. Number of characters from the right window border where wrapping
  1023. starts.  When typing text beyond this limit, an <EOL> will be inserted
  1024. and inserting continues on the next line.  When 'textwidth' is
  1025. non-zero, this option is not used.  See also 'formatoptions' and
  1026. |ins-textwidth|.  {Vi: works differently and less usefully}

  1027.    *'wrapscan'* *'ws'* *'nowrapscan'* *'nows'*
  1028. 'wrapscan' 'ws'boolean(default on)*E384* *E385*
  1029. global
  1030. Searches wrap around the end of the file.

  1031.    *'write'* *'nowrite'*
  1032. 'write'boolean(default on)
  1033. global
  1034. {not in Vi}
  1035. Allows writing files.  When not set, writing a file is not allowed.
  1036. Can be used for a view-only mode, where modifications to the text are
  1037. still allowed.Can be reset with the |-m| or |-M| command line
  1038. argument.  Filtering text is still possible, even though this requires
  1039. writing a temporary file.

  1040.    *'writeany'* *'wa'* *'nowriteany'* *'nowa'*
  1041. 'writeany' 'wa'boolean(default off)
  1042. global
  1043. Allows writing to any file with no need for "!" override.

  1044.      *'writebackup'* *'wb'* *'nowritebackup'* *'nowb'*
  1045. 'writebackup' 'wb'boolean(default on with |+writebackup| feature, off
  1046. otherwise)
  1047. global
  1048. {not in Vi}
  1049. Make a backup before overwriting a file.  The backup is removed after
  1050. the file was successfully written, unless the 'backup' option is
  1051. also on.  Reset this option if your file system is almost full.  See
  1052. |backup-table| for another explanation.
  1053. When the 'backupskip' pattern matches, a backup is not made anyway.
  1054. NOTE: This option is set to the default value when 'compatible' is
  1055. set.

  1056. *'writedelay'* *'wd'*
  1057. 'writedelay' 'wd'number(default 0)
  1058. global
  1059. {not in Vi}
  1060. The number of microseconds to wait for each character sent to the
  1061. screen.  When non-zero, characters are sent to the terminal one by
  1062. one.  For MS-DOS pcterm this does not work.  For debugging purposes.

  1063. vim:tw=78:ts=8:ft=help:norl:
复制代码

Generated by vim2html on Thu Jun 17 12:17:02 CEST 2004
VIM is great
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表