1 " These commands create the option window.
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last Change: 2013 Jun 29
6 " If there already is an option window, jump to that one.
7 if bufwinnr("option-window") > 0
8 let s:thiswin = winnr()
10 if @% == "option-window"
14 if s:thiswin == winnr()
20 " Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
21 " not be recognized. See ":help 'cpoptions'".
25 " function to be called when <CR> is hit in the option-window
28 " If on a continued comment line, go back to the first comment line
29 let lnum = search("^[^\t]", 'bWcn')
30 let line = getline(lnum)
32 " <CR> on a "set" line executes the option line
33 if match(line, "^ \tset ") >= 0
35 " For a local option: go to the previous window
36 " If this is a help window, go to the window below it
38 let local = <SID>Find(lnum)
41 call <SID>Update(lnum, line, local, thiswin)
44 " <CR> on a "option" line shows help for that option
45 elseif match(line, "^[a-z]") >= 0
46 let name = substitute(line, '\([^\t]*\).*', '\1', "")
47 exe "help '" . name . "'"
49 " <CR> on an index line jumps to the group
50 elseif match(line, '^ \=[0-9]') >= 0
51 exe "norm! /" . line . "\<CR>zt"
55 " function to be called when <Space> is hit in the option-window
59 let line = getline(lnum)
61 " <Space> on a "set" line refreshes the option line
62 if match(line, "^ \tset ") >= 0
64 " For a local option: go to the previous window
65 " If this is a help window, go to the window below it
67 let local = <SID>Find(lnum)
69 call <SID>Update(lnum, line, local, thiswin)
75 " find the window in which the option applies
76 " returns 0 for global option, 1 for local option, -1 for error
78 if getline(a:lnum - 1) =~ "(local to"
82 if exists("b:current_syntax") && b:current_syntax == "help"
91 if local && (winnr() == thiswin || (exists("b:current_syntax")
92 \ && b:current_syntax == "help"))
93 echo "Don't know in which window"
99 " Update a "set" line in the option window
100 fun! <SID>Update(lnum, line, local, thiswin)
101 " get the new value of the option and update the option window line
102 if match(a:line, "=") >= 0
103 let name = substitute(a:line, '^ \tset \([^=]*\)=.*', '\1', "")
105 let name = substitute(a:line, '^ \tset \(no\)\=\([a-z]*\).*', '\2', "")
107 if name == "pt" && &pt =~ "\x80"
108 let val = <SID>PTvalue()
110 let val = escape(eval('&' . name), " \t\\\"|")
113 exe a:thiswin . "wincmd w"
115 if match(a:line, "=") >= 0 || (val != "0" && val != "1")
116 call setline(a:lnum, " \tset " . name . "=" . val)
119 call setline(a:lnum, " \tset " . name . "\tno" . name)
121 call setline(a:lnum, " \tset no" . name . "\t" . name)
127 " Reset 'title' and 'icon' to make it work faster.
128 let s:old_title = &title
129 let s:old_icon = &icon
132 set notitle noicon nosc noru
134 " If the current window is a help window, try finding a non-help window.
135 " Relies on syntax highlighting to be switched on.
136 let s:thiswin = winnr()
137 while exists("b:current_syntax") && b:current_syntax == "help"
139 if s:thiswin == winnr()
146 setlocal ts=15 tw=0 noro buftype=nofile
148 " Insert help and a "set" command for each option.
149 call append(0, '" Each "set" line shows the current value of an option (on the left).')
150 call append(1, '" Hit <CR> on a "set" line to execute it.')
151 call append(2, '" A boolean option will be toggled.')
152 call append(3, '" For other options you can edit the value.')
153 call append(4, '" Hit <CR> on a help line to open a help window on this option.')
154 call append(5, '" Hit <CR> on an index line to jump there.')
155 call append(6, '" Hit <Space> on a "set" line to refresh it.')
157 " These functions are called often below. Keep them fast!
159 " Init a local binary option
160 fun! <SID>BinOptionL(name)
161 let val = getwinvar(winnr('#'), '&' . a:name)
162 call append("$", substitute(substitute(" \tset " . val . a:name . "\t" .
163 \!val . a:name, "0", "no", ""), "1", "", ""))
166 " Init a global binary option
167 fun! <SID>BinOptionG(name, val)
168 call append("$", substitute(substitute(" \tset " . a:val . a:name . "\t" .
169 \!a:val . a:name, "0", "no", ""), "1", "", ""))
172 " Init a local string option
173 fun! <SID>OptionL(name)
174 let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|")
175 call append("$", " \tset " . a:name . "=" . val)
178 " Init a global string option
179 fun! <SID>OptionG(name, val)
180 call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|"))
184 let s:lnum = line("$")
187 fun! <SID>Header(text)
188 let line = s:idx . " " . a:text
190 let line = " " . line
193 call append("$", line)
195 call append(s:lnum, line)
196 let s:idx = s:idx + 1
197 let s:lnum = s:lnum + 1
200 " Get the value of 'pastetoggle'. It could be a special key.
205 return substitute(@a, '[^=]*=\(.*\)', '\1', "")
208 " Restore the previous value of 'cpoptions' here, it's used below.
209 let &cpo = s:cpo_save
211 " List of all options, organized by function.
212 " The text should be sufficient to know what the option is used for.
214 call <SID>Header("important")
215 call append("$", "compatible\tbehave very Vi compatible (not advisable)")
216 call <SID>BinOptionG("cp", &cp)
217 call append("$", "cpoptions\tlist of flags to specify Vi compatibility")
218 call <SID>OptionG("cpo", &cpo)
219 call append("$", "insertmode\tuse Insert mode as the default mode")
220 call <SID>BinOptionG("im", &im)
221 call append("$", "paste\tpaste mode, insert typed text literally")
222 call <SID>BinOptionG("paste", &paste)
223 call append("$", "pastetoggle\tkey sequence to toggle paste mode")
225 call append("$", " \tset pt=" . <SID>PTvalue())
227 call <SID>OptionG("pt", &pt)
229 call append("$", "runtimepath\tlist of directories used for runtime files and plugins")
230 call <SID>OptionG("rtp", &rtp)
231 call append("$", "helpfile\tname of the main help file")
232 call <SID>OptionG("hf", &hf)
235 call <SID>Header("moving around, searching and patterns")
236 call append("$", "whichwrap\tlist of flags specifying which commands wrap to another line")
237 call append("$", "\t(local to window)")
238 call <SID>OptionL("ww")
239 call append("$", "startofline\tmany jump commands move the cursor to the first non-blank")
240 call append("$", "\tcharacter of a line")
241 call <SID>BinOptionG("sol", &sol)
242 call append("$", "paragraphs\tnroff macro names that separate paragraphs")
243 call <SID>OptionG("para", ¶)
244 call append("$", "sections\tnroff macro names that separate sections")
245 call <SID>OptionG("sect", §)
246 call append("$", "path\tlist of directory names used for file searching")
247 call append("$", "\t(global or local to buffer)")
248 call <SID>OptionG("pa", &pa)
249 call append("$", "cdpath\tlist of directory names used for :cd")
250 call <SID>OptionG("cd", &cd)
251 if exists("+autochdir")
252 call append("$", "autochdir\tchange to directory of file in buffer")
253 call <SID>BinOptionG("acd", &acd)
255 call append("$", "wrapscan\tsearch commands wrap around the end of the buffer")
256 call <SID>BinOptionG("ws", &ws)
257 call append("$", "incsearch\tshow match for partly typed search command")
258 call <SID>BinOptionG("is", &is)
259 call append("$", "magic\tchange the way backslashes are used in search patterns")
260 call <SID>BinOptionG("magic", &magic)
261 call append("$", "regexpengine\tselect the default regexp engine used")
262 call <SID>OptionG("re", &re)
263 call append("$", "ignorecase\tignore case when using a search pattern")
264 call <SID>BinOptionG("ic", &ic)
265 call append("$", "smartcase\toverride 'ignorecase' when pattern has upper case characters")
266 call <SID>BinOptionG("scs", &scs)
267 call append("$", "casemap\twhat method to use for changing case of letters")
268 call <SID>OptionG("cmp", &cmp)
269 call append("$", "maxmempattern\tmaximum amount of memory in Kbyte used for pattern matching")
270 call append("$", " \tset mmp=" . &mmp)
271 call append("$", "define\tpattern for a macro definition line")
272 call append("$", "\t(global or local to buffer)")
273 call <SID>OptionG("def", &def)
274 if has("find_in_path")
275 call append("$", "include\tpattern for an include-file line")
276 call append("$", "\t(local to buffer)")
277 call <SID>OptionL("inc")
278 call append("$", "includeexpr\texpression used to transform an include line to a file name")
279 call append("$", "\t(local to buffer)")
280 call <SID>OptionL("inex")
284 call <SID>Header("tags")
285 call append("$", "tagbsearch\tuse binary searching in tags files")
286 call <SID>BinOptionG("tbs", &tbs)
287 call append("$", "taglength\tnumber of significant characters in a tag name or zero")
288 call append("$", " \tset tl=" . &tl)
289 call append("$", "tags\tlist of file names to search for tags")
290 call append("$", "\t(global or local to buffer)")
291 call <SID>OptionG("tag", &tag)
292 call append("$", "tagrelative\tfile names in a tags file are relative to the tags file")
293 call <SID>BinOptionG("tr", &tr)
294 call append("$", "tagstack\ta :tag command will use the tagstack")
295 call <SID>BinOptionG("tgst", &tgst)
296 call append("$", "showfulltag\twhen completing tags in Insert mode show more info")
297 call <SID>BinOptionG("sft", &sft)
299 call append("$", "cscopeprg\tcommand for executing cscope")
300 call <SID>OptionG("csprg", &csprg)
301 call append("$", "cscopetag\tuse cscope for tag commands")
302 call <SID>BinOptionG("cst", &cst)
303 call append("$", "cscopetagorder\t0 or 1; the order in which \":cstag\" performs a search")
304 call append("$", " \tset csto=" . &csto)
305 call append("$", "cscopeverbose\tgive messages when adding a cscope database")
306 call <SID>BinOptionG("csverb", &csverb)
307 call append("$", "cscopepathcomp\thow many components of the path to show")
308 call append("$", " \tset cspc=" . &cspc)
309 call append("$", "cscopequickfix\twhen to open a quickfix window for cscope")
310 call <SID>OptionG("csqf", &csqf)
311 call append("$", "cscoperelative\tfile names in a cscope file are relative to that file")
312 call <SID>BinOptionG("csre", &csre)
316 call <SID>Header("displaying text")
317 call append("$", "scroll\tnumber of lines to scroll for CTRL-U and CTRL-D")
318 call append("$", "\t(local to window)")
319 call <SID>OptionL("scr")
320 call append("$", "scrolloff\tnumber of screen lines to show around the cursor")
321 call append("$", " \tset so=" . &so)
322 call append("$", "wrap\tlong lines wrap")
323 call <SID>BinOptionG("wrap", &wrap)
324 call append("$", "linebreak\twrap long lines at a character in 'breakat'")
325 call append("$", "\t(local to window)")
326 call <SID>BinOptionL("lbr")
327 call append("$", "breakat\twhich characters might cause a line break")
328 call <SID>OptionG("brk", &brk)
329 call append("$", "showbreak\tstring to put before wrapped screen lines")
330 call <SID>OptionG("sbr", &sbr)
331 call append("$", "sidescroll\tminimal number of columns to scroll horizontally")
332 call append("$", " \tset ss=" . &ss)
333 call append("$", "sidescrolloff\tminimal number of columns to keep left and right of the cursor")
334 call append("$", " \tset siso=" . &siso)
335 call append("$", "display\tinclude \"lastline\" to show the last line even if it doesn't fit")
336 call append("$", "\tinclude \"uhex\" to show unprintable characters as a hex number")
337 call <SID>OptionG("dy", &dy)
338 call append("$", "fillchars\tcharacters to use for the status line, folds and filler lines")
339 call <SID>OptionG("fcs", &fcs)
340 call append("$", "cmdheight\tnumber of lines used for the command-line")
341 call append("$", " \tset ch=" . &ch)
342 call append("$", "columns\twidth of the display")
343 call append("$", " \tset co=" . &co)
344 call append("$", "lines\tnumber of lines in the display")
345 call append("$", " \tset lines=" . &lines)
346 call append("$", "window\tnumber of lines to scroll for CTRL-F and CTRL-B")
347 call append("$", " \tset window=" . &window)
348 call append("$", "lazyredraw\tdon't redraw while executing macros")
349 call <SID>BinOptionG("lz", &lz)
351 call append("$", "redrawtime\ttimeout for 'hlsearch' and :match highlighting in msec")
352 call append("$", " \tset rdt=" . &rdt)
354 call append("$", "writedelay\tdelay in msec for each char written to the display")
355 call append("$", "\t(for debugging)")
356 call append("$", " \tset wd=" . &wd)
357 call append("$", "list\tshow <Tab> as ^I and end-of-line as $")
358 call append("$", "\t(local to window)")
359 call <SID>BinOptionL("list")
360 call append("$", "listchars\tlist of strings used for list mode")
361 call <SID>OptionG("lcs", &lcs)
362 call append("$", "number\tshow the line number for each line")
363 call append("$", "\t(local to window)")
364 call <SID>BinOptionL("nu")
365 call append("$", "relativenumber\tshow the relative line number for each line")
366 call append("$", "\t(local to window)")
367 call <SID>BinOptionL("rnu")
369 call append("$", "numberwidth\tnumber of columns to use for the line number")
370 call append("$", "\t(local to window)")
371 call <SID>OptionL("nuw")
374 call append("$", "conceallevel\tcontrols whether concealable text is hidden")
375 call append("$", "\t(local to window)")
376 call <SID>OptionL("cole")
377 call append("$", "concealcursor\tmodes in which text in the cursor line can be concealed")
378 call append("$", "\t(local to window)")
379 call <SID>OptionL("cocu")
383 call <SID>Header("syntax, highlighting and spelling")
384 call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
385 call <SID>OptionG("bg", &bg)
387 call append("$", "filetype\ttype of file; triggers the FileType event when set")
388 call append("$", "\t(local to buffer)")
389 call <SID>OptionL("ft")
392 call append("$", "syntax\tname of syntax highlighting used")
393 call append("$", "\t(local to buffer)")
394 call <SID>OptionL("syn")
395 call append("$", "synmaxcol\tmaximum column to look for syntax items")
396 call append("$", "\t(local to buffer)")
397 call <SID>OptionL("smc")
399 call append("$", "highlight\twhich highlighting to use for various occasions")
400 call <SID>OptionG("hl", &hl)
401 call append("$", "hlsearch\thighlight all matches for the last used search pattern")
402 call <SID>BinOptionG("hls", &hls)
404 call append("$", "cursorcolumn\thighlight the screen column of the cursor")
405 call append("$", "\t(local to window)")
406 call <SID>BinOptionL("cuc")
407 call append("$", "cursorline\thighlight the screen line of the cursor")
408 call append("$", "\t(local to window)")
409 call <SID>BinOptionL("cul")
410 call append("$", "colorcolumn\tcolumns to highlight")
411 call append("$", "\t(local to window)")
412 call <SID>OptionL("cc")
413 call append("$", "spell\thighlight spelling mistakes")
414 call append("$", "\t(local to window)")
415 call <SID>BinOptionL("spell")
416 call append("$", "spelllang\tlist of accepted languages")
417 call append("$", "\t(local to buffer)")
418 call <SID>OptionL("spl")
419 call append("$", "spellfile\tfile that \"zg\" adds good words to")
420 call append("$", "\t(local to buffer)")
421 call <SID>OptionL("spf")
422 call append("$", "spellcapcheck\tpattern to locate the end of a sentence")
423 call append("$", "\t(local to buffer)")
424 call <SID>OptionL("spc")
425 call append("$", "spellsuggest\tmethods used to suggest corrections")
426 call <SID>OptionG("sps", &sps)
427 call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing")
428 call <SID>OptionG("msm", &msm)
432 call <SID>Header("multiple windows")
433 call append("$", "laststatus\t0, 1 or 2; when to use a status line for the last window")
434 call append("$", " \tset ls=" . &ls)
436 call append("$", "statusline\talternate format to be used for a status line")
437 call <SID>OptionG("stl", &stl)
439 call append("$", "equalalways\tmake all windows the same size when adding/removing windows")
440 call <SID>BinOptionG("ea", &ea)
442 call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
443 call <SID>OptionG("ead", &ead)
445 call append("$", "winheight\tminimal number of lines used for the current window")
446 call append("$", " \tset wh=" . &wh)
447 call append("$", "winminheight\tminimal number of lines used for any window")
448 call append("$", " \tset wmh=" . &wmh)
449 call append("$", "winfixheight\tkeep the height of the window")
450 call append("$", "\t(local to window)")
451 call <SID>BinOptionL("wfh")
453 call append("$", "winfixwidth\tkeep the width of the window")
454 call append("$", "\t(local to window)")
455 call <SID>BinOptionL("wfw")
456 call append("$", "winwidth\tminimal number of columns used for the current window")
457 call append("$", " \tset wiw=" . &wiw)
458 call append("$", "winminwidth\tminimal number of columns used for any window")
459 call append("$", " \tset wmw=" . &wmw)
461 call append("$", "helpheight\tinitial height of the help window")
462 call append("$", " \tset hh=" . &hh)
464 call append("$", "previewheight\tdefault height for the preview window")
465 call append("$", " \tset pvh=" . &pvh)
466 call append("$", "previewwindow\tidentifies the preview window")
467 call append("$", "\t(local to window)")
468 call <SID>BinOptionL("pvw")
470 call append("$", "hidden\tdon't unload a buffer when no longer shown in a window")
471 call <SID>BinOptionG("hid", &hid)
472 call append("$", "switchbuf\t\"useopen\" and/or \"split\"; which window to use when jumping")
473 call append("$", "\tto a buffer")
474 call <SID>OptionG("swb", &swb)
475 call append("$", "splitbelow\ta new window is put below the current one")
476 call <SID>BinOptionG("sb", &sb)
478 call append("$", "splitright\ta new window is put right of the current one")
479 call <SID>BinOptionG("spr", &spr)
482 call append("$", "scrollbind\tthis window scrolls together with other bound windows")
483 call append("$", "\t(local to window)")
484 call <SID>BinOptionL("scb")
485 call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
486 call <SID>OptionG("sbo", &sbo)
489 call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
490 call append("$", "\t(local to window)")
491 call <SID>BinOptionL("crb")
495 call <SID>Header("multiple tab pages")
496 call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line")
497 call append("$", " \tset stal=" . &stal)
498 call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"")
499 call append("$", " \tset tpm=" . &tpm)
500 call append("$", "tabline\tcustom tab pages line")
501 call <SID>OptionG("tal", &tal)
503 call append("$", "guitablabel\tcustom tab page label for the GUI")
504 call <SID>OptionG("gtl", >l)
505 call append("$", "guitabtooltip\tcustom tab page tooltip for the GUI")
506 call <SID>OptionG("gtt", >t)
510 call <SID>Header("terminal")
511 call append("$", "term\tname of the used terminal")
512 call <SID>OptionG("term", &term)
513 call append("$", "ttytype\talias for 'term'")
514 call <SID>OptionG("tty", &tty)
515 call append("$", "ttybuiltin\tcheck built-in termcaps first")
516 call <SID>BinOptionG("tbi", &tbi)
517 call append("$", "ttyfast\tterminal connection is fast")
518 call <SID>BinOptionG("tf", &tf)
519 call append("$", "weirdinvert\tterminal that requires extra redrawing")
520 call <SID>BinOptionG("wiv", &wiv)
521 call append("$", "esckeys\trecognize keys that start with <Esc> in Insert mode")
522 call <SID>BinOptionG("ek", &ek)
523 call append("$", "scrolljump\tminimal number of lines to scroll at a time")
524 call append("$", " \tset sj=" . &sj)
525 call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing")
526 call append("$", " \tset tsl=" . &tsl)
527 if has("gui") || has("msdos") || has("win32")
528 call append("$", "guicursor\tspecifies what the cursor looks like in different modes")
529 call <SID>OptionG("gcr", &gcr)
532 let &title = s:old_title
533 call append("$", "title\tshow info in the window title")
534 call <SID>BinOptionG("title", &title)
536 call append("$", "titlelen\tpercentage of 'columns' used for the window title")
537 call append("$", " \tset titlelen=" . &titlelen)
538 call append("$", "titlestring\twhen not empty, string to be used for the window title")
539 call <SID>OptionG("titlestring", &titlestring)
540 call append("$", "titleold\tstring to restore the title to when exiting Vim")
541 call <SID>OptionG("titleold", &titleold)
542 let &icon = s:old_icon
543 call append("$", "icon\tset the text of the icon for this window")
544 call <SID>BinOptionG("icon", &icon)
546 call append("$", "iconstring\twhen not empty, text for the icon of this window")
547 call <SID>OptionG("iconstring", &iconstring)
550 call append("$", "restorescreen\trestore the screen contents when exiting Vim")
551 call <SID>BinOptionG("rs", &rs)
555 call <SID>Header("using the mouse")
556 call append("$", "mouse\tlist of flags for using the mouse")
557 call <SID>OptionG("mouse", &mouse)
559 call append("$", "mousefocus\tthe window with the mouse pointer becomes the current one")
560 call <SID>BinOptionG("mousef", &mousef)
561 call append("$", "mousehide\thide the mouse pointer while typing")
562 call <SID>BinOptionG("mh", &mh)
564 call append("$", "mousemodel\t\"extend\", \"popup\" or \"popup_setpos\"; what the right")
565 call append("$", "\tmouse button is used for")
566 call <SID>OptionG("mousem", &mousem)
567 call append("$", "mousetime\tmaximum time in msec to recognize a double-click")
568 call append("$", " \tset mouset=" . &mouset)
569 call append("$", "ttymouse\t\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse")
570 call <SID>OptionG("ttym", &ttym)
572 call append("$", "mouseshape\twhat the mouse pointer looks like in different modes")
573 call <SID>OptionG("mouses", &mouses)
578 call <SID>Header("GUI")
579 call append("$", "guifont\tlist of font names to be used in the GUI")
580 call <SID>OptionG("gfn", &gfn)
582 call append("$", "guifontset\tpair of fonts to be used, for multibyte editing")
583 call <SID>OptionG("gfs", &gfs)
585 call append("$", "guifontwide\tlist of font names to be used for double-wide characters")
586 call <SID>OptionG("gfw", &gfw)
588 call append("$", "antialias\tuse smooth, antialiased fonts")
589 call <SID>BinOptionG("anti", &anti)
591 call append("$", "guioptions\tlist of flags that specify how the GUI works")
592 call <SID>OptionG("go", &go)
594 call append("$", "toolbar\t\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar")
595 call <SID>OptionG("tb", &tb)
597 call append("$", "toolbariconsize\tsize of toolbar icons")
598 call <SID>OptionG("tbis", &tbis)
600 call append("$", "guiheadroom\troom (in pixels) left above/below the window")
601 call append("$", " \tset ghr=" . &ghr)
603 call append("$", "guipty\tuse a pseudo-tty for I/O to external commands")
604 call <SID>BinOptionG("guipty", &guipty)
606 call append("$", "browsedir\t\"last\", \"buffer\" or \"current\": which directory used for the file browser")
607 call <SID>OptionG("bsdir", &bsdir)
610 call append("$", "langmenu\tlanguage to be used for the menus")
611 call <SID>OptionG("langmenu", &lm)
613 call append("$", "menuitems\tmaximum number of items in one menu")
614 call append("$", " \tset mis=" . &mis)
616 call append("$", "winaltkeys\t\"no\", \"yes\" or \"menu\"; how to use the ALT key")
617 call <SID>OptionG("wak", &wak)
619 call append("$", "linespace\tnumber of pixel lines to use between characters")
620 call append("$", " \tset lsp=" . &lsp)
621 if has("balloon_eval")
622 call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up")
623 call append("$", " \tset bdlay=" . &bdlay)
624 call append("$", "ballooneval\twhether the balloon evaluation is to be used")
625 call <SID>BinOptionG("beval", &beval)
627 call append("$", "balloonexpr\texpression to show in balloon eval")
628 call append("$", " \tset bexpr=" . &bexpr)
631 if exists("+macatsui")
632 call append("$", "macatsui\tuse ATSUI text drawing; disable to avoid display problems")
633 call <SID>OptionG("macatsui", &macatsui)
638 call <SID>Header("printing")
639 call append("$", "printoptions\tlist of items that control the format of :hardcopy output")
640 call <SID>OptionG("popt", &popt)
641 call append("$", "printdevice\tname of the printer to be used for :hardcopy")
642 call <SID>OptionG("pdev", &pdev)
644 call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy")
645 call <SID>OptionG("pexpr", &pexpr)
647 call append("$", "printfont\tname of the font to be used for :hardcopy")
648 call <SID>OptionG("pfn", &pfn)
649 call append("$", "printheader\tformat of the header used for :hardcopy")
650 call <SID>OptionG("pheader", &pheader)
652 call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
653 call <SID>OptionG("penc", &penc)
656 call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
657 call <SID>OptionG("pmbcs", &pmbcs)
658 call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
659 call <SID>OptionG("pmbfn", &pmbfn)
663 call <SID>Header("messages and info")
664 call append("$", "terse\tadd 's' flag in 'shortmess' (don't show search message)")
665 call <SID>BinOptionG("terse", &terse)
666 call append("$", "shortmess\tlist of flags to make messages shorter")
667 call <SID>OptionG("shm", &shm)
668 call append("$", "showcmd\tshow (partial) command keys in the status line")
670 call <SID>BinOptionG("sc", &sc)
672 call append("$", "showmode\tdisplay the current mode in the status line")
673 call <SID>BinOptionG("smd", &smd)
674 call append("$", "ruler\tshow cursor position below each window")
676 call <SID>BinOptionG("ru", &ru)
679 call append("$", "rulerformat\talternate format to be used for the ruler")
680 call <SID>OptionG("ruf", &ruf)
682 call append("$", "report\tthreshold for reporting number of changed lines")
683 call append("$", " \tset report=" . &report)
684 call append("$", "verbose\tthe higher the more messages are given")
685 call append("$", " \tset vbs=" . &vbs)
686 call append("$", "verbosefile\tfile to write messages in")
687 call <SID>OptionG("vfile", &vfile)
688 call append("$", "more\tpause listings when the screen is full")
689 call <SID>BinOptionG("more", &more)
690 if has("dialog_con") || has("dialog_gui")
691 call append("$", "confirm\tstart a dialog when a command fails")
692 call <SID>BinOptionG("cf", &cf)
694 call append("$", "errorbells\tring the bell for error messages")
695 call <SID>BinOptionG("eb", &eb)
696 call append("$", "visualbell\tuse a visual bell instead of beeping")
697 call <SID>BinOptionG("vb", &vb)
699 call append("$", "helplang\tlist of preferred languages for finding help")
700 call <SID>OptionG("hlg", &hlg)
704 call <SID>Header("selecting text")
705 call append("$", "selection\t\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves")
706 call <SID>OptionG("sel", &sel)
707 call append("$", "selectmode\t\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode")
708 call append("$", "\tinstead of Visual mode")
709 call <SID>OptionG("slm", &slm)
711 call append("$", "clipboard\t\"unnamed\" to use the * register like unnamed register")
712 call append("$", "\t\"autoselect\" to always put selected text on the clipboard")
713 call <SID>OptionG("cb", &cb)
715 call append("$", "keymodel\t\"startsel\" and/or \"stopsel\"; what special keys can do")
716 call <SID>OptionG("km", &km)
719 call <SID>Header("editing text")
720 call append("$", "undolevels\tmaximum number of changes that can be undone")
721 call append("$", " \tset ul=" . &ul)
722 call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
723 call append("$", " \tset ur=" . &ur)
724 call append("$", "modified\tchanges have been made and not written to a file")
725 call append("$", "\t(local to buffer)")
726 call <SID>BinOptionL("mod")
727 call append("$", "readonly\tbuffer is not to be written")
728 call append("$", "\t(local to buffer)")
729 call <SID>BinOptionL("ro")
730 call append("$", "modifiable\tchanges to the text are not possible")
731 call append("$", "\t(local to buffer)")
732 call <SID>BinOptionL("ma")
733 call append("$", "textwidth\tline length above which to break a line")
734 call append("$", "\t(local to buffer)")
735 call <SID>OptionL("tw")
736 call append("$", "wrapmargin\tmargin from the right in which to break a line")
737 call append("$", "\t(local to buffer)")
738 call <SID>OptionL("wm")
739 call append("$", "backspace\tspecifies what <BS>, CTRL-W, etc. can do in Insert mode")
740 call append("$", " \tset bs=" . &bs)
741 call append("$", "comments\tdefinition of what comment lines look like")
742 call append("$", "\t(local to buffer)")
743 call <SID>OptionL("com")
744 call append("$", "formatoptions\tlist of flags that tell how automatic formatting works")
745 call append("$", "\t(local to buffer)")
746 call <SID>OptionL("fo")
747 call append("$", "formatlistpat\tpattern to recognize a numbered list")
748 call append("$", "\t(local to buffer)")
749 call <SID>OptionL("flp")
751 call append("$", "formatexpr\texpression used for \"gq\" to format lines")
752 call append("$", "\t(local to buffer)")
753 call <SID>OptionL("fex")
755 if has("insert_expand")
756 call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
757 call append("$", "\t(local to buffer)")
758 call <SID>OptionL("cpt")
759 call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
760 call <SID>OptionG("cot", &cot)
761 call append("$", "pumheight\tmaximum height of the popup menu")
762 call <SID>OptionG("ph", &ph)
763 call append("$", "completefunc\tuser defined function for Insert mode completion")
764 call append("$", "\t(local to buffer)")
765 call <SID>OptionL("cfu")
766 call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion")
767 call append("$", "\t(local to buffer)")
768 call <SID>OptionL("ofu")
769 call append("$", "dictionary\tlist of dictionary files for keyword completion")
770 call append("$", "\t(global or local to buffer)")
771 call <SID>OptionG("dict", &dict)
772 call append("$", "thesaurus\tlist of thesaurus files for keyword completion")
773 call append("$", "\t(global or local to buffer)")
774 call <SID>OptionG("tsr", &tsr)
776 call append("$", "infercase\tadjust case of a keyword completion match")
777 call append("$", "\t(local to buffer)")
778 call <SID>BinOptionL("inf")
780 call append("$", "digraph\tenable entering digraps with c1 <BS> c2")
781 call <SID>BinOptionG("dg", &dg)
783 call append("$", "tildeop\tthe \"~\" command behaves like an operator")
784 call <SID>BinOptionG("top", &top)
785 call append("$", "operatorfunc\tfunction called for the\"g@\" operator")
786 call <SID>OptionG("opfunc", &opfunc)
787 call append("$", "showmatch\twhen inserting a bracket, briefly jump to its match")
788 call <SID>BinOptionG("sm", &sm)
789 call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'")
790 call append("$", " \tset mat=" . &mat)
791 call append("$", "matchpairs\tlist of pairs that match for the \"%\" command")
792 call append("$", "\t(local to buffer)")
793 call <SID>OptionL("mps")
794 call append("$", "joinspaces\tuse two spaces after '.' when joining a line")
795 call <SID>BinOptionG("js", &js)
796 call append("$", "nrformats\t\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for")
797 call append("$", "\tCTRL-A and CTRL-X commands")
798 call append("$", "\t(local to buffer)")
799 call <SID>OptionL("nf")
802 call <SID>Header("tabs and indenting")
803 call append("$", "tabstop\tnumber of spaces a <Tab> in the text stands for")
804 call append("$", "\t(local to buffer)")
805 call <SID>OptionL("ts")
806 call append("$", "shiftwidth\tnumber of spaces used for each step of (auto)indent")
807 call append("$", "\t(local to buffer)")
808 call <SID>OptionL("sw")
809 call append("$", "smarttab\ta <Tab> in an indent inserts 'shiftwidth' spaces")
810 call <SID>BinOptionG("sta", &sta)
811 call append("$", "softtabstop\tif non-zero, number of spaces to insert for a <Tab>")
812 call append("$", "\t(local to buffer)")
813 call <SID>OptionL("sts")
814 call append("$", "shiftround\tround to 'shiftwidth' for \"<<\" and \">>\"")
815 call <SID>BinOptionG("sr", &sr)
816 call append("$", "expandtab\texpand <Tab> to spaces in Insert mode")
817 call append("$", "\t(local to buffer)")
818 call <SID>BinOptionL("et")
819 call append("$", "autoindent\tautomatically set the indent of a new line")
820 call append("$", "\t(local to buffer)")
821 call <SID>BinOptionL("ai")
822 if has("smartindent")
823 call append("$", "smartindent\tdo clever autoindenting")
824 call append("$", "\t(local to buffer)")
825 call <SID>BinOptionL("si")
828 call append("$", "cindent\tenable specific indenting for C code")
829 call append("$", "\t(local to buffer)")
830 call <SID>BinOptionL("cin")
831 call append("$", "cinoptions\toptions for C-indenting")
832 call append("$", "\t(local to buffer)")
833 call <SID>OptionL("cino")
834 call append("$", "cinkeys\tkeys that trigger C-indenting in Insert mode")
835 call append("$", "\t(local to buffer)")
836 call <SID>OptionL("cink")
837 call append("$", "cinwords\tlist of words that cause more C-indent")
838 call append("$", "\t(local to buffer)")
839 call <SID>OptionL("cinw")
840 call append("$", "indentexpr\texpression used to obtain the indent of a line")
841 call append("$", "\t(local to buffer)")
842 call <SID>OptionL("inde")
843 call append("$", "indentkeys\tkeys that trigger indenting with 'indentexpr' in Insert mode")
844 call append("$", "\t(local to buffer)")
845 call <SID>OptionL("indk")
847 call append("$", "copyindent\tcopy whitespace for indenting from previous line")
848 call append("$", "\t(local to buffer)")
849 call <SID>BinOptionL("ci")
850 call append("$", "preserveindent\tpreserve kind of whitespace when changing indent")
851 call append("$", "\t(local to buffer)")
852 call <SID>BinOptionL("pi")
854 call append("$", "lisp\tenable lisp mode")
855 call append("$", "\t(local to buffer)")
856 call <SID>BinOptionL("lisp")
857 call append("$", "lispwords\twords that change how lisp indenting works")
858 call <SID>OptionG("lw", &lw)
863 call <SID>Header("folding")
864 call append("$", "foldenable\tset to display all folds open")
865 call append("$", "\t(local to window)")
866 call <SID>BinOptionL("fen")
867 call append("$", "foldlevel\tfolds with a level higher than this number will be closed")
868 call append("$", "\t(local to window)")
869 call <SID>OptionL("fdl")
870 call append("$", "foldlevelstart\tvalue for 'foldlevel' when starting to edit a file")
871 call append("$", " \tset fdls=" . &fdls)
872 call append("$", "foldcolumn\twidth of the column used to indicate folds")
873 call append("$", "\t(local to window)")
874 call <SID>OptionL("fdc")
875 call append("$", "foldtext\texpression used to display the text of a closed fold")
876 call append("$", "\t(local to window)")
877 call <SID>OptionL("fdt")
878 call append("$", "foldclose\tset to \"all\" to close a fold when the cursor leaves it")
879 call <SID>OptionG("fcl", &fcl)
880 call append("$", "foldopen\tspecifies for which commands a fold will be opened")
881 call <SID>OptionG("fdo", &fdo)
882 call append("$", "foldminlines\tminimum number of screen lines for a fold to be closed")
883 call append("$", "\t(local to window)")
884 call <SID>OptionL("fml")
885 call append("$", "commentstring\ttemplate for comments; used to put the marker in")
886 call <SID>OptionL("cms")
887 call append("$", "foldmethod\tfolding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\"")
888 call append("$", "\t(local to window)")
889 call <SID>OptionL("fdm")
890 call append("$", "foldexpr\texpression used when 'foldmethod' is \"expr\"")
891 call append("$", "\t(local to window)")
892 call <SID>OptionL("fde")
893 call append("$", "foldignore\tused to ignore lines when 'foldmethod' is \"indent\"")
894 call append("$", "\t(local to window)")
895 call <SID>OptionL("fdi")
896 call append("$", "foldmarker\tmarkers used when 'foldmethod' is \"marker\"")
897 call append("$", "\t(local to window)")
898 call <SID>OptionL("fmr")
899 call append("$", "foldnestmax\tmaximum fold depth for when 'foldmethod is \"indent\" or \"syntax\"")
900 call append("$", "\t(local to window)")
901 call <SID>OptionL("fdn")
906 call <SID>Header("diff mode")
907 call append("$", "diff\tuse diff mode for the current window")
908 call append("$", "\t(local to window)")
909 call <SID>BinOptionL("diff")
910 call append("$", "diffopt\toptions for using diff mode")
911 call <SID>OptionG("dip", &dip)
912 call append("$", "diffexpr\texpression used to obtain a diff file")
913 call <SID>OptionG("dex", &dex)
914 call append("$", "patchexpr\texpression used to patch a file")
915 call <SID>OptionG("pex", &pex)
919 call <SID>Header("mapping")
920 call append("$", "maxmapdepth\tmaximum depth of mapping")
921 call append("$", " \tset mmd=" . &mmd)
922 call append("$", "remap\trecognize mappings in mapped keys")
923 call <SID>BinOptionG("remap", &remap)
924 call append("$", "timeout\tallow timing out halfway into a mapping")
925 call <SID>BinOptionG("to", &to)
926 call append("$", "ttimeout\tallow timing out halfway into a key code")
927 call <SID>BinOptionG("ttimeout", &ttimeout)
928 call append("$", "timeoutlen\ttime in msec for 'timeout'")
929 call append("$", " \tset tm=" . &tm)
930 call append("$", "ttimeoutlen\ttime in msec for 'ttimeout'")
931 call append("$", " \tset ttm=" . &ttm)
934 call <SID>Header("reading and writing files")
935 call append("$", "modeline\tenable using settings from modelines when reading a file")
936 call append("$", "\t(local to buffer)")
937 call <SID>BinOptionL("ml")
938 call append("$", "modelines\tnumber of lines to check for modelines")
939 call append("$", " \tset mls=" . &mls)
940 call append("$", "binary\tbinary file editing")
941 call append("$", "\t(local to buffer)")
942 call <SID>BinOptionL("bin")
943 call append("$", "endofline\tlast line in the file has an end-of-line")
944 call append("$", "\t(local to buffer)")
945 call <SID>BinOptionL("eol")
947 call append("$", "bomb\tprepend a Byte Order Mark to the file")
948 call append("$", "\t(local to buffer)")
949 call <SID>BinOptionL("bomb")
951 call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
952 call append("$", "\t(local to buffer)")
953 call <SID>OptionL("ff")
954 call append("$", "fileformats\tlist of file formats to look for when editing a file")
955 call <SID>OptionG("ffs", &ffs)
956 call append("$", "textmode\tobsolete, use 'fileformat'")
957 call append("$", "\t(local to buffer)")
958 call <SID>BinOptionL("tx")
959 call append("$", "textauto\tobsolete, use 'fileformats'")
960 call <SID>BinOptionG("ta", &ta)
961 call append("$", "write\twriting files is allowed")
962 call <SID>BinOptionG("write", &write)
963 call append("$", "writebackup\twrite a backup file before overwriting a file")
964 call <SID>BinOptionG("wb", &wb)
965 call append("$", "backup\tkeep a backup after overwriting a file")
966 call <SID>BinOptionG("bk", &bk)
967 call append("$", "backupskip\tpatterns that specify for which files a backup is not made")
968 call append("$", " \tset bsk=" . &bsk)
969 call append("$", "backupcopy\twhether to make the backup as a copy or rename the existing file")
970 call append("$", " \tset bkc=" . &bkc)
971 call append("$", "backupdir\tlist of directories to put backup files in")
972 call <SID>OptionG("bdir", &bdir)
973 call append("$", "backupext\tfile name extension for the backup file")
974 call <SID>OptionG("bex", &bex)
975 call append("$", "autowrite\tautomatically write a file when leaving a modified buffer")
976 call <SID>BinOptionG("aw", &aw)
977 call append("$", "autowriteall\tas 'autowrite', but works with more commands")
978 call <SID>BinOptionG("awa", &awa)
979 call append("$", "writeany\talways write without asking for confirmation")
980 call <SID>BinOptionG("wa", &wa)
981 call append("$", "autoread\tautomatically read a file when it was modified outside of Vim")
982 call append("$", "\t(global or local to buffer)")
983 call <SID>BinOptionG("ar", &ar)
984 call append("$", "patchmode\tkeep oldest version of a file; specifies file name extension")
985 call <SID>OptionG("pm", &pm)
986 call append("$", "fsync\tforcibly sync the file to disk after writing it")
987 call <SID>BinOptionG("fs", &fs)
989 call append("$", "shortname\tuse 8.3 file names")
990 call append("$", "\t(local to buffer)")
991 call <SID>BinOptionL("sn")
993 call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
994 call append("$", "\t(local to buffer)")
995 call <SID>OptionL("cm")
998 call <SID>Header("the swap file")
999 call append("$", "directory\tlist of directories for the swap file")
1000 call <SID>OptionG("dir", &dir)
1001 call append("$", "swapfile\tuse a swap file for this buffer")
1002 call append("$", "\t(local to buffer)")
1003 call <SID>BinOptionL("swf")
1004 call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
1005 call <SID>OptionG("sws", &sws)
1006 call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
1007 call append("$", " \tset uc=" . &uc)
1008 call append("$", "updatetime\ttime in msec after which the swap file will be updated")
1009 call append("$", " \tset ut=" . &ut)
1010 call append("$", "maxmem\tmaximum amount of memory in Kbyte used for one buffer")
1011 call append("$", " \tset mm=" . &mm)
1012 call append("$", "maxmemtot\tmaximum amount of memory in Kbyte used for all buffers")
1013 call append("$", " \tset mmt=" . &mmt)
1016 call <SID>Header("command line editing")
1017 call append("$", "history\thow many command lines are remembered ")
1018 call append("$", " \tset hi=" . &hi)
1019 call append("$", "wildchar\tkey that triggers command-line expansion")
1020 call append("$", " \tset wc=" . &wc)
1021 call append("$", "wildcharm\tlike 'wildchar' but can also be used in a mapping")
1022 call append("$", " \tset wcm=" . &wcm)
1023 call append("$", "wildmode\tspecifies how command line completion works")
1024 call <SID>OptionG("wim", &wim)
1025 if has("wildoptions")
1026 call append("$", "wildoptions\tempty or \"tagfile\" to list file name of matching tags")
1027 call <SID>OptionG("wop", &wop)
1029 call append("$", "suffixes\tlist of file name extensions that have a lower priority")
1030 call <SID>OptionG("su", &su)
1031 if has("file_in_path")
1032 call append("$", "suffixesadd\tlist of file name extensions added when searching for a file")
1033 call append("$", "\t(local to buffer)")
1034 call <SID>OptionL("sua")
1036 if has("wildignore")
1037 call append("$", "wildignore\tlist of patterns to ignore files for file name completion")
1038 call <SID>OptionG("wig", &wig)
1040 call append("$", "fileignorecase\tignore case when using file names")
1041 call <SID>BinOptionG("fic", &fic)
1042 call append("$", "wildignorecase\tignore case when completing file names")
1043 call <SID>BinOptionG("wic", &wic)
1045 call append("$", "wildmenu\tcommand-line completion shows a list of matches")
1046 call <SID>BinOptionG("wmnu", &wmnu)
1049 call append("$", "cedit\tkey used to open the command-line window")
1050 call <SID>OptionG("cedit", &cedit)
1051 call append("$", "cmdwinheight\theight of the command-line window")
1052 call <SID>OptionG("cwh", &cwh)
1054 call append("$", "undofile\tautomatically save and restore undo history")
1055 call <SID>BinOptionG("udf", &udf)
1056 call append("$", "undodir\tlist of directories for undo files")
1057 call <SID>OptionG("udir", &udir)
1060 call <SID>Header("executing external commands")
1061 call append("$", "shell\tname of the shell program used for external commands")
1062 call <SID>OptionG("sh", &sh)
1064 call append("$", "shelltype\twhen to use the shell or directly execute a command")
1065 call append("$", " \tset st=" . &st)
1067 call append("$", "shellquote\tcharacter(s) to enclose a shell command in")
1068 call <SID>OptionG("shq", &shq)
1069 call append("$", "shellxquote\tlike 'shellquote' but include the redirection")
1070 call <SID>OptionG("sxq", &sxq)
1071 call append("$", "shellxescape\tcharacters to escape when 'shellxquote' is (")
1072 call <SID>OptionG("sxe", &sxe)
1073 call append("$", "shellcmdflag\targument for 'shell' to execute a command")
1074 call <SID>OptionG("shcf", &shcf)
1075 call append("$", "shellredir\tused to redirect command output to a file")
1076 call <SID>OptionG("srr", &srr)
1077 call append("$", "shelltemp\tuse a temp file for shell commands instead of using a pipe")
1078 call <SID>BinOptionG("stmp", &stmp)
1079 call append("$", "equalprg\tprogram used for \"=\" command")
1080 call append("$", "\t(global or local to buffer)")
1081 call <SID>OptionG("ep", &ep)
1082 call append("$", "formatprg\tprogram used to format lines with \"gq\" command")
1083 call <SID>OptionG("fp", &fp)
1084 call append("$", "keywordprg\tprogram used for the \"K\" command")
1085 call <SID>OptionG("kp", &kp)
1086 call append("$", "warn\twarn when using a shell command and a buffer has changes")
1087 call <SID>BinOptionG("warn", &warn)
1091 call <SID>Header("running make and jumping to errors")
1092 call append("$", "errorfile\tname of the file that contains error messages")
1093 call <SID>OptionG("ef", &ef)
1094 call append("$", "errorformat\tlist of formats for error messages")
1095 call append("$", "\t(global or local to buffer)")
1096 call <SID>OptionG("efm", &efm)
1097 call append("$", "makeprg\tprogram used for the \":make\" command")
1098 call append("$", "\t(global or local to buffer)")
1099 call <SID>OptionG("mp", &mp)
1100 call append("$", "shellpipe\tstring used to put the output of \":make\" in the error file")
1101 call <SID>OptionG("sp", &sp)
1102 call append("$", "makeef\tname of the errorfile for the 'makeprg' command")
1103 call <SID>OptionG("mef", &mef)
1104 call append("$", "grepprg\tprogram used for the \":grep\" command")
1105 call append("$", "\t(global or local to buffer)")
1106 call <SID>OptionG("gp", &gp)
1107 call append("$", "grepformat\tlist of formats for output of 'grepprg'")
1108 call <SID>OptionG("gfm", &gfm)
1112 if has("msdos") || has("os2") || has("win16") || has("win32") || has("osfiletype")
1113 call <SID>Header("system specific")
1115 call append("$", "bioskey\tcall the BIOS to get a keyoard character")
1116 call <SID>BinOptionG("biosk", &biosk)
1117 call append("$", "conskey\tuse direct console I/O to get a keyboard character")
1118 call <SID>BinOptionG("consk", &consk)
1120 if has("osfiletype")
1121 call append("$", "osfiletype\tOS-specific information about the type of file")
1122 call append("$", "\t(local to buffer)")
1123 call <SID>OptionL("oft")
1125 if has("msdos") || has("os2") || has("win16") || has("win32")
1126 call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells")
1127 call <SID>BinOptionG("ssl", &ssl)
1132 call <SID>Header("language specific")
1133 call append("$", "isfname\tspecifies the characters in a file name")
1134 call <SID>OptionG("isf", &isf)
1135 call append("$", "isident\tspecifies the characters in an identifier")
1136 call <SID>OptionG("isi", &isi)
1137 call append("$", "iskeyword\tspecifies the characters in a keyword")
1138 call append("$", "\t(local to buffer)")
1139 call <SID>OptionL("isk")
1140 call append("$", "isprint\tspecifies printable characters")
1141 call <SID>OptionG("isp", &isp)
1142 if has("textobjects")
1143 call append("$", "quoteescape\tspecifies escape characters in a string")
1144 call append("$", "\t(local to buffer)")
1145 call <SID>OptionL("qe")
1148 call append("$", "rightleft\tdisplay the buffer right-to-left")
1149 call append("$", "\t(local to window)")
1150 call <SID>BinOptionL("rl")
1151 call append("$", "rightleftcmd\twhen to edit the command-line right-to-left")
1152 call append("$", "\t(local to window)")
1153 call <SID>OptionL("rlc")
1154 call append("$", "revins\tinsert characters backwards")
1155 call <SID>BinOptionG("ri", &ri)
1156 call append("$", "allowrevins\tallow CTRL-_ in Insert and Command-line mode to toggle 'revins'")
1157 call <SID>BinOptionG("ari", &ari)
1158 call append("$", "aleph\tthe ASCII code for the first letter of the Hebrew alphabet")
1159 call append("$", " \tset al=" . &al)
1160 call append("$", "hkmap\tuse Hebrew keyboard mapping")
1161 call <SID>BinOptionG("hk", &hk)
1162 call append("$", "hkmapp\tuse phonetic Hebrew keyboard mapping")
1163 call <SID>BinOptionG("hkp", &hkp)
1166 call append("$", "altkeymap\tuse Farsi as the second language when 'revins' is set")
1167 call <SID>BinOptionG("akm", &akm)
1168 call append("$", "fkmap\tuse Farsi keyboard mapping")
1169 call <SID>BinOptionG("fk", &fk)
1172 call append("$", "arabic\tprepare for editing Arabic text")
1173 call append("$", "\t(local to window)")
1174 call <SID>BinOptionL("arab")
1175 call append("$", "arabicshape\tperform shaping of Arabic characters")
1176 call <SID>BinOptionG("arshape", &arshape)
1177 call append("$", "termbidi\tterminal will perform bidi handling")
1178 call <SID>BinOptionG("tbidi", &tbidi)
1181 call append("$", "keymap\tname of a keyboard mappping")
1182 call <SID>OptionL("kmp")
1185 call append("$", "langmap\ttranslate characters for Normal mode")
1186 call <SID>OptionG("lmap", &lmap)
1189 call append("$", "imdisable\twhen set never use IM; overrules following IM options")
1190 call <SID>BinOptionG("imd", &imd)
1192 call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither")
1193 call append("$", "\t(local to window)")
1194 call <SID>OptionL("imi")
1195 call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither")
1196 call append("$", "\t(local to window)")
1197 call <SID>OptionL("ims")
1199 call append("$", "imcmdline\twhen set always use IM when starting to edit a command line")
1200 call <SID>BinOptionG("imc", &imc)
1201 call append("$", "imstatusfunc\tfunction to obtain IME status")
1202 call <SID>OptionG("imsf", &imsf)
1203 call append("$", "imactivatefunc\tfunction to enable/disable IME")
1204 call <SID>OptionG("imaf", &imaf)
1208 if has("multi_byte")
1209 call <SID>Header("multi-byte characters")
1210 call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
1211 call append("$", "\t\"euc-jp\", \"big5\", etc.")
1212 call <SID>OptionG("enc", &enc)
1213 call append("$", "fileencoding\tcharacter encoding for the current file")
1214 call append("$", "\t(local to buffer)")
1215 call <SID>OptionL("fenc")
1216 call append("$", "fileencodings\tautomatically detected character encodings")
1217 call <SID>OptionG("fencs", &fencs)
1218 call append("$", "termencoding\tcharacter encoding used by the terminal")
1219 call <SID>OptionG("tenc", &tenc)
1220 call append("$", "charconvert\texpression used for character encoding conversion")
1221 call <SID>OptionG("ccv", &ccv)
1222 call append("$", "delcombine\tdelete combining (composing) characters on their own")
1223 call <SID>BinOptionG("deco", &deco)
1224 call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
1225 call <SID>OptionG("mco", &mco)
1226 if has("xim") && has("gui_gtk")
1227 call append("$", "imactivatekey\tkey that activates the X input method")
1228 call <SID>OptionG("imak", &imak)
1230 call append("$", "ambiwidth\twidth of ambiguous width characters")
1231 call <SID>OptionG("ambw", &ambw)
1235 call <SID>Header("various")
1236 if has("virtualedit")
1237 call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
1238 call <SID>OptionG("ve", &ve)
1241 call append("$", "eventignore\tlist of autocommand events which are to be ignored")
1242 call <SID>OptionG("ei", &ei)
1244 call append("$", "loadplugins\tload plugin scripts when starting up")
1245 call <SID>BinOptionG("lpl", &lpl)
1246 call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory")
1247 call <SID>BinOptionG("ex", &ex)
1248 call append("$", "secure\tsafer working with script files in the current directory")
1249 call <SID>BinOptionG("secure", &secure)
1250 call append("$", "gdefault\tuse the 'g' flag for \":substitute\"")
1251 call <SID>BinOptionG("gd", &gd)
1252 call append("$", "edcompatible\t'g' and 'c' flags of \":substitute\" toggle")
1253 call <SID>BinOptionG("ed", &ed)
1254 if exists("+opendevice")
1255 call append("$", "opendevice\tallow reading/writing devices")
1256 call <SID>BinOptionG("odev", &odev)
1258 if exists("+maxfuncdepth")
1259 call append("$", "maxfuncdepth\tmaximum depth of function calls")
1260 call append("$", " \tset mfd=" . &mfd)
1263 call append("$", "sessionoptions\tlist of words that specifies what to put in a session file")
1264 call <SID>OptionG("ssop", &ssop)
1265 call append("$", "viewoptions\tlist of words that specifies what to save for :mkview")
1266 call <SID>OptionG("vop", &vop)
1267 call append("$", "viewdir\tdirectory where to store files with :mkview")
1268 call <SID>OptionG("vdir", &vdir)
1271 call append("$", "viminfo\tlist that specifies what to write in the viminfo file")
1272 call <SID>OptionG("vi", &vi)
1275 call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window")
1276 call append("$", "\t(local to buffer)")
1277 call <SID>OptionL("bh")
1278 call append("$", "buftype\t\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer")
1279 call append("$", "\t(local to buffer)")
1280 call <SID>OptionL("bt")
1282 call append("$", "buflisted\twhether the buffer shows up in the buffer list")
1283 call append("$", "\t(local to buffer)")
1284 call <SID>BinOptionL("bl")
1285 call append("$", "debug\tset to \"msg\" to see all error messages")
1286 call append("$", " \tset debug=" . &debug)
1288 call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
1289 call append("$", " \tset mzq=" . &mzq)
1297 " reset 'modified', so that ":q" can be used to close the window
1301 " Use Vim highlighting, with some additional stuff
1303 syn match optwinHeader "^ \=[0-9].*"
1304 syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
1305 syn match optwinComment ".*" contained
1306 syn match optwinComment "^\t.*"
1307 if !exists("did_optwin_syntax_inits")
1308 let did_optwin_syntax_inits = 1
1309 hi link optwinHeader Title
1310 hi link optwinName Identifier
1311 hi link optwinComment Comment
1315 " Install autocommands to enable mappings in option-window
1316 noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR>
1317 inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR>
1318 noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
1320 " Make the buffer be deleted when the window is closed.
1321 setlocal buftype=nofile bufhidden=delete noswapfile
1324 au! BufUnload,BufHidden option-window nested
1325 \ call <SID>unload() | delfun <SID>unload
1335 delfun <SID>BinOptionL
1336 delfun <SID>BinOptionG
1341 " Restore the previous value of 'title' and 'icon'.
1342 let &title = s:old_title
1343 let &icon = s:old_icon
1346 let &cpo = s:cpo_save
1347 unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum
1349 " vim: ts=8 sw=2 sts=2