blob: ab8d35cbdb3be22f7aae48ff3a9c8d5711fa3e00 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" These commands create the option window.
2"
3" Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaara953b5c2020-09-10 14:25:25 +02004" Last Change: 2020 Sep 10
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6" If there already is an option window, jump to that one.
Bram Moolenaarab6c8582017-08-11 17:15:09 +02007let buf = bufnr('option-window')
8if buf >= 0
9 let winids = win_findbuf(buf)
10 if len(winids) > 0
11 if win_gotoid(winids[0]) == 1
Bram Moolenaar071d4272004-06-13 20:20:40 +000012 finish
13 endif
Bram Moolenaarab6c8582017-08-11 17:15:09 +020014 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015endif
16
17" Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
18" not be recognized. See ":help 'cpoptions'".
19let s:cpo_save = &cpo
20set cpo&vim
21
22" function to be called when <CR> is hit in the option-window
Bram Moolenaara953b5c2020-09-10 14:25:25 +020023func <SID>CR()
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25 " If on a continued comment line, go back to the first comment line
Bram Moolenaar251e1912011-06-19 05:09:16 +020026 let lnum = search("^[^\t]", 'bWcn')
Bram Moolenaar071d4272004-06-13 20:20:40 +000027 let line = getline(lnum)
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
29 " <CR> on a "set" line executes the option line
30 if match(line, "^ \tset ") >= 0
31
32 " For a local option: go to the previous window
33 " If this is a help window, go to the window below it
34 let thiswin = winnr()
35 let local = <SID>Find(lnum)
36 if local >= 0
37 exe line
38 call <SID>Update(lnum, line, local, thiswin)
39 endif
40
41 " <CR> on a "option" line shows help for that option
42 elseif match(line, "^[a-z]") >= 0
43 let name = substitute(line, '\([^\t]*\).*', '\1', "")
44 exe "help '" . name . "'"
45
46 " <CR> on an index line jumps to the group
47 elseif match(line, '^ \=[0-9]') >= 0
48 exe "norm! /" . line . "\<CR>zt"
49 endif
Bram Moolenaara953b5c2020-09-10 14:25:25 +020050endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +000051
52" function to be called when <Space> is hit in the option-window
Bram Moolenaara953b5c2020-09-10 14:25:25 +020053func <SID>Space()
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
55 let lnum = line(".")
56 let line = getline(lnum)
57
58 " <Space> on a "set" line refreshes the option line
59 if match(line, "^ \tset ") >= 0
60
61 " For a local option: go to the previous window
62 " If this is a help window, go to the window below it
63 let thiswin = winnr()
64 let local = <SID>Find(lnum)
65 if local >= 0
66 call <SID>Update(lnum, line, local, thiswin)
67 endif
68
69 endif
Bram Moolenaara953b5c2020-09-10 14:25:25 +020070endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
Bram Moolenaar64075b02020-09-09 12:56:30 +020072let s:local_to_window = gettext('(local to window)')
73let s:local_to_buffer = gettext('(local to buffer)')
74
Bram Moolenaar071d4272004-06-13 20:20:40 +000075" find the window in which the option applies
76" returns 0 for global option, 1 for local option, -1 for error
Bram Moolenaara953b5c2020-09-10 14:25:25 +020077func <SID>Find(lnum)
Bram Moolenaar64075b02020-09-09 12:56:30 +020078 let line = getline(a:lnum - 1)
79 if line =~ s:local_to_window || line =~ s:local_to_buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +000080 let local = 1
81 let thiswin = winnr()
Bram Moolenaar251e1912011-06-19 05:09:16 +020082 wincmd p
Bram Moolenaar071d4272004-06-13 20:20:40 +000083 if exists("b:current_syntax") && b:current_syntax == "help"
Bram Moolenaar251e1912011-06-19 05:09:16 +020084 wincmd j
Bram Moolenaar071d4272004-06-13 20:20:40 +000085 if winnr() == thiswin
Bram Moolenaar251e1912011-06-19 05:09:16 +020086 wincmd j
Bram Moolenaar071d4272004-06-13 20:20:40 +000087 endif
88 endif
89 else
90 let local = 0
91 endif
92 if local && (winnr() == thiswin || (exists("b:current_syntax")
93 \ && b:current_syntax == "help"))
94 echo "Don't know in which window"
95 let local = -1
96 endif
97 return local
Bram Moolenaara953b5c2020-09-10 14:25:25 +020098endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +000099
100" Update a "set" line in the option window
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200101func <SID>Update(lnum, line, local, thiswin)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102 " get the new value of the option and update the option window line
103 if match(a:line, "=") >= 0
104 let name = substitute(a:line, '^ \tset \([^=]*\)=.*', '\1', "")
105 else
106 let name = substitute(a:line, '^ \tset \(no\)\=\([a-z]*\).*', '\2', "")
107 endif
108 if name == "pt" && &pt =~ "\x80"
109 let val = <SID>PTvalue()
110 else
Bram Moolenaar251e1912011-06-19 05:09:16 +0200111 let val = escape(eval('&' . name), " \t\\\"|")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000112 endif
113 if a:local
Bram Moolenaar251e1912011-06-19 05:09:16 +0200114 exe a:thiswin . "wincmd w"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115 endif
116 if match(a:line, "=") >= 0 || (val != "0" && val != "1")
117 call setline(a:lnum, " \tset " . name . "=" . val)
118 else
119 if val
120 call setline(a:lnum, " \tset " . name . "\tno" . name)
121 else
122 call setline(a:lnum, " \tset no" . name . "\t" . name)
123 endif
124 endif
125 set nomodified
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200126endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127
128" Reset 'title' and 'icon' to make it work faster.
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100129" Reset 'undolevels' to avoid undo'ing until the buffer is empty.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000130let s:old_title = &title
131let s:old_icon = &icon
132let s:old_sc = &sc
133let s:old_ru = &ru
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100134let s:old_ul = &ul
135set notitle noicon nosc noru ul=-1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136
137" If the current window is a help window, try finding a non-help window.
138" Relies on syntax highlighting to be switched on.
139let s:thiswin = winnr()
140while exists("b:current_syntax") && b:current_syntax == "help"
Bram Moolenaar251e1912011-06-19 05:09:16 +0200141 wincmd w
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142 if s:thiswin == winnr()
143 break
144 endif
145endwhile
146
Bram Moolenaarab6c8582017-08-11 17:15:09 +0200147" Open the window. $OPTWIN_CMD is set to "tab" for ":tab options".
148exe $OPTWIN_CMD . ' new option-window'
Bram Moolenaar251e1912011-06-19 05:09:16 +0200149setlocal ts=15 tw=0 noro buftype=nofile
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150
151" Insert help and a "set" command for each option.
Bram Moolenaar0b39c3f2020-08-30 15:52:10 +0200152call append(0, gettext('" Each "set" line shows the current value of an option (on the left).'))
153call append(1, gettext('" Hit <Enter> on a "set" line to execute it.'))
154call append(2, gettext('" A boolean option will be toggled.'))
155call append(3, gettext('" For other options you can edit the value before hitting <Enter>.'))
156call append(4, gettext('" Hit <Enter> on a help line to open a help window on this option.'))
157call append(5, gettext('" Hit <Enter> on an index line to jump there.'))
158call append(6, gettext('" Hit <Space> on a "set" line to refresh it.'))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159
160" These functions are called often below. Keep them fast!
161
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200162" Add an option name and explanation. The text can contain "\n" characters
163" where a line break is to be inserted.
164func <SID>AddOption(name, text)
165 let lines = split(a:text, "\n")
166 call append("$", a:name .. "\t" .. lines[0])
167 for line in lines[1:]
168 call append("$", "\t" .. line)
169 endfor
170endfunc
171
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172" Init a local binary option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200173func <SID>BinOptionL(name)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200174 let val = getwinvar(winnr('#'), '&' . a:name)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000175 call append("$", substitute(substitute(" \tset " . val . a:name . "\t" .
176 \!val . a:name, "0", "no", ""), "1", "", ""))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200177endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000178
179" Init a global binary option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200180func <SID>BinOptionG(name, val)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181 call append("$", substitute(substitute(" \tset " . a:val . a:name . "\t" .
182 \!a:val . a:name, "0", "no", ""), "1", "", ""))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200183endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184
185" Init a local string option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200186func <SID>OptionL(name)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200187 let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000188 call append("$", " \tset " . a:name . "=" . val)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200189endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190
191" Init a global string option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200192func <SID>OptionG(name, val)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200193 call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|"))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200194endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000195
196let s:idx = 1
197let s:lnum = line("$")
198call append("$", "")
199
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200200func <SID>Header(text)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000201 let line = s:idx . " " . a:text
202 if s:idx < 10
203 let line = " " . line
204 endif
205 call append("$", "")
206 call append("$", line)
207 call append("$", "")
208 call append(s:lnum, line)
209 let s:idx = s:idx + 1
210 let s:lnum = s:lnum + 1
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200211endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212
213" Get the value of 'pastetoggle'. It could be a special key.
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200214func <SID>PTvalue()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215 redir @a
216 silent set pt
217 redir END
218 return substitute(@a, '[^=]*=\(.*\)', '\1', "")
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200219endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000220
221" Restore the previous value of 'cpoptions' here, it's used below.
222let &cpo = s:cpo_save
223
224" List of all options, organized by function.
225" The text should be sufficient to know what the option is used for.
226
227call <SID>Header("important")
228call append("$", "compatible\tbehave very Vi compatible (not advisable)")
229call <SID>BinOptionG("cp", &cp)
230call append("$", "cpoptions\tlist of flags to specify Vi compatibility")
231call <SID>OptionG("cpo", &cpo)
232call append("$", "insertmode\tuse Insert mode as the default mode")
233call <SID>BinOptionG("im", &im)
234call append("$", "paste\tpaste mode, insert typed text literally")
235call <SID>BinOptionG("paste", &paste)
236call append("$", "pastetoggle\tkey sequence to toggle paste mode")
237if &pt =~ "\x80"
238 call append("$", " \tset pt=" . <SID>PTvalue())
239else
240 call <SID>OptionG("pt", &pt)
241endif
242call append("$", "runtimepath\tlist of directories used for runtime files and plugins")
243call <SID>OptionG("rtp", &rtp)
Bram Moolenaarf6fee0e2016-02-21 23:02:49 +0100244call append("$", "packpath\tlist of directories used for plugin packages")
245call <SID>OptionG("pp", &pp)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000246call append("$", "helpfile\tname of the main help file")
247call <SID>OptionG("hf", &hf)
248
249
250call <SID>Header("moving around, searching and patterns")
251call append("$", "whichwrap\tlist of flags specifying which commands wrap to another line")
Bram Moolenaar4507f6a2020-09-09 15:10:52 +0200252call <SID>OptionG("ww", &ww)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200253call <SID>AddOption("startofline", gettext("many jump commands move the cursor to the first non-blank\ncharacter of a line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254call <SID>BinOptionG("sol", &sol)
255call append("$", "paragraphs\tnroff macro names that separate paragraphs")
256call <SID>OptionG("para", &para)
257call append("$", "sections\tnroff macro names that separate sections")
258call <SID>OptionG("sect", &sect)
259call append("$", "path\tlist of directory names used for file searching")
260call append("$", "\t(global or local to buffer)")
261call <SID>OptionG("pa", &pa)
262call append("$", "cdpath\tlist of directory names used for :cd")
263call <SID>OptionG("cd", &cd)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200264if exists("+autochdir")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000265 call append("$", "autochdir\tchange to directory of file in buffer")
266 call <SID>BinOptionG("acd", &acd)
267endif
268call append("$", "wrapscan\tsearch commands wrap around the end of the buffer")
269call <SID>BinOptionG("ws", &ws)
270call append("$", "incsearch\tshow match for partly typed search command")
271call <SID>BinOptionG("is", &is)
272call append("$", "magic\tchange the way backslashes are used in search patterns")
273call <SID>BinOptionG("magic", &magic)
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200274call append("$", "regexpengine\tselect the default regexp engine used")
275call <SID>OptionG("re", &re)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000276call append("$", "ignorecase\tignore case when using a search pattern")
277call <SID>BinOptionG("ic", &ic)
278call append("$", "smartcase\toverride 'ignorecase' when pattern has upper case characters")
279call <SID>BinOptionG("scs", &scs)
Bram Moolenaar1deee622010-07-24 20:35:12 +0200280call append("$", "casemap\twhat method to use for changing case of letters")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281call <SID>OptionG("cmp", &cmp)
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000282call append("$", "maxmempattern\tmaximum amount of memory in Kbyte used for pattern matching")
283call append("$", " \tset mmp=" . &mmp)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284call append("$", "define\tpattern for a macro definition line")
285call append("$", "\t(global or local to buffer)")
286call <SID>OptionG("def", &def)
287if has("find_in_path")
288 call append("$", "include\tpattern for an include-file line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200289 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290 call <SID>OptionL("inc")
291 call append("$", "includeexpr\texpression used to transform an include line to a file name")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200292 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000293 call <SID>OptionL("inex")
294endif
295
296
297call <SID>Header("tags")
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200298call <SID>AddOption("tagbsearch", gettext("use binary searching in tags files"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299call <SID>BinOptionG("tbs", &tbs)
300call append("$", "taglength\tnumber of significant characters in a tag name or zero")
301call append("$", " \tset tl=" . &tl)
302call append("$", "tags\tlist of file names to search for tags")
303call append("$", "\t(global or local to buffer)")
304call <SID>OptionG("tag", &tag)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200305call <SID>AddOption("tagcase", gettext("how to handle case when searching in tags files:\n\"followic\" to follow 'ignorecase', \"ignore\" or \"match\""))
Bram Moolenaar0f6562e2015-11-24 18:48:14 +0100306call append("$", "\t(global or local to buffer)")
307call <SID>OptionG("tc", &tc)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000308call append("$", "tagrelative\tfile names in a tags file are relative to the tags file")
309call <SID>BinOptionG("tr", &tr)
310call append("$", "tagstack\ta :tag command will use the tagstack")
311call <SID>BinOptionG("tgst", &tgst)
312call append("$", "showfulltag\twhen completing tags in Insert mode show more info")
313call <SID>BinOptionG("sft", &sft)
Bram Moolenaar45e18cb2019-04-28 18:05:35 +0200314if has("eval")
315 call append("$", "tagfunc\ta function to be used to perform tag searches")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200316 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar45e18cb2019-04-28 18:05:35 +0200317 call <SID>OptionL("tfu")
318endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319if has("cscope")
320 call append("$", "cscopeprg\tcommand for executing cscope")
321 call <SID>OptionG("csprg", &csprg)
322 call append("$", "cscopetag\tuse cscope for tag commands")
323 call <SID>BinOptionG("cst", &cst)
324 call append("$", "cscopetagorder\t0 or 1; the order in which \":cstag\" performs a search")
325 call append("$", " \tset csto=" . &csto)
326 call append("$", "cscopeverbose\tgive messages when adding a cscope database")
327 call <SID>BinOptionG("csverb", &csverb)
328 call append("$", "cscopepathcomp\thow many components of the path to show")
329 call append("$", " \tset cspc=" . &cspc)
Bram Moolenaar1deee622010-07-24 20:35:12 +0200330 call append("$", "cscopequickfix\twhen to open a quickfix window for cscope")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331 call <SID>OptionG("csqf", &csqf)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200332 call append("$", "cscoperelative\tfile names in a cscope file are relative to that file")
333 call <SID>BinOptionG("csre", &csre)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000334endif
335
336
337call <SID>Header("displaying text")
338call append("$", "scroll\tnumber of lines to scroll for CTRL-U and CTRL-D")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200339call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000340call <SID>OptionL("scr")
341call append("$", "scrolloff\tnumber of screen lines to show around the cursor")
342call append("$", " \tset so=" . &so)
343call append("$", "wrap\tlong lines wrap")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200344call append("$", "\t" .. s:local_to_window)
Bram Moolenaar87768892018-05-15 21:42:51 +0200345call <SID>BinOptionL("wrap")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346call append("$", "linebreak\twrap long lines at a character in 'breakat'")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200347call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000348call <SID>BinOptionL("lbr")
Bram Moolenaar597a4222014-06-25 14:39:50 +0200349call append("$", "breakindent\tpreserve indentation in wrapped text")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200350call append("$", "\t" .. s:local_to_window)
Bram Moolenaar597a4222014-06-25 14:39:50 +0200351call <SID>BinOptionL("bri")
352call append("$", "breakindentopt\tadjust breakindent behaviour")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200353call append("$", "\t" .. s:local_to_window)
Bram Moolenaar597a4222014-06-25 14:39:50 +0200354call <SID>OptionL("briopt")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000355call append("$", "breakat\twhich characters might cause a line break")
356call <SID>OptionG("brk", &brk)
357call append("$", "showbreak\tstring to put before wrapped screen lines")
358call <SID>OptionG("sbr", &sbr)
359call append("$", "sidescroll\tminimal number of columns to scroll horizontally")
360call append("$", " \tset ss=" . &ss)
361call append("$", "sidescrolloff\tminimal number of columns to keep left and right of the cursor")
362call append("$", " \tset siso=" . &siso)
363call append("$", "display\tinclude \"lastline\" to show the last line even if it doesn't fit")
364call append("$", "\tinclude \"uhex\" to show unprintable characters as a hex number")
365call <SID>OptionG("dy", &dy)
366call append("$", "fillchars\tcharacters to use for the status line, folds and filler lines")
367call <SID>OptionG("fcs", &fcs)
368call append("$", "cmdheight\tnumber of lines used for the command-line")
369call append("$", " \tset ch=" . &ch)
370call append("$", "columns\twidth of the display")
371call append("$", " \tset co=" . &co)
372call append("$", "lines\tnumber of lines in the display")
373call append("$", " \tset lines=" . &lines)
Bram Moolenaar1b20d3d2010-07-24 20:44:02 +0200374call append("$", "window\tnumber of lines to scroll for CTRL-F and CTRL-B")
375call append("$", " \tset window=" . &window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000376call append("$", "lazyredraw\tdon't redraw while executing macros")
377call <SID>BinOptionG("lz", &lz)
Bram Moolenaar63ce8c02008-06-04 12:29:14 +0000378if has("reltime")
379 call append("$", "redrawtime\ttimeout for 'hlsearch' and :match highlighting in msec")
380 call append("$", " \tset rdt=" . &rdt)
381endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382call append("$", "writedelay\tdelay in msec for each char written to the display")
383call append("$", "\t(for debugging)")
384call append("$", " \tset wd=" . &wd)
385call append("$", "list\tshow <Tab> as ^I and end-of-line as $")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200386call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000387call <SID>BinOptionL("list")
388call append("$", "listchars\tlist of strings used for list mode")
389call <SID>OptionG("lcs", &lcs)
390call append("$", "number\tshow the line number for each line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200391call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392call <SID>BinOptionL("nu")
Bram Moolenaar64486672010-05-16 15:46:46 +0200393call append("$", "relativenumber\tshow the relative line number for each line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200394call append("$", "\t" .. s:local_to_window)
Bram Moolenaar64486672010-05-16 15:46:46 +0200395call <SID>BinOptionL("rnu")
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000396if has("linebreak")
397 call append("$", "numberwidth\tnumber of columns to use for the line number")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200398 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000399 call <SID>OptionL("nuw")
400endif
Bram Moolenaar860cae12010-06-05 23:22:07 +0200401if has("conceal")
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200402 call append("$", "conceallevel\tcontrols whether concealable text is hidden")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200403 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200404 call <SID>OptionL("cole")
Bram Moolenaar4f99eae2010-07-24 15:56:43 +0200405 call append("$", "concealcursor\tmodes in which text in the cursor line can be concealed")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200406 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200407 call <SID>OptionL("cocu")
Bram Moolenaar860cae12010-06-05 23:22:07 +0200408endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000409
410
Bram Moolenaar7887d882005-07-01 22:33:52 +0000411call <SID>Header("syntax, highlighting and spelling")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000412call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
413call <SID>OptionG("bg", &bg)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100414call append("$", "filetype\ttype of file; triggers the FileType event when set")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200415call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100416call <SID>OptionL("ft")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000417if has("syntax")
418 call append("$", "syntax\tname of syntax highlighting used")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200419 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000420 call <SID>OptionL("syn")
Bram Moolenaar9ff70112005-07-11 22:29:03 +0000421 call append("$", "synmaxcol\tmaximum column to look for syntax items")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200422 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar9ff70112005-07-11 22:29:03 +0000423 call <SID>OptionL("smc")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424endif
425call append("$", "highlight\twhich highlighting to use for various occasions")
426call <SID>OptionG("hl", &hl)
427call append("$", "hlsearch\thighlight all matches for the last used search pattern")
428call <SID>BinOptionG("hls", &hls)
Bram Moolenaar68e65602019-05-26 21:33:31 +0200429call append("$", "wincolor\thighlight group to use for the window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200430call append("$", "\t" .. s:local_to_window)
Bram Moolenaar68e65602019-05-26 21:33:31 +0200431call <SID>OptionL("wcr")
Bram Moolenaar8a24b792016-04-30 16:13:10 +0200432if has("termguicolors")
Bram Moolenaar8e3d1b62016-04-30 15:17:19 +0200433 call append("$", "termguicolors\tuse GUI colors for the terminal")
Bram Moolenaar868cfc12016-04-30 16:49:58 +0200434 call <SID>BinOptionG("tgc", &tgc)
Bram Moolenaar8e3d1b62016-04-30 15:17:19 +0200435endif
Bram Moolenaar7887d882005-07-01 22:33:52 +0000436if has("syntax")
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000437 call append("$", "cursorcolumn\thighlight the screen column of the cursor")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200438 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000439 call <SID>BinOptionL("cuc")
440 call append("$", "cursorline\thighlight the screen line of the cursor")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200441 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000442 call <SID>BinOptionL("cul")
Bram Moolenaar410e98a2019-09-09 22:05:49 +0200443 call append("$", "cursorlineopt\tspecifies which area 'cursorline' highlights")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200444 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar410e98a2019-09-09 22:05:49 +0200445 call <SID>OptionL("culopt")
Bram Moolenaar607cc1e2010-07-18 18:47:44 +0200446 call append("$", "colorcolumn\tcolumns to highlight")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200447 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar607cc1e2010-07-18 18:47:44 +0200448 call <SID>OptionL("cc")
Bram Moolenaar7887d882005-07-01 22:33:52 +0000449 call append("$", "spell\thighlight spelling mistakes")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200450 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000451 call <SID>BinOptionL("spell")
452 call append("$", "spelllang\tlist of accepted languages")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200453 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000454 call <SID>OptionL("spl")
455 call append("$", "spellfile\tfile that \"zg\" adds good words to")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200456 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000457 call <SID>OptionL("spf")
Bram Moolenaar551f84f2005-07-06 22:29:20 +0000458 call append("$", "spellcapcheck\tpattern to locate the end of a sentence")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200459 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar551f84f2005-07-06 22:29:20 +0000460 call <SID>OptionL("spc")
Bram Moolenaar65e0d772020-06-14 17:29:55 +0200461 call append("$", "spelloptions\tflags to change how spell checking works")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200462 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar65e0d772020-06-14 17:29:55 +0200463 call <SID>OptionL("spo")
Bram Moolenaar7887d882005-07-01 22:33:52 +0000464 call append("$", "spellsuggest\tmethods used to suggest corrections")
465 call <SID>OptionG("sps", &sps)
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000466 call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing")
467 call <SID>OptionG("msm", &msm)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000468endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469
470
471call <SID>Header("multiple windows")
472call append("$", "laststatus\t0, 1 or 2; when to use a status line for the last window")
473call append("$", " \tset ls=" . &ls)
474if has("statusline")
475 call append("$", "statusline\talternate format to be used for a status line")
476 call <SID>OptionG("stl", &stl)
477endif
478call append("$", "equalalways\tmake all windows the same size when adding/removing windows")
479call <SID>BinOptionG("ea", &ea)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100480call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
481call <SID>OptionG("ead", &ead)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000482call append("$", "winheight\tminimal number of lines used for the current window")
483call append("$", " \tset wh=" . &wh)
484call append("$", "winminheight\tminimal number of lines used for any window")
485call append("$", " \tset wmh=" . &wmh)
486call append("$", "winfixheight\tkeep the height of the window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200487call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000488call <SID>BinOptionL("wfh")
Bram Moolenaarbe4d5062006-03-18 21:30:13 +0000489call append("$", "winfixwidth\tkeep the width of the window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200490call append("$", "\t" .. s:local_to_window)
Bram Moolenaarbe4d5062006-03-18 21:30:13 +0000491call <SID>BinOptionL("wfw")
Bram Moolenaar314dd792019-02-03 15:27:20 +0100492call append("$", "winwidth\tminimal number of columns used for the current window")
493call append("$", " \tset wiw=" . &wiw)
494call append("$", "winminwidth\tminimal number of columns used for any window")
495call append("$", " \tset wmw=" . &wmw)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496call append("$", "helpheight\tinitial height of the help window")
497call append("$", " \tset hh=" . &hh)
498if has("quickfix")
Bram Moolenaar85850f32019-07-19 22:05:51 +0200499 call append("$", "previewpopup\tuse a popup window for preview")
500 call append("$", " \tset pvp=" . &pvp)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501 call append("$", "previewheight\tdefault height for the preview window")
502 call append("$", " \tset pvh=" . &pvh)
503 call append("$", "previewwindow\tidentifies the preview window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200504 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505 call <SID>BinOptionL("pvw")
506endif
507call append("$", "hidden\tdon't unload a buffer when no longer shown in a window")
508call <SID>BinOptionG("hid", &hid)
509call append("$", "switchbuf\t\"useopen\" and/or \"split\"; which window to use when jumping")
510call append("$", "\tto a buffer")
511call <SID>OptionG("swb", &swb)
512call append("$", "splitbelow\ta new window is put below the current one")
513call <SID>BinOptionG("sb", &sb)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100514call append("$", "splitright\ta new window is put right of the current one")
515call <SID>BinOptionG("spr", &spr)
516call append("$", "scrollbind\tthis window scrolls together with other bound windows")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200517call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100518call <SID>BinOptionL("scb")
519call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
520call <SID>OptionG("sbo", &sbo)
521call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200522call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100523call <SID>BinOptionL("crb")
Bram Moolenaar74675a62017-07-15 13:53:23 +0200524if has("terminal")
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200525 call append("$", "termwinsize\tsize of a terminal window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200526 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200527 call <SID>OptionL("tws")
528 call append("$", "termwinkey\tkey that precedes Vim commands in a terminal window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200529 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200530 call <SID>OptionL("twk")
531 call append("$", "termwinscroll\tmax number of lines to keep for scrollback in a terminal window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200532 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarc6ddce32019-02-08 12:47:03 +0100533 if has('win32')
534 call append("$", "termwintype\ttype of pty to use for a terminal window")
535 call <SID>OptionG("twt", &twt)
536 endif
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200537 call <SID>OptionL("twsl")
Bram Moolenaar0aed9a22017-08-19 23:18:02 +0200538 if exists("&winptydll")
539 call append("$", "winptydll\tname of the winpty dynamic library")
540 call <SID>OptionG("winptydll", &winptydll)
541 endif
Bram Moolenaar74675a62017-07-15 13:53:23 +0200542endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000543
544
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000545call <SID>Header("multiple tab pages")
546call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line")
547call append("$", " \tset stal=" . &stal)
548call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"")
549call append("$", " \tset tpm=" . &tpm)
550call append("$", "tabline\tcustom tab pages line")
551call <SID>OptionG("tal", &tal)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000552if has("gui")
553 call append("$", "guitablabel\tcustom tab page label for the GUI")
554 call <SID>OptionG("gtl", &gtl)
555 call append("$", "guitabtooltip\tcustom tab page tooltip for the GUI")
556 call <SID>OptionG("gtt", &gtt)
557endif
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000558
559
Bram Moolenaar071d4272004-06-13 20:20:40 +0000560call <SID>Header("terminal")
561call append("$", "term\tname of the used terminal")
562call <SID>OptionG("term", &term)
563call append("$", "ttytype\talias for 'term'")
564call <SID>OptionG("tty", &tty)
565call append("$", "ttybuiltin\tcheck built-in termcaps first")
566call <SID>BinOptionG("tbi", &tbi)
567call append("$", "ttyfast\tterminal connection is fast")
568call <SID>BinOptionG("tf", &tf)
569call append("$", "weirdinvert\tterminal that requires extra redrawing")
570call <SID>BinOptionG("wiv", &wiv)
571call append("$", "esckeys\trecognize keys that start with <Esc> in Insert mode")
572call <SID>BinOptionG("ek", &ek)
573call append("$", "scrolljump\tminimal number of lines to scroll at a time")
574call append("$", " \tset sj=" . &sj)
575call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing")
576call append("$", " \tset tsl=" . &tsl)
Bram Moolenaara06ecab2016-07-16 14:47:36 +0200577if has("gui") || has("win32")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000578 call append("$", "guicursor\tspecifies what the cursor looks like in different modes")
579 call <SID>OptionG("gcr", &gcr)
580endif
581if has("title")
582 let &title = s:old_title
583 call append("$", "title\tshow info in the window title")
584 call <SID>BinOptionG("title", &title)
585 set notitle
586 call append("$", "titlelen\tpercentage of 'columns' used for the window title")
587 call append("$", " \tset titlelen=" . &titlelen)
588 call append("$", "titlestring\twhen not empty, string to be used for the window title")
589 call <SID>OptionG("titlestring", &titlestring)
590 call append("$", "titleold\tstring to restore the title to when exiting Vim")
591 call <SID>OptionG("titleold", &titleold)
592 let &icon = s:old_icon
593 call append("$", "icon\tset the text of the icon for this window")
594 call <SID>BinOptionG("icon", &icon)
595 set noicon
596 call append("$", "iconstring\twhen not empty, text for the icon of this window")
597 call <SID>OptionG("iconstring", &iconstring)
598endif
599if has("win32")
600 call append("$", "restorescreen\trestore the screen contents when exiting Vim")
601 call <SID>BinOptionG("rs", &rs)
602endif
603
604
605call <SID>Header("using the mouse")
606call append("$", "mouse\tlist of flags for using the mouse")
607call <SID>OptionG("mouse", &mouse)
608if has("gui")
609 call append("$", "mousefocus\tthe window with the mouse pointer becomes the current one")
610 call <SID>BinOptionG("mousef", &mousef)
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100611endif
612call append("$", "scrollfocus\tthe window with the mouse pointer scrolls with the mouse wheel")
613call <SID>BinOptionG("scf", &scf)
614if has("gui")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000615 call append("$", "mousehide\thide the mouse pointer while typing")
616 call <SID>BinOptionG("mh", &mh)
617endif
618call append("$", "mousemodel\t\"extend\", \"popup\" or \"popup_setpos\"; what the right")
619call append("$", "\tmouse button is used for")
620call <SID>OptionG("mousem", &mousem)
621call append("$", "mousetime\tmaximum time in msec to recognize a double-click")
622call append("$", " \tset mouset=" . &mouset)
623call append("$", "ttymouse\t\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse")
624call <SID>OptionG("ttym", &ttym)
625if has("mouseshape")
626 call append("$", "mouseshape\twhat the mouse pointer looks like in different modes")
627 call <SID>OptionG("mouses", &mouses)
628endif
629
630
631if has("gui")
632 call <SID>Header("GUI")
633 call append("$", "guifont\tlist of font names to be used in the GUI")
634 call <SID>OptionG("gfn", &gfn)
635 if has("xfontset")
636 call append("$", "guifontset\tpair of fonts to be used, for multibyte editing")
637 call <SID>OptionG("gfs", &gfs)
638 endif
639 call append("$", "guifontwide\tlist of font names to be used for double-wide characters")
640 call <SID>OptionG("gfw", &gfw)
641 if has("mac")
642 call append("$", "antialias\tuse smooth, antialiased fonts")
643 call <SID>BinOptionG("anti", &anti)
644 endif
645 call append("$", "guioptions\tlist of flags that specify how the GUI works")
646 call <SID>OptionG("go", &go)
647 if has("gui_gtk")
648 call append("$", "toolbar\t\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar")
649 call <SID>OptionG("tb", &tb)
650 if has("gui_gtk2")
Bram Moolenaar1deee622010-07-24 20:35:12 +0200651 call append("$", "toolbariconsize\tsize of toolbar icons")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000652 call <SID>OptionG("tbis", &tbis)
653 endif
654 call append("$", "guiheadroom\troom (in pixels) left above/below the window")
655 call append("$", " \tset ghr=" . &ghr)
656 endif
Bram Moolenaarfb539272014-08-22 19:21:47 +0200657 if has("directx")
658 call append("$", "renderoptions\toptions for text rendering")
659 call <SID>OptionG("rop", &rop)
660 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000661 call append("$", "guipty\tuse a pseudo-tty for I/O to external commands")
662 call <SID>BinOptionG("guipty", &guipty)
663 if has("browse")
664 call append("$", "browsedir\t\"last\", \"buffer\" or \"current\": which directory used for the file browser")
665 call <SID>OptionG("bsdir", &bsdir)
666 endif
667 if has("multi_lang")
668 call append("$", "langmenu\tlanguage to be used for the menus")
669 call <SID>OptionG("langmenu", &lm)
670 endif
671 call append("$", "menuitems\tmaximum number of items in one menu")
672 call append("$", " \tset mis=" . &mis)
673 if has("winaltkeys")
674 call append("$", "winaltkeys\t\"no\", \"yes\" or \"menu\"; how to use the ALT key")
675 call <SID>OptionG("wak", &wak)
676 endif
677 call append("$", "linespace\tnumber of pixel lines to use between characters")
678 call append("$", " \tset lsp=" . &lsp)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100679 if has("balloon_eval") || has("balloon_eval_term")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000680 call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up")
681 call append("$", " \tset bdlay=" . &bdlay)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100682 if has("balloon_eval")
683 call append("$", "ballooneval\tuse balloon evaluation in the GUI")
684 call <SID>BinOptionG("beval", &beval)
685 endif
686 if has("balloon_eval_term")
687 call append("$", "balloonevalterm\tuse balloon evaluation in the terminal")
688 call <SID>BinOptionG("bevalterm", &beval)
689 endif
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000690 if has("eval")
691 call append("$", "balloonexpr\texpression to show in balloon eval")
692 call append("$", " \tset bexpr=" . &bexpr)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000693 endif
694 endif
Bram Moolenaard5ab34b2007-05-05 17:15:44 +0000695 if exists("+macatsui")
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000696 call append("$", "macatsui\tuse ATSUI text drawing; disable to avoid display problems")
697 call <SID>OptionG("macatsui", &macatsui)
698 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000699endif
700
701if has("printer")
702 call <SID>Header("printing")
Bram Moolenaar8299df92004-07-10 09:47:34 +0000703 call append("$", "printoptions\tlist of items that control the format of :hardcopy output")
704 call <SID>OptionG("popt", &popt)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705 call append("$", "printdevice\tname of the printer to be used for :hardcopy")
706 call <SID>OptionG("pdev", &pdev)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000707 if has("postscript")
708 call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy")
709 call <SID>OptionG("pexpr", &pexpr)
710 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000711 call append("$", "printfont\tname of the font to be used for :hardcopy")
712 call <SID>OptionG("pfn", &pfn)
713 call append("$", "printheader\tformat of the header used for :hardcopy")
714 call <SID>OptionG("pheader", &pheader)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000715 if has("postscript")
716 call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
717 call <SID>OptionG("penc", &penc)
718 endif
Bram Moolenaar76cbe812019-02-17 17:53:49 +0100719 call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
720 call <SID>OptionG("pmbcs", &pmbcs)
721 call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
722 call <SID>OptionG("pmbfn", &pmbfn)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000723endif
724
725call <SID>Header("messages and info")
726call append("$", "terse\tadd 's' flag in 'shortmess' (don't show search message)")
727call <SID>BinOptionG("terse", &terse)
728call append("$", "shortmess\tlist of flags to make messages shorter")
729call <SID>OptionG("shm", &shm)
730call append("$", "showcmd\tshow (partial) command keys in the status line")
731let &sc = s:old_sc
732call <SID>BinOptionG("sc", &sc)
733set nosc
734call append("$", "showmode\tdisplay the current mode in the status line")
735call <SID>BinOptionG("smd", &smd)
736call append("$", "ruler\tshow cursor position below each window")
737let &ru = s:old_ru
738call <SID>BinOptionG("ru", &ru)
739set noru
740if has("statusline")
741 call append("$", "rulerformat\talternate format to be used for the ruler")
742 call <SID>OptionG("ruf", &ruf)
743endif
744call append("$", "report\tthreshold for reporting number of changed lines")
745call append("$", " \tset report=" . &report)
746call append("$", "verbose\tthe higher the more messages are given")
747call append("$", " \tset vbs=" . &vbs)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000748call append("$", "verbosefile\tfile to write messages in")
749call <SID>OptionG("vfile", &vfile)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000750call append("$", "more\tpause listings when the screen is full")
751call <SID>BinOptionG("more", &more)
752if has("dialog_con") || has("dialog_gui")
753 call append("$", "confirm\tstart a dialog when a command fails")
754 call <SID>BinOptionG("cf", &cf)
755endif
756call append("$", "errorbells\tring the bell for error messages")
757call <SID>BinOptionG("eb", &eb)
758call append("$", "visualbell\tuse a visual bell instead of beeping")
759call <SID>BinOptionG("vb", &vb)
Bram Moolenaarf9132812015-07-21 19:19:13 +0200760call append("$", "belloff\tdo not ring the bell for these reasons")
Bram Moolenaardd1616e2015-07-22 22:22:59 +0200761call <SID>OptionG("belloff", &belloff)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000762if has("multi_lang")
763 call append("$", "helplang\tlist of preferred languages for finding help")
764 call <SID>OptionG("hlg", &hlg)
765endif
766
767
768call <SID>Header("selecting text")
769call append("$", "selection\t\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves")
770call <SID>OptionG("sel", &sel)
771call append("$", "selectmode\t\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode")
772call append("$", "\tinstead of Visual mode")
773call <SID>OptionG("slm", &slm)
774if has("clipboard")
775 call append("$", "clipboard\t\"unnamed\" to use the * register like unnamed register")
776 call append("$", "\t\"autoselect\" to always put selected text on the clipboard")
777 call <SID>OptionG("cb", &cb)
778endif
779call append("$", "keymodel\t\"startsel\" and/or \"stopsel\"; what special keys can do")
780call <SID>OptionG("km", &km)
781
782
783call <SID>Header("editing text")
784call append("$", "undolevels\tmaximum number of changes that can be undone")
Bram Moolenaar7d76c802014-10-15 22:51:52 +0200785call append("$", "\t(global or local to buffer)")
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100786call append("$", " \tset ul=" . s:old_ul)
Bram Moolenaar4694a172016-04-21 14:05:23 +0200787call append("$", "undofile\tautomatically save and restore undo history")
788call <SID>BinOptionG("udf", &udf)
789call append("$", "undodir\tlist of directories for undo files")
790call <SID>OptionG("udir", &udir)
Bram Moolenaar59f931e2010-07-24 20:27:03 +0200791call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
792call append("$", " \tset ur=" . &ur)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000793call append("$", "modified\tchanges have been made and not written to a file")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200794call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000795call <SID>BinOptionL("mod")
796call append("$", "readonly\tbuffer is not to be written")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200797call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798call <SID>BinOptionL("ro")
799call append("$", "modifiable\tchanges to the text are not possible")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200800call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000801call <SID>BinOptionL("ma")
802call append("$", "textwidth\tline length above which to break a line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200803call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000804call <SID>OptionL("tw")
805call append("$", "wrapmargin\tmargin from the right in which to break a line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200806call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000807call <SID>OptionL("wm")
808call append("$", "backspace\tspecifies what <BS>, CTRL-W, etc. can do in Insert mode")
809call append("$", " \tset bs=" . &bs)
810call append("$", "comments\tdefinition of what comment lines look like")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200811call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000812call <SID>OptionL("com")
813call append("$", "formatoptions\tlist of flags that tell how automatic formatting works")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200814call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000815call <SID>OptionL("fo")
Bram Moolenaar86b68352004-12-27 21:59:20 +0000816call append("$", "formatlistpat\tpattern to recognize a numbered list")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200817call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar86b68352004-12-27 21:59:20 +0000818call <SID>OptionL("flp")
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000819if has("eval")
820 call append("$", "formatexpr\texpression used for \"gq\" to format lines")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200821 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000822 call <SID>OptionL("fex")
823endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000824if has("insert_expand")
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000825 call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200826 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000827 call <SID>OptionL("cpt")
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000828 call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
829 call <SID>OptionG("cot", &cot)
Bram Moolenaar36e4d982019-08-20 21:12:16 +0200830 if exists("+completepopup")
831 call append("$", "completepopup\toptions for the Insert mode completion info popup")
832 call <SID>OptionG("cpp", &cpp)
833 endif
Bram Moolenaard3667a22006-03-16 21:35:52 +0000834 call append("$", "pumheight\tmaximum height of the popup menu")
835 call <SID>OptionG("ph", &ph)
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +0100836 call append("$", "pumwidth\tminimum width of the popup menu")
837 call <SID>OptionG("pw", &pw)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000838 call append("$", "completefunc\tuser defined function for Insert mode completion")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200839 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000840 call <SID>OptionL("cfu")
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000841 call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200842 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaare344bea2005-09-01 20:46:49 +0000843 call <SID>OptionL("ofu")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000844 call append("$", "dictionary\tlist of dictionary files for keyword completion")
845 call append("$", "\t(global or local to buffer)")
846 call <SID>OptionG("dict", &dict)
847 call append("$", "thesaurus\tlist of thesaurus files for keyword completion")
848 call append("$", "\t(global or local to buffer)")
849 call <SID>OptionG("tsr", &tsr)
850endif
851call append("$", "infercase\tadjust case of a keyword completion match")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200852call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853call <SID>BinOptionL("inf")
854if has("digraphs")
Bram Moolenaar2b7db932016-01-07 16:52:10 +0100855 call append("$", "digraph\tenable entering digraphs with c1 <BS> c2")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856 call <SID>BinOptionG("dg", &dg)
857endif
858call append("$", "tildeop\tthe \"~\" command behaves like an operator")
859call <SID>BinOptionG("top", &top)
Bram Moolenaar4770d092006-01-12 23:22:24 +0000860call append("$", "operatorfunc\tfunction called for the\"g@\" operator")
861call <SID>OptionG("opfunc", &opfunc)
Bram Moolenaar1deee622010-07-24 20:35:12 +0200862call append("$", "showmatch\twhen inserting a bracket, briefly jump to its match")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000863call <SID>BinOptionG("sm", &sm)
864call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'")
865call append("$", " \tset mat=" . &mat)
866call append("$", "matchpairs\tlist of pairs that match for the \"%\" command")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200867call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868call <SID>OptionL("mps")
869call append("$", "joinspaces\tuse two spaces after '.' when joining a line")
870call <SID>BinOptionG("js", &js)
871call append("$", "nrformats\t\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for")
872call append("$", "\tCTRL-A and CTRL-X commands")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200873call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000874call <SID>OptionL("nf")
875
876
877call <SID>Header("tabs and indenting")
878call append("$", "tabstop\tnumber of spaces a <Tab> in the text stands for")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200879call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000880call <SID>OptionL("ts")
881call append("$", "shiftwidth\tnumber of spaces used for each step of (auto)indent")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200882call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000883call <SID>OptionL("sw")
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200884if has("vartabs")
885 call append("$", "vartabstop\tlist of number of spaces a tab counts for")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200886 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200887 call <SID>OptionL("vts")
888 call append("$", "varsofttabstop\tlist of number of spaces a soft tabsstop counts for")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200889 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200890 call <SID>OptionL("vsts")
891endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000892call append("$", "smarttab\ta <Tab> in an indent inserts 'shiftwidth' spaces")
893call <SID>BinOptionG("sta", &sta)
894call append("$", "softtabstop\tif non-zero, number of spaces to insert for a <Tab>")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200895call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896call <SID>OptionL("sts")
897call append("$", "shiftround\tround to 'shiftwidth' for \"<<\" and \">>\"")
898call <SID>BinOptionG("sr", &sr)
899call append("$", "expandtab\texpand <Tab> to spaces in Insert mode")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200900call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901call <SID>BinOptionL("et")
902call append("$", "autoindent\tautomatically set the indent of a new line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200903call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904call <SID>BinOptionL("ai")
905if has("smartindent")
906 call append("$", "smartindent\tdo clever autoindenting")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200907 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908 call <SID>BinOptionL("si")
909endif
910if has("cindent")
911 call append("$", "cindent\tenable specific indenting for C code")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200912 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000913 call <SID>BinOptionL("cin")
914 call append("$", "cinoptions\toptions for C-indenting")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200915 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000916 call <SID>OptionL("cino")
917 call append("$", "cinkeys\tkeys that trigger C-indenting in Insert mode")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200918 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000919 call <SID>OptionL("cink")
920 call append("$", "cinwords\tlist of words that cause more C-indent")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200921 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000922 call <SID>OptionL("cinw")
923 call append("$", "indentexpr\texpression used to obtain the indent of a line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200924 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925 call <SID>OptionL("inde")
926 call append("$", "indentkeys\tkeys that trigger indenting with 'indentexpr' in Insert mode")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200927 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000928 call <SID>OptionL("indk")
929endif
Bram Moolenaar1deee622010-07-24 20:35:12 +0200930call append("$", "copyindent\tcopy whitespace for indenting from previous line")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200931call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932call <SID>BinOptionL("ci")
Bram Moolenaar1deee622010-07-24 20:35:12 +0200933call append("$", "preserveindent\tpreserve kind of whitespace when changing indent")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200934call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935call <SID>BinOptionL("pi")
936if has("lispindent")
937 call append("$", "lisp\tenable lisp mode")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200938 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000939 call <SID>BinOptionL("lisp")
940 call append("$", "lispwords\twords that change how lisp indenting works")
Bram Moolenaare7a88a82014-04-01 12:26:46 +0200941 call <SID>OptionL("lw")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942endif
943
944
945if has("folding")
946 call <SID>Header("folding")
947 call append("$", "foldenable\tset to display all folds open")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200948 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949 call <SID>BinOptionL("fen")
950 call append("$", "foldlevel\tfolds with a level higher than this number will be closed")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200951 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000952 call <SID>OptionL("fdl")
953 call append("$", "foldlevelstart\tvalue for 'foldlevel' when starting to edit a file")
954 call append("$", " \tset fdls=" . &fdls)
955 call append("$", "foldcolumn\twidth of the column used to indicate folds")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200956 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000957 call <SID>OptionL("fdc")
958 call append("$", "foldtext\texpression used to display the text of a closed fold")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200959 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000960 call <SID>OptionL("fdt")
961 call append("$", "foldclose\tset to \"all\" to close a fold when the cursor leaves it")
962 call <SID>OptionG("fcl", &fcl)
963 call append("$", "foldopen\tspecifies for which commands a fold will be opened")
964 call <SID>OptionG("fdo", &fdo)
965 call append("$", "foldminlines\tminimum number of screen lines for a fold to be closed")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200966 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000967 call <SID>OptionL("fml")
968 call append("$", "commentstring\ttemplate for comments; used to put the marker in")
969 call <SID>OptionL("cms")
970 call append("$", "foldmethod\tfolding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200971 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000972 call <SID>OptionL("fdm")
973 call append("$", "foldexpr\texpression used when 'foldmethod' is \"expr\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200974 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000975 call <SID>OptionL("fde")
976 call append("$", "foldignore\tused to ignore lines when 'foldmethod' is \"indent\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200977 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000978 call <SID>OptionL("fdi")
979 call append("$", "foldmarker\tmarkers used when 'foldmethod' is \"marker\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200980 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000981 call <SID>OptionL("fmr")
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +0100982 call append("$", "foldnestmax\tmaximum fold depth for when 'foldmethod' is \"indent\" or \"syntax\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200983 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000984 call <SID>OptionL("fdn")
985endif
986
987
988if has("diff")
989 call <SID>Header("diff mode")
990 call append("$", "diff\tuse diff mode for the current window")
Bram Moolenaar64075b02020-09-09 12:56:30 +0200991 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000992 call <SID>BinOptionL("diff")
993 call append("$", "diffopt\toptions for using diff mode")
994 call <SID>OptionG("dip", &dip)
995 call append("$", "diffexpr\texpression used to obtain a diff file")
996 call <SID>OptionG("dex", &dex)
997 call append("$", "patchexpr\texpression used to patch a file")
998 call <SID>OptionG("pex", &pex)
999endif
1000
1001
1002call <SID>Header("mapping")
1003call append("$", "maxmapdepth\tmaximum depth of mapping")
1004call append("$", " \tset mmd=" . &mmd)
1005call append("$", "remap\trecognize mappings in mapped keys")
1006call <SID>BinOptionG("remap", &remap)
1007call append("$", "timeout\tallow timing out halfway into a mapping")
1008call <SID>BinOptionG("to", &to)
1009call append("$", "ttimeout\tallow timing out halfway into a key code")
1010call <SID>BinOptionG("ttimeout", &ttimeout)
1011call append("$", "timeoutlen\ttime in msec for 'timeout'")
1012call append("$", " \tset tm=" . &tm)
1013call append("$", "ttimeoutlen\ttime in msec for 'ttimeout'")
1014call append("$", " \tset ttm=" . &ttm)
1015
1016
1017call <SID>Header("reading and writing files")
1018call append("$", "modeline\tenable using settings from modelines when reading a file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001019call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001020call <SID>BinOptionL("ml")
Bram Moolenaar68e65602019-05-26 21:33:31 +02001021call append("$", "modelineexpr\tallow setting expression options from a modeline")
1022call <SID>BinOptionG("mle", &mle)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001023call append("$", "modelines\tnumber of lines to check for modelines")
1024call append("$", " \tset mls=" . &mls)
1025call append("$", "binary\tbinary file editing")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001026call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001027call <SID>BinOptionL("bin")
1028call append("$", "endofline\tlast line in the file has an end-of-line")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001029call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001030call <SID>BinOptionL("eol")
Bram Moolenaarf9132812015-07-21 19:19:13 +02001031call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001032call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar34d72d42015-07-17 14:18:08 +02001033call <SID>BinOptionL("fixeol")
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001034call append("$", "bomb\tprepend a Byte Order Mark to the file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001035call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001036call <SID>BinOptionL("bomb")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001038call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001039call <SID>OptionL("ff")
1040call append("$", "fileformats\tlist of file formats to look for when editing a file")
1041call <SID>OptionG("ffs", &ffs)
1042call append("$", "textmode\tobsolete, use 'fileformat'")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001043call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001044call <SID>BinOptionL("tx")
1045call append("$", "textauto\tobsolete, use 'fileformats'")
1046call <SID>BinOptionG("ta", &ta)
1047call append("$", "write\twriting files is allowed")
1048call <SID>BinOptionG("write", &write)
1049call append("$", "writebackup\twrite a backup file before overwriting a file")
1050call <SID>BinOptionG("wb", &wb)
1051call append("$", "backup\tkeep a backup after overwriting a file")
1052call <SID>BinOptionG("bk", &bk)
1053call append("$", "backupskip\tpatterns that specify for which files a backup is not made")
1054call append("$", " \tset bsk=" . &bsk)
1055call append("$", "backupcopy\twhether to make the backup as a copy or rename the existing file")
Bram Moolenaar7d76c802014-10-15 22:51:52 +02001056call append("$", "\t(global or local to buffer)")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001057call append("$", " \tset bkc=" . &bkc)
1058call append("$", "backupdir\tlist of directories to put backup files in")
1059call <SID>OptionG("bdir", &bdir)
1060call append("$", "backupext\tfile name extension for the backup file")
1061call <SID>OptionG("bex", &bex)
1062call append("$", "autowrite\tautomatically write a file when leaving a modified buffer")
1063call <SID>BinOptionG("aw", &aw)
1064call append("$", "autowriteall\tas 'autowrite', but works with more commands")
1065call <SID>BinOptionG("awa", &awa)
1066call append("$", "writeany\talways write without asking for confirmation")
1067call <SID>BinOptionG("wa", &wa)
1068call append("$", "autoread\tautomatically read a file when it was modified outside of Vim")
1069call append("$", "\t(global or local to buffer)")
1070call <SID>BinOptionG("ar", &ar)
1071call append("$", "patchmode\tkeep oldest version of a file; specifies file name extension")
1072call <SID>OptionG("pm", &pm)
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001073call append("$", "fsync\tforcibly sync the file to disk after writing it")
1074call <SID>BinOptionG("fs", &fs)
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001075call append("$", "shortname\tuse 8.3 file names")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001076call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001077call <SID>BinOptionL("sn")
Bram Moolenaar365bdf72010-07-24 20:57:44 +02001078call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001079call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarb702c842010-05-18 22:28:22 +02001080call <SID>OptionL("cm")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001081
1082
1083call <SID>Header("the swap file")
1084call append("$", "directory\tlist of directories for the swap file")
1085call <SID>OptionG("dir", &dir)
1086call append("$", "swapfile\tuse a swap file for this buffer")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001087call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001088call <SID>BinOptionL("swf")
1089call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
1090call <SID>OptionG("sws", &sws)
1091call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
1092call append("$", " \tset uc=" . &uc)
1093call append("$", "updatetime\ttime in msec after which the swap file will be updated")
1094call append("$", " \tset ut=" . &ut)
1095call append("$", "maxmem\tmaximum amount of memory in Kbyte used for one buffer")
1096call append("$", " \tset mm=" . &mm)
1097call append("$", "maxmemtot\tmaximum amount of memory in Kbyte used for all buffers")
1098call append("$", " \tset mmt=" . &mmt)
1099
1100
1101call <SID>Header("command line editing")
1102call append("$", "history\thow many command lines are remembered ")
1103call append("$", " \tset hi=" . &hi)
1104call append("$", "wildchar\tkey that triggers command-line expansion")
1105call append("$", " \tset wc=" . &wc)
1106call append("$", "wildcharm\tlike 'wildchar' but can also be used in a mapping")
1107call append("$", " \tset wcm=" . &wcm)
1108call append("$", "wildmode\tspecifies how command line completion works")
1109call <SID>OptionG("wim", &wim)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001110if has("wildoptions")
1111 call append("$", "wildoptions\tempty or \"tagfile\" to list file name of matching tags")
1112 call <SID>OptionG("wop", &wop)
1113endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001114call append("$", "suffixes\tlist of file name extensions that have a lower priority")
1115call <SID>OptionG("su", &su)
1116if has("file_in_path")
1117 call append("$", "suffixesadd\tlist of file name extensions added when searching for a file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001118 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001119 call <SID>OptionL("sua")
1120endif
1121if has("wildignore")
1122 call append("$", "wildignore\tlist of patterns to ignore files for file name completion")
1123 call <SID>OptionG("wig", &wig)
1124endif
Bram Moolenaar91fc43d2013-04-05 15:41:05 +02001125call append("$", "fileignorecase\tignore case when using file names")
1126call <SID>BinOptionG("fic", &fic)
Bram Moolenaar81af9252010-12-10 20:35:50 +01001127call append("$", "wildignorecase\tignore case when completing file names")
1128call <SID>BinOptionG("wic", &wic)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001129if has("wildmenu")
1130 call append("$", "wildmenu\tcommand-line completion shows a list of matches")
1131 call <SID>BinOptionG("wmnu", &wmnu)
1132endif
Bram Moolenaar314dd792019-02-03 15:27:20 +01001133call append("$", "cedit\tkey used to open the command-line window")
1134call <SID>OptionG("cedit", &cedit)
1135call append("$", "cmdwinheight\theight of the command-line window")
1136call <SID>OptionG("cwh", &cwh)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001137
1138
1139call <SID>Header("executing external commands")
1140call append("$", "shell\tname of the shell program used for external commands")
1141call <SID>OptionG("sh", &sh)
1142if has("amiga")
1143 call append("$", "shelltype\twhen to use the shell or directly execute a command")
1144 call append("$", " \tset st=" . &st)
1145endif
1146call append("$", "shellquote\tcharacter(s) to enclose a shell command in")
1147call <SID>OptionG("shq", &shq)
1148call append("$", "shellxquote\tlike 'shellquote' but include the redirection")
1149call <SID>OptionG("sxq", &sxq)
Bram Moolenaardb7207e2012-02-22 17:30:19 +01001150call append("$", "shellxescape\tcharacters to escape when 'shellxquote' is (")
1151call <SID>OptionG("sxe", &sxe)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001152call append("$", "shellcmdflag\targument for 'shell' to execute a command")
1153call <SID>OptionG("shcf", &shcf)
1154call append("$", "shellredir\tused to redirect command output to a file")
1155call <SID>OptionG("srr", &srr)
Bram Moolenaar551f84f2005-07-06 22:29:20 +00001156call append("$", "shelltemp\tuse a temp file for shell commands instead of using a pipe")
1157call <SID>BinOptionG("stmp", &stmp)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001158call append("$", "equalprg\tprogram used for \"=\" command")
1159call append("$", "\t(global or local to buffer)")
1160call <SID>OptionG("ep", &ep)
1161call append("$", "formatprg\tprogram used to format lines with \"gq\" command")
1162call <SID>OptionG("fp", &fp)
1163call append("$", "keywordprg\tprogram used for the \"K\" command")
1164call <SID>OptionG("kp", &kp)
1165call append("$", "warn\twarn when using a shell command and a buffer has changes")
1166call <SID>BinOptionG("warn", &warn)
1167
1168
1169if has("quickfix")
Bram Moolenaaracc22402020-06-07 21:07:18 +02001170 call <SID>Header("running make and jumping to errors (quickfix)")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001171 call append("$", "errorfile\tname of the file that contains error messages")
1172 call <SID>OptionG("ef", &ef)
1173 call append("$", "errorformat\tlist of formats for error messages")
1174 call append("$", "\t(global or local to buffer)")
1175 call <SID>OptionG("efm", &efm)
1176 call append("$", "makeprg\tprogram used for the \":make\" command")
1177 call append("$", "\t(global or local to buffer)")
1178 call <SID>OptionG("mp", &mp)
1179 call append("$", "shellpipe\tstring used to put the output of \":make\" in the error file")
1180 call <SID>OptionG("sp", &sp)
1181 call append("$", "makeef\tname of the errorfile for the 'makeprg' command")
1182 call <SID>OptionG("mef", &mef)
1183 call append("$", "grepprg\tprogram used for the \":grep\" command")
1184 call append("$", "\t(global or local to buffer)")
1185 call <SID>OptionG("gp", &gp)
1186 call append("$", "grepformat\tlist of formats for output of 'grepprg'")
1187 call <SID>OptionG("gfm", &gfm)
Bram Moolenaarad4187e2017-03-06 21:45:20 +01001188 call append("$", "makeencoding\tencoding of the \":make\" and \":grep\" output")
1189 call append("$", "\t(global or local to buffer)")
1190 call <SID>OptionG("menc", &menc)
Bram Moolenaaracc22402020-06-07 21:07:18 +02001191 call append("$", "quickfixtextfunc\tfunction to display text in the quickfix window")
1192 call <SID>OptionG("qftf", &qftf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001193endif
1194
1195
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001196if has("win32") || has("osfiletype")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197 call <SID>Header("system specific")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198 if has("osfiletype")
1199 call append("$", "osfiletype\tOS-specific information about the type of file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001200 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001201 call <SID>OptionL("oft")
1202 endif
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001203 if has("win32")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001204 call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells")
1205 call <SID>BinOptionG("ssl", &ssl)
Bram Moolenaar088e8e32019-08-08 22:15:18 +02001206 call append("$", "completeslash\tspecifies slash/backslash used for completion")
1207 call <SID>OptionG("csl", &csl)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001208 endif
1209endif
1210
1211
1212call <SID>Header("language specific")
1213call append("$", "isfname\tspecifies the characters in a file name")
1214call <SID>OptionG("isf", &isf)
1215call append("$", "isident\tspecifies the characters in an identifier")
1216call <SID>OptionG("isi", &isi)
1217call append("$", "iskeyword\tspecifies the characters in a keyword")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001218call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001219call <SID>OptionL("isk")
1220call append("$", "isprint\tspecifies printable characters")
1221call <SID>OptionG("isp", &isp)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001222if has("textobjects")
1223 call append("$", "quoteescape\tspecifies escape characters in a string")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001224 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001225 call <SID>OptionL("qe")
1226endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001227if has("rightleft")
1228 call append("$", "rightleft\tdisplay the buffer right-to-left")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001229 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230 call <SID>BinOptionL("rl")
Bram Moolenaar1deee622010-07-24 20:35:12 +02001231 call append("$", "rightleftcmd\twhen to edit the command-line right-to-left")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001232 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001233 call <SID>OptionL("rlc")
Bram Moolenaar1deee622010-07-24 20:35:12 +02001234 call append("$", "revins\tinsert characters backwards")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235 call <SID>BinOptionG("ri", &ri)
Bram Moolenaar1deee622010-07-24 20:35:12 +02001236 call append("$", "allowrevins\tallow CTRL-_ in Insert and Command-line mode to toggle 'revins'")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001237 call <SID>BinOptionG("ari", &ari)
1238 call append("$", "aleph\tthe ASCII code for the first letter of the Hebrew alphabet")
1239 call append("$", " \tset al=" . &al)
1240 call append("$", "hkmap\tuse Hebrew keyboard mapping")
1241 call <SID>BinOptionG("hk", &hk)
1242 call append("$", "hkmapp\tuse phonetic Hebrew keyboard mapping")
1243 call <SID>BinOptionG("hkp", &hkp)
1244endif
1245if has("farsi")
1246 call append("$", "altkeymap\tuse Farsi as the second language when 'revins' is set")
1247 call <SID>BinOptionG("akm", &akm)
1248 call append("$", "fkmap\tuse Farsi keyboard mapping")
1249 call <SID>BinOptionG("fk", &fk)
1250endif
1251if has("arabic")
Bram Moolenaar1deee622010-07-24 20:35:12 +02001252 call append("$", "arabic\tprepare for editing Arabic text")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001253 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001254 call <SID>BinOptionL("arab")
Bram Moolenaar1deee622010-07-24 20:35:12 +02001255 call append("$", "arabicshape\tperform shaping of Arabic characters")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001256 call <SID>BinOptionG("arshape", &arshape)
Bram Moolenaar1deee622010-07-24 20:35:12 +02001257 call append("$", "termbidi\tterminal will perform bidi handling")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001258 call <SID>BinOptionG("tbidi", &tbidi)
1259endif
1260if has("keymap")
Bram Moolenaar2b7db932016-01-07 16:52:10 +01001261 call append("$", "keymap\tname of a keyboard mapping")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001262 call <SID>OptionL("kmp")
1263endif
1264if has("langmap")
Bram Moolenaar2f3b5102014-11-19 18:54:17 +01001265 call append("$", "langmap\tlist of characters that are translated in Normal mode")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001266 call <SID>OptionG("lmap", &lmap)
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02001267 call append("$", "langremap\tapply 'langmap' to mapped characters")
1268 call <SID>BinOptionG("lrm", &lrm)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269endif
1270if has("xim")
1271 call append("$", "imdisable\twhen set never use IM; overrules following IM options")
1272 call <SID>BinOptionG("imd", &imd)
1273endif
1274call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001275call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001276call <SID>OptionL("imi")
Bram Moolenaar37c64c72017-09-19 22:06:03 +02001277call append("$", "imstyle\tinput method style, 0: on-the-spot, 1: over-the-spot")
1278call <SID>OptionG("imst", &imst)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001279call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001280call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001281call <SID>OptionL("ims")
1282if has("xim")
1283 call append("$", "imcmdline\twhen set always use IM when starting to edit a command line")
1284 call <SID>BinOptionG("imc", &imc)
Bram Moolenaar14b69452013-06-29 23:05:20 +02001285 call append("$", "imstatusfunc\tfunction to obtain IME status")
1286 call <SID>OptionG("imsf", &imsf)
1287 call append("$", "imactivatefunc\tfunction to enable/disable IME")
1288 call <SID>OptionG("imaf", &imaf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001289endif
1290
1291
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001292call <SID>Header("multi-byte characters")
1293call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
1294call append("$", "\t\"euc-jp\", \"big5\", etc.")
1295call <SID>OptionG("enc", &enc)
1296call append("$", "fileencoding\tcharacter encoding for the current file")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001297call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001298call <SID>OptionL("fenc")
1299call append("$", "fileencodings\tautomatically detected character encodings")
1300call <SID>OptionG("fencs", &fencs)
1301call append("$", "termencoding\tcharacter encoding used by the terminal")
1302call <SID>OptionG("tenc", &tenc)
1303call append("$", "charconvert\texpression used for character encoding conversion")
1304call <SID>OptionG("ccv", &ccv)
1305call append("$", "delcombine\tdelete combining (composing) characters on their own")
1306call <SID>BinOptionG("deco", &deco)
1307call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
1308call <SID>OptionG("mco", &mco)
1309if has("xim") && has("gui_gtk")
1310 call append("$", "imactivatekey\tkey that activates the X input method")
1311 call <SID>OptionG("imak", &imak)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001312endif
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001313call append("$", "ambiwidth\twidth of ambiguous width characters")
1314call <SID>OptionG("ambw", &ambw)
1315call append("$", "emoji\temoji characters are full width")
1316call <SID>BinOptionG("emo", &emo)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001317
1318
1319call <SID>Header("various")
Bram Moolenaar314dd792019-02-03 15:27:20 +01001320call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
1321call <SID>OptionG("ve", &ve)
1322call append("$", "eventignore\tlist of autocommand events which are to be ignored")
1323call <SID>OptionG("ei", &ei)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001324call append("$", "loadplugins\tload plugin scripts when starting up")
1325call <SID>BinOptionG("lpl", &lpl)
1326call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory")
1327call <SID>BinOptionG("ex", &ex)
1328call append("$", "secure\tsafer working with script files in the current directory")
1329call <SID>BinOptionG("secure", &secure)
1330call append("$", "gdefault\tuse the 'g' flag for \":substitute\"")
1331call <SID>BinOptionG("gd", &gd)
1332call append("$", "edcompatible\t'g' and 'c' flags of \":substitute\" toggle")
1333call <SID>BinOptionG("ed", &ed)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001334if exists("+opendevice")
1335 call append("$", "opendevice\tallow reading/writing devices")
1336 call <SID>BinOptionG("odev", &odev)
1337endif
1338if exists("+maxfuncdepth")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001339 call append("$", "maxfuncdepth\tmaximum depth of function calls")
1340 call append("$", " \tset mfd=" . &mfd)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001341endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001342if has("mksession")
1343 call append("$", "sessionoptions\tlist of words that specifies what to put in a session file")
1344 call <SID>OptionG("ssop", &ssop)
1345 call append("$", "viewoptions\tlist of words that specifies what to save for :mkview")
1346 call <SID>OptionG("vop", &vop)
1347 call append("$", "viewdir\tdirectory where to store files with :mkview")
1348 call <SID>OptionG("vdir", &vdir)
1349endif
1350if has("viminfo")
1351 call append("$", "viminfo\tlist that specifies what to write in the viminfo file")
1352 call <SID>OptionG("vi", &vi)
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02001353 call append("$", "viminfofile\tfile name used for the viminfo file")
1354 call <SID>OptionG("vif", &vif)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001355endif
1356if has("quickfix")
1357 call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001358 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001359 call <SID>OptionL("bh")
1360 call append("$", "buftype\t\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001361 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001362 call <SID>OptionL("bt")
1363endif
1364call append("$", "buflisted\twhether the buffer shows up in the buffer list")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001365call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001366call <SID>BinOptionL("bl")
1367call append("$", "debug\tset to \"msg\" to see all error messages")
1368call append("$", " \tset debug=" . &debug)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001369if has("signs")
1370 call append("$", "signcolumn\twhether to show the signcolumn")
Bram Moolenaar64075b02020-09-09 12:56:30 +02001371 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001372 call <SID>OptionL("scl")
1373endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001374if has("mzscheme")
1375 call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
1376 call append("$", " \tset mzq=" . &mzq)
1377endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001378if exists("&luadll")
1379 call append("$", "luadll\tname of the Lua dynamic library")
1380 call <SID>OptionG("luadll", &luadll)
1381endif
1382if exists("&perldll")
1383 call append("$", "perldll\tname of the Perl dynamic library")
1384 call <SID>OptionG("perldll", &perldll)
1385endif
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01001386if has('pythonx')
1387 call append("$", "pyxversion\twhether to use Python 2 or 3")
1388 call append("$", " \tset pyx=" . &wd)
1389endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001390if exists("&pythondll")
1391 call append("$", "pythondll\tname of the Python 2 dynamic library")
1392 call <SID>OptionG("pythondll", &pythondll)
1393endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001394if exists("&pythonhome")
1395 call append("$", "pythonhome\tname of the Python 2 home directory")
1396 call <SID>OptionG("pythonhome", &pythonhome)
1397endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001398if exists("&pythonthreedll")
1399 call append("$", "pythonthreedll\tname of the Python 3 dynamic library")
1400 call <SID>OptionG("pythonthreedll", &pythonthreedll)
1401endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001402if exists("&pythonthreehome")
1403 call append("$", "pythonthreehome\tname of the Python 3 home directory")
1404 call <SID>OptionG("pythonthreehome", &pythonthreehome)
1405endif
Bram Moolenaara93f9752015-11-10 20:45:09 +01001406if exists("&rubydll")
1407 call append("$", "rubydll\tname of the Ruby dynamic library")
1408 call <SID>OptionG("rubydll", &rubydll)
1409endif
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001410if exists("&tcldll")
1411 call append("$", "tcldll\tname of the Tcl dynamic library")
1412 call <SID>OptionG("tcldll", &tcldll)
1413endif
Bram Moolenaar01164a62017-11-02 22:58:42 +01001414if exists("&mzschemedll")
1415 call append("$", "mzschemedll\tname of the Tcl dynamic library")
1416 call <SID>OptionG("mzschemedll", &mzschemedll)
1417 call append("$", "mzschemegcdll\tname of the Tcl GC dynamic library")
1418 call <SID>OptionG("mzschemegcdll", &mzschemegcdll)
1419endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001420
1421set cpo&vim
1422
1423" go to first line
14241
1425
1426" reset 'modified', so that ":q" can be used to close the window
1427setlocal nomodified
1428
1429if has("syntax")
1430 " Use Vim highlighting, with some additional stuff
1431 setlocal ft=vim
1432 syn match optwinHeader "^ \=[0-9].*"
1433 syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
1434 syn match optwinComment ".*" contained
1435 syn match optwinComment "^\t.*"
1436 if !exists("did_optwin_syntax_inits")
1437 let did_optwin_syntax_inits = 1
1438 hi link optwinHeader Title
1439 hi link optwinName Identifier
1440 hi link optwinComment Comment
1441 endif
1442endif
1443
1444" Install autocommands to enable mappings in option-window
1445noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR>
1446inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR>
1447noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
1448
1449" Make the buffer be deleted when the window is closed.
1450setlocal buftype=nofile bufhidden=delete noswapfile
1451
1452augroup optwin
1453 au! BufUnload,BufHidden option-window nested
1454 \ call <SID>unload() | delfun <SID>unload
1455augroup END
1456
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001457func <SID>unload()
Bram Moolenaar071d4272004-06-13 20:20:40 +00001458 delfun <SID>CR
1459 delfun <SID>Space
1460 delfun <SID>Find
1461 delfun <SID>Update
1462 delfun <SID>OptionL
1463 delfun <SID>OptionG
1464 delfun <SID>BinOptionL
1465 delfun <SID>BinOptionG
1466 delfun <SID>Header
1467 au! optwin
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001468endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +00001469
1470" Restore the previous value of 'title' and 'icon'.
1471let &title = s:old_title
1472let &icon = s:old_icon
1473let &ru = s:old_ru
1474let &sc = s:old_sc
1475let &cpo = s:cpo_save
Bram Moolenaar9c474b22018-02-27 17:04:25 +01001476let &ul = s:old_ul
1477unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum s:old_ul
Bram Moolenaar251e1912011-06-19 05:09:16 +02001478
1479" vim: ts=8 sw=2 sts=2