blob: 4582217057486aff8117d7e2f6839dc8d0a85387 [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
Bram Moolenaar14944c02020-09-11 20:51:26 +0200227call <SID>Header(gettext("important"))
228call <SID>AddOption("compatible", gettext("behave very Vi compatible (not advisable)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000229call <SID>BinOptionG("cp", &cp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200230call <SID>AddOption("cpoptions", gettext("list of flags to specify Vi compatibility"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231call <SID>OptionG("cpo", &cpo)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200232call <SID>AddOption("insertmode", gettext("use Insert mode as the default mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233call <SID>BinOptionG("im", &im)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200234call <SID>AddOption("paste", gettext("paste mode, insert typed text literally"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235call <SID>BinOptionG("paste", &paste)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200236call <SID>AddOption("pastetoggle", gettext("key sequence to toggle paste mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237if &pt =~ "\x80"
238 call append("$", " \tset pt=" . <SID>PTvalue())
239else
240 call <SID>OptionG("pt", &pt)
241endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200242call <SID>AddOption("runtimepath", gettext("list of directories used for runtime files and plugins"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000243call <SID>OptionG("rtp", &rtp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200244call <SID>AddOption("packpath", gettext("list of directories used for plugin packages"))
Bram Moolenaarf6fee0e2016-02-21 23:02:49 +0100245call <SID>OptionG("pp", &pp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200246call <SID>AddOption("helpfile", gettext("name of the main help file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247call <SID>OptionG("hf", &hf)
248
249
Bram Moolenaar14944c02020-09-11 20:51:26 +0200250call <SID>Header(gettext("moving around, searching and patterns"))
251call <SID>AddOption("whichwrap", gettext("list 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)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200255call <SID>AddOption("paragraphs", gettext("nroff macro names that separate paragraphs"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000256call <SID>OptionG("para", &para)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200257call <SID>AddOption("sections", gettext("nroff macro names that separate sections"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000258call <SID>OptionG("sect", &sect)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200259call <SID>AddOption("path", gettext("list of directory names used for file searching"))
260call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000261call <SID>OptionG("pa", &pa)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200262call <SID>AddOption("cdpath", gettext("list of directory names used for :cd"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263call <SID>OptionG("cd", &cd)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200264if exists("+autochdir")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200265 call <SID>AddOption("autochdir", gettext("change to directory of file in buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266 call <SID>BinOptionG("acd", &acd)
267endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200268call <SID>AddOption("wrapscan", gettext("search commands wrap around the end of the buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269call <SID>BinOptionG("ws", &ws)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200270call <SID>AddOption("incsearch", gettext("show match for partly typed search command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000271call <SID>BinOptionG("is", &is)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200272call <SID>AddOption("magic", gettext("change the way backslashes are used in search patterns"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273call <SID>BinOptionG("magic", &magic)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200274call <SID>AddOption("regexpengine", gettext("select the default regexp engine used"))
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200275call <SID>OptionG("re", &re)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200276call <SID>AddOption("ignorecase", gettext("ignore case when using a search pattern"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277call <SID>BinOptionG("ic", &ic)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200278call <SID>AddOption("smartcase", gettext("override 'ignorecase' when pattern has upper case characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279call <SID>BinOptionG("scs", &scs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200280call <SID>AddOption("casemap", gettext("what method to use for changing case of letters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281call <SID>OptionG("cmp", &cmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200282call <SID>AddOption("maxmempattern", gettext("maximum amount of memory in Kbyte used for pattern matching"))
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000283call append("$", " \tset mmp=" . &mmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200284call <SID>AddOption("define", gettext("pattern for a macro definition line"))
285call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000286call <SID>OptionG("def", &def)
287if has("find_in_path")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200288 call <SID>AddOption("include", gettext("pattern 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")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200291 call <SID>AddOption("includeexpr", gettext("expression 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
Bram Moolenaar14944c02020-09-11 20:51:26 +0200297call <SID>Header(gettext("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)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200300call <SID>AddOption("taglength", gettext("number of significant characters in a tag name or zero"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000301call append("$", " \tset tl=" . &tl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200302call <SID>AddOption("tags", gettext("list of file names to search for tags"))
303call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304call <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 Moolenaar14944c02020-09-11 20:51:26 +0200308call <SID>AddOption("tagrelative", gettext("file names in a tags file are relative to the tags file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309call <SID>BinOptionG("tr", &tr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200310call <SID>AddOption("tagstack", gettext("a :tag command will use the tagstack"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000311call <SID>BinOptionG("tgst", &tgst)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200312call <SID>AddOption("showfulltag", gettext("when completing tags in Insert mode show more info"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000313call <SID>BinOptionG("sft", &sft)
Bram Moolenaar45e18cb2019-04-28 18:05:35 +0200314if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200315 call <SID>AddOption("tagfunc", gettext("a 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")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200320 call <SID>AddOption("cscopeprg", gettext("command for executing cscope"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000321 call <SID>OptionG("csprg", &csprg)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200322 call <SID>AddOption("cscopetag", gettext("use cscope for tag commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323 call <SID>BinOptionG("cst", &cst)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200324 call <SID>AddOption("cscopetagorder", gettext("0 or 1; the order in which \":cstag\" performs a search"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325 call append("$", " \tset csto=" . &csto)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200326 call <SID>AddOption("cscopeverbose", gettext("give messages when adding a cscope database"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000327 call <SID>BinOptionG("csverb", &csverb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200328 call <SID>AddOption("cscopepathcomp", gettext("how many components of the path to show"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329 call append("$", " \tset cspc=" . &cspc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200330 call <SID>AddOption("cscopequickfix", gettext("when to open a quickfix window for cscope"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331 call <SID>OptionG("csqf", &csqf)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200332 call <SID>AddOption("cscoperelative", gettext("file names in a cscope file are relative to that file"))
Bram Moolenaar251e1912011-06-19 05:09:16 +0200333 call <SID>BinOptionG("csre", &csre)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000334endif
335
336
Bram Moolenaar14944c02020-09-11 20:51:26 +0200337call <SID>Header(gettext("displaying text"))
338call <SID>AddOption("scroll", gettext("number 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")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200341call <SID>AddOption("scrolloff", gettext("number of screen lines to show around the cursor"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000342call append("$", " \tset so=" . &so)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200343call <SID>AddOption("wrap", gettext("long 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 Moolenaar14944c02020-09-11 20:51:26 +0200346call <SID>AddOption("linebreak", gettext("wrap 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 Moolenaar14944c02020-09-11 20:51:26 +0200349call <SID>AddOption("breakindent", gettext("preserve 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")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200352call <SID>AddOption("breakindentopt", gettext("adjust 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 Moolenaar14944c02020-09-11 20:51:26 +0200355call <SID>AddOption("breakat", gettext("which characters might cause a line break"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356call <SID>OptionG("brk", &brk)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200357call <SID>AddOption("showbreak", gettext("string to put before wrapped screen lines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358call <SID>OptionG("sbr", &sbr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200359call <SID>AddOption("sidescroll", gettext("minimal number of columns to scroll horizontally"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360call append("$", " \tset ss=" . &ss)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200361call <SID>AddOption("sidescrolloff", gettext("minimal number of columns to keep left and right of the cursor"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362call append("$", " \tset siso=" . &siso)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200363call <SID>AddOption("display", gettext("include \"lastline\" to show the last line even if it doesn't fit\ninclude \"uhex\" to show unprintable characters as a hex number"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364call <SID>OptionG("dy", &dy)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200365call <SID>AddOption("fillchars", gettext("characters to use for the status line, folds and filler lines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366call <SID>OptionG("fcs", &fcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200367call <SID>AddOption("cmdheight", gettext("number of lines used for the command-line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000368call append("$", " \tset ch=" . &ch)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200369call <SID>AddOption("columns", gettext("width of the display"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000370call append("$", " \tset co=" . &co)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200371call <SID>AddOption("lines", gettext("number of lines in the display"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000372call append("$", " \tset lines=" . &lines)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200373call <SID>AddOption("window", gettext("number of lines to scroll for CTRL-F and CTRL-B"))
Bram Moolenaar1b20d3d2010-07-24 20:44:02 +0200374call append("$", " \tset window=" . &window)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200375call <SID>AddOption("lazyredraw", gettext("don't redraw while executing macros"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000376call <SID>BinOptionG("lz", &lz)
Bram Moolenaar63ce8c02008-06-04 12:29:14 +0000377if has("reltime")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200378 call <SID>AddOption("redrawtime", gettext("timeout for 'hlsearch' and :match highlighting in msec"))
Bram Moolenaar63ce8c02008-06-04 12:29:14 +0000379 call append("$", " \tset rdt=" . &rdt)
380endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200381call <SID>AddOption("writedelay", gettext("delay in msec for each char written to the display\n(for debugging)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382call append("$", " \tset wd=" . &wd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200383call <SID>AddOption("list", gettext("show <Tab> as ^I and end-of-line as $"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200384call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385call <SID>BinOptionL("list")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200386call <SID>AddOption("listchars", gettext("list of strings used for list mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000387call <SID>OptionG("lcs", &lcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200388call <SID>AddOption("number", gettext("show the line number for each line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200389call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000390call <SID>BinOptionL("nu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200391call <SID>AddOption("relativenumber", gettext("show the relative line number for each line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200392call append("$", "\t" .. s:local_to_window)
Bram Moolenaar64486672010-05-16 15:46:46 +0200393call <SID>BinOptionL("rnu")
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000394if has("linebreak")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200395 call <SID>AddOption("numberwidth", gettext("number of columns to use for the line number"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200396 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000397 call <SID>OptionL("nuw")
398endif
Bram Moolenaar860cae12010-06-05 23:22:07 +0200399if has("conceal")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200400 call <SID>AddOption("conceallevel", gettext("controls whether concealable text is hidden"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200401 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200402 call <SID>OptionL("cole")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200403 call <SID>AddOption("concealcursor", gettext("modes in which text in the cursor line can be concealed"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200404 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200405 call <SID>OptionL("cocu")
Bram Moolenaar860cae12010-06-05 23:22:07 +0200406endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000407
408
Bram Moolenaar14944c02020-09-11 20:51:26 +0200409call <SID>Header(gettext("syntax, highlighting and spelling"))
410call <SID>AddOption("background", gettext("\"dark\" or \"light\"; the background color brightness"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000411call <SID>OptionG("bg", &bg)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200412call <SID>AddOption("filetype", gettext("type of file; triggers the FileType event when set"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200413call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100414call <SID>OptionL("ft")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415if has("syntax")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200416 call <SID>AddOption("syntax", gettext("name of syntax highlighting used"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200417 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418 call <SID>OptionL("syn")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200419 call <SID>AddOption("synmaxcol", gettext("maximum column to look for syntax items"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200420 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar9ff70112005-07-11 22:29:03 +0000421 call <SID>OptionL("smc")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200423call <SID>AddOption("highlight", gettext("which highlighting to use for various occasions"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424call <SID>OptionG("hl", &hl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200425call <SID>AddOption("hlsearch", gettext("highlight all matches for the last used search pattern"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000426call <SID>BinOptionG("hls", &hls)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200427call <SID>AddOption("wincolor", gettext("highlight group to use for the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200428call append("$", "\t" .. s:local_to_window)
Bram Moolenaar68e65602019-05-26 21:33:31 +0200429call <SID>OptionL("wcr")
Bram Moolenaar8a24b792016-04-30 16:13:10 +0200430if has("termguicolors")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200431 call <SID>AddOption("termguicolors", gettext("use GUI colors for the terminal"))
Bram Moolenaar868cfc12016-04-30 16:49:58 +0200432 call <SID>BinOptionG("tgc", &tgc)
Bram Moolenaar8e3d1b62016-04-30 15:17:19 +0200433endif
Bram Moolenaar7887d882005-07-01 22:33:52 +0000434if has("syntax")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200435 call <SID>AddOption("cursorcolumn", gettext("highlight the screen column of the cursor"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200436 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000437 call <SID>BinOptionL("cuc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200438 call <SID>AddOption("cursorline", gettext("highlight the screen line of the cursor"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200439 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000440 call <SID>BinOptionL("cul")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200441 call <SID>AddOption("cursorlineopt", gettext("specifies which area 'cursorline' highlights"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200442 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar410e98a2019-09-09 22:05:49 +0200443 call <SID>OptionL("culopt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200444 call <SID>AddOption("colorcolumn", gettext("columns to highlight"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200445 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar607cc1e2010-07-18 18:47:44 +0200446 call <SID>OptionL("cc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200447 call <SID>AddOption("spell", gettext("highlight spelling mistakes"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200448 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000449 call <SID>BinOptionL("spell")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200450 call <SID>AddOption("spelllang", gettext("list of accepted languages"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200451 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000452 call <SID>OptionL("spl")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200453 call <SID>AddOption("spellfile", gettext("file that \"zg\" adds good words to"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200454 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000455 call <SID>OptionL("spf")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200456 call <SID>AddOption("spellcapcheck", gettext("pattern to locate the end of a sentence"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200457 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar551f84f2005-07-06 22:29:20 +0000458 call <SID>OptionL("spc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200459 call <SID>AddOption("spelloptions", gettext("flags to change how spell checking works"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200460 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar65e0d772020-06-14 17:29:55 +0200461 call <SID>OptionL("spo")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200462 call <SID>AddOption("spellsuggest", gettext("methods used to suggest corrections"))
Bram Moolenaar7887d882005-07-01 22:33:52 +0000463 call <SID>OptionG("sps", &sps)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200464 call <SID>AddOption("mkspellmem", gettext("amount of memory used by :mkspell before compressing"))
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000465 call <SID>OptionG("msm", &msm)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000466endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467
468
Bram Moolenaar14944c02020-09-11 20:51:26 +0200469call <SID>Header(gettext("multiple windows"))
470call <SID>AddOption("laststatus", gettext("0, 1 or 2; when to use a status line for the last window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471call append("$", " \tset ls=" . &ls)
472if has("statusline")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200473 call <SID>AddOption("statusline", gettext("alternate format to be used for a status line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474 call <SID>OptionG("stl", &stl)
475endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200476call <SID>AddOption("equalalways", gettext("make all windows the same size when adding/removing windows"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000477call <SID>BinOptionG("ea", &ea)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200478call <SID>AddOption("eadirection", gettext("in which direction 'equalalways' works: \"ver\", \"hor\" or \"both\""))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100479call <SID>OptionG("ead", &ead)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200480call <SID>AddOption("winheight", gettext("minimal number of lines used for the current window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481call append("$", " \tset wh=" . &wh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200482call <SID>AddOption("winminheight", gettext("minimal number of lines used for any window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483call append("$", " \tset wmh=" . &wmh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200484call <SID>AddOption("winfixheight", gettext("keep the height of the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200485call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000486call <SID>BinOptionL("wfh")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200487call <SID>AddOption("winfixwidth", gettext("keep the width of the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200488call append("$", "\t" .. s:local_to_window)
Bram Moolenaarbe4d5062006-03-18 21:30:13 +0000489call <SID>BinOptionL("wfw")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200490call <SID>AddOption("winwidth", gettext("minimal number of columns used for the current window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100491call append("$", " \tset wiw=" . &wiw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200492call <SID>AddOption("winminwidth", gettext("minimal number of columns used for any window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100493call append("$", " \tset wmw=" . &wmw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200494call <SID>AddOption("helpheight", gettext("initial height of the help window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000495call append("$", " \tset hh=" . &hh)
496if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200497 call <SID>AddOption("previewpopup", gettext("use a popup window for preview"))
Bram Moolenaar85850f32019-07-19 22:05:51 +0200498 call append("$", " \tset pvp=" . &pvp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200499 call <SID>AddOption("previewheight", gettext("default height for the preview window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000500 call append("$", " \tset pvh=" . &pvh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200501 call <SID>AddOption("previewwindow", gettext("identifies the preview window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200502 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000503 call <SID>BinOptionL("pvw")
504endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200505call <SID>AddOption("hidden", gettext("don't unload a buffer when no longer shown in a window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000506call <SID>BinOptionG("hid", &hid)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200507call <SID>AddOption("switchbuf", gettext("\"useopen\" and/or \"split\"; which window to use when jumping\nto a buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000508call <SID>OptionG("swb", &swb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200509call <SID>AddOption("splitbelow", gettext("a new window is put below the current one"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000510call <SID>BinOptionG("sb", &sb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200511call <SID>AddOption("splitright", gettext("a new window is put right of the current one"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100512call <SID>BinOptionG("spr", &spr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200513call <SID>AddOption("scrollbind", gettext("this window scrolls together with other bound windows"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200514call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100515call <SID>BinOptionL("scb")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200516call <SID>AddOption("scrollopt", gettext("\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100517call <SID>OptionG("sbo", &sbo)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200518call <SID>AddOption("cursorbind", gettext("this window's cursor moves together with other bound windows"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200519call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100520call <SID>BinOptionL("crb")
Bram Moolenaar74675a62017-07-15 13:53:23 +0200521if has("terminal")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200522 call <SID>AddOption("termwinsize", gettext("size of a terminal window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200523 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200524 call <SID>OptionL("tws")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200525 call <SID>AddOption("termwinkey", gettext("key that precedes Vim commands in 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("twk")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200528 call <SID>AddOption("termwinscroll", gettext("max number of lines to keep for scrollback in a terminal window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200529 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200530 call <SID>OptionL("twsl")
Bram Moolenaarc6ddce32019-02-08 12:47:03 +0100531 if has('win32')
Bram Moolenaar14944c02020-09-11 20:51:26 +0200532 call <SID>AddOption("termwintype", gettext("type of pty to use for a terminal window"))
Bram Moolenaarc6ddce32019-02-08 12:47:03 +0100533 call <SID>OptionG("twt", &twt)
534 endif
Bram Moolenaar0aed9a22017-08-19 23:18:02 +0200535 if exists("&winptydll")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200536 call <SID>AddOption("winptydll", gettext("name of the winpty dynamic library"))
Bram Moolenaar0aed9a22017-08-19 23:18:02 +0200537 call <SID>OptionG("winptydll", &winptydll)
538 endif
Bram Moolenaar74675a62017-07-15 13:53:23 +0200539endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540
541
Bram Moolenaar14944c02020-09-11 20:51:26 +0200542call <SID>Header(gettext("multiple tab pages"))
543call <SID>AddOption("showtabline", gettext("0, 1 or 2; when to use a tab pages line"))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000544call append("$", " \tset stal=" . &stal)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200545call <SID>AddOption("tabpagemax", gettext("maximum number of tab pages to open for -p and \"tab all\""))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000546call append("$", " \tset tpm=" . &tpm)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200547call <SID>AddOption("tabline", gettext("custom tab pages line"))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000548call <SID>OptionG("tal", &tal)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000549if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200550 call <SID>AddOption("guitablabel", gettext("custom tab page label for the GUI"))
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000551 call <SID>OptionG("gtl", &gtl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200552 call <SID>AddOption("guitabtooltip", gettext("custom tab page tooltip for the GUI"))
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000553 call <SID>OptionG("gtt", &gtt)
554endif
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000555
556
Bram Moolenaar14944c02020-09-11 20:51:26 +0200557call <SID>Header(gettext("terminal"))
558call <SID>AddOption("term", gettext("name of the used terminal"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000559call <SID>OptionG("term", &term)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200560call <SID>AddOption("ttytype", gettext("alias for 'term'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561call <SID>OptionG("tty", &tty)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200562call <SID>AddOption("ttybuiltin", gettext("check built-in termcaps first"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000563call <SID>BinOptionG("tbi", &tbi)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200564call <SID>AddOption("ttyfast", gettext("terminal connection is fast"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000565call <SID>BinOptionG("tf", &tf)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200566call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000567call <SID>BinOptionG("wiv", &wiv)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200568call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000569call <SID>BinOptionG("ek", &ek)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200570call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000571call append("$", " \tset sj=" . &sj)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200572call <SID>AddOption("ttyscroll", gettext("maximum number of lines to use scrolling instead of redrawing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573call append("$", " \tset tsl=" . &tsl)
Bram Moolenaara06ecab2016-07-16 14:47:36 +0200574if has("gui") || has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200575 call <SID>AddOption("guicursor", gettext("specifies what the cursor looks like in different modes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576 call <SID>OptionG("gcr", &gcr)
577endif
578if has("title")
579 let &title = s:old_title
Bram Moolenaar14944c02020-09-11 20:51:26 +0200580 call <SID>AddOption("title", gettext("show info in the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000581 call <SID>BinOptionG("title", &title)
582 set notitle
Bram Moolenaar14944c02020-09-11 20:51:26 +0200583 call <SID>AddOption("titlelen", gettext("percentage of 'columns' used for the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000584 call append("$", " \tset titlelen=" . &titlelen)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200585 call <SID>AddOption("titlestring", gettext("when not empty, string to be used for the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586 call <SID>OptionG("titlestring", &titlestring)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200587 call <SID>AddOption("titleold", gettext("string to restore the title to when exiting Vim"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000588 call <SID>OptionG("titleold", &titleold)
589 let &icon = s:old_icon
Bram Moolenaar14944c02020-09-11 20:51:26 +0200590 call <SID>AddOption("icon", gettext("set the text of the icon for this window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000591 call <SID>BinOptionG("icon", &icon)
592 set noicon
Bram Moolenaar14944c02020-09-11 20:51:26 +0200593 call <SID>AddOption("iconstring", gettext("when not empty, text for the icon of this window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000594 call <SID>OptionG("iconstring", &iconstring)
595endif
596if has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200597 call <SID>AddOption("restorescreen", gettext("restore the screen contents when exiting Vim"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000598 call <SID>BinOptionG("rs", &rs)
599endif
600
601
Bram Moolenaar14944c02020-09-11 20:51:26 +0200602call <SID>Header(gettext("using the mouse"))
603call <SID>AddOption("mouse", gettext("list of flags for using the mouse"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000604call <SID>OptionG("mouse", &mouse)
605if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200606 call <SID>AddOption("mousefocus", gettext("the window with the mouse pointer becomes the current one"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000607 call <SID>BinOptionG("mousef", &mousef)
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100608endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200609call <SID>AddOption("scrollfocus", gettext("the window with the mouse pointer scrolls with the mouse wheel"))
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100610call <SID>BinOptionG("scf", &scf)
611if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200612 call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000613 call <SID>BinOptionG("mh", &mh)
614endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200615call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000616call <SID>OptionG("mousem", &mousem)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200617call <SID>AddOption("mousetime", gettext("maximum time in msec to recognize a double-click"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000618call append("$", " \tset mouset=" . &mouset)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200619call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000620call <SID>OptionG("ttym", &ttym)
621if has("mouseshape")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200622 call <SID>AddOption("mouseshape", gettext("what the mouse pointer looks like in different modes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623 call <SID>OptionG("mouses", &mouses)
624endif
625
626
627if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200628 call <SID>Header(gettext("GUI"))
629 call <SID>AddOption("guifont", gettext("list of font names to be used in the GUI"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000630 call <SID>OptionG("gfn", &gfn)
631 if has("xfontset")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200632 call <SID>AddOption("guifontset", gettext("pair of fonts to be used, for multibyte editing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000633 call <SID>OptionG("gfs", &gfs)
634 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200635 call <SID>AddOption("guifontwide", gettext("list of font names to be used for double-wide characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000636 call <SID>OptionG("gfw", &gfw)
637 if has("mac")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200638 call <SID>AddOption("antialias", gettext("use smooth, antialiased fonts"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000639 call <SID>BinOptionG("anti", &anti)
640 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200641 call <SID>AddOption("guioptions", gettext("list of flags that specify how the GUI works"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000642 call <SID>OptionG("go", &go)
643 if has("gui_gtk")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200644 call <SID>AddOption("toolbar", gettext("\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000645 call <SID>OptionG("tb", &tb)
646 if has("gui_gtk2")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200647 call <SID>AddOption("toolbariconsize", gettext("size of toolbar icons"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000648 call <SID>OptionG("tbis", &tbis)
649 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200650 call <SID>AddOption("guiheadroom", gettext("room (in pixels) left above/below the window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000651 call append("$", " \tset ghr=" . &ghr)
652 endif
Bram Moolenaarfb539272014-08-22 19:21:47 +0200653 if has("directx")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200654 call <SID>AddOption("renderoptions", gettext("options for text rendering"))
Bram Moolenaarfb539272014-08-22 19:21:47 +0200655 call <SID>OptionG("rop", &rop)
656 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200657 call <SID>AddOption("guipty", gettext("use a pseudo-tty for I/O to external commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658 call <SID>BinOptionG("guipty", &guipty)
659 if has("browse")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200660 call <SID>AddOption("browsedir", gettext("\"last\", \"buffer\" or \"current\": which directory used for the file browser"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000661 call <SID>OptionG("bsdir", &bsdir)
662 endif
663 if has("multi_lang")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200664 call <SID>AddOption("langmenu", gettext("language to be used for the menus"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000665 call <SID>OptionG("langmenu", &lm)
666 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200667 call <SID>AddOption("menuitems", gettext("maximum number of items in one menu"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668 call append("$", " \tset mis=" . &mis)
669 if has("winaltkeys")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200670 call <SID>AddOption("winaltkeys", gettext("\"no\", \"yes\" or \"menu\"; how to use the ALT key"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671 call <SID>OptionG("wak", &wak)
672 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200673 call <SID>AddOption("linespace", gettext("number of pixel lines to use between characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674 call append("$", " \tset lsp=" . &lsp)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100675 if has("balloon_eval") || has("balloon_eval_term")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200676 call <SID>AddOption("balloondelay", gettext("delay in milliseconds before a balloon may pop up"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000677 call append("$", " \tset bdlay=" . &bdlay)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100678 if has("balloon_eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200679 call <SID>AddOption("ballooneval", gettext("use balloon evaluation in the GUI"))
Bram Moolenaara2a80162017-11-21 23:09:50 +0100680 call <SID>BinOptionG("beval", &beval)
681 endif
682 if has("balloon_eval_term")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200683 call <SID>AddOption("balloonevalterm", gettext("use balloon evaluation in the terminal"))
Bram Moolenaara2a80162017-11-21 23:09:50 +0100684 call <SID>BinOptionG("bevalterm", &beval)
685 endif
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000686 if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200687 call <SID>AddOption("balloonexpr", gettext("expression to show in balloon eval"))
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000688 call append("$", " \tset bexpr=" . &bexpr)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689 endif
690 endif
Bram Moolenaard5ab34b2007-05-05 17:15:44 +0000691 if exists("+macatsui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200692 call <SID>AddOption("macatsui", gettext("use ATSUI text drawing; disable to avoid display problems"))
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000693 call <SID>OptionG("macatsui", &macatsui)
694 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000695endif
696
697if has("printer")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200698 call <SID>Header(gettext("printing"))
699 call <SID>AddOption("printoptions", gettext("list of items that control the format of :hardcopy output"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000700 call <SID>OptionG("popt", &popt)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200701 call <SID>AddOption("printdevice", gettext("name of the printer to be used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000702 call <SID>OptionG("pdev", &pdev)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000703 if has("postscript")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200704 call <SID>AddOption("printexpr", gettext("expression used to print the PostScript file for :hardcopy"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000705 call <SID>OptionG("pexpr", &pexpr)
706 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200707 call <SID>AddOption("printfont", gettext("name of the font to be used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708 call <SID>OptionG("pfn", &pfn)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200709 call <SID>AddOption("printheader", gettext("format of the header used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710 call <SID>OptionG("pheader", &pheader)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000711 if has("postscript")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200712 call <SID>AddOption("printencoding", gettext("encoding used to print the PostScript file for :hardcopy"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000713 call <SID>OptionG("penc", &penc)
714 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200715 call <SID>AddOption("printmbcharset", gettext("the CJK character set to be used for CJK output from :hardcopy"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +0100716 call <SID>OptionG("pmbcs", &pmbcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200717 call <SID>AddOption("printmbfont", gettext("list of font names to be used for CJK output from :hardcopy"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +0100718 call <SID>OptionG("pmbfn", &pmbfn)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000719endif
720
Bram Moolenaar14944c02020-09-11 20:51:26 +0200721call <SID>Header(gettext("messages and info"))
722call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show search message)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000723call <SID>BinOptionG("terse", &terse)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200724call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000725call <SID>OptionG("shm", &shm)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200726call <SID>AddOption("showcmd", gettext("show (partial) command keys in the status line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000727let &sc = s:old_sc
728call <SID>BinOptionG("sc", &sc)
729set nosc
Bram Moolenaar14944c02020-09-11 20:51:26 +0200730call <SID>AddOption("showmode", gettext("display the current mode in the status line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000731call <SID>BinOptionG("smd", &smd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200732call <SID>AddOption("ruler", gettext("show cursor position below each window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000733let &ru = s:old_ru
734call <SID>BinOptionG("ru", &ru)
735set noru
736if has("statusline")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200737 call <SID>AddOption("rulerformat", gettext("alternate format to be used for the ruler"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000738 call <SID>OptionG("ruf", &ruf)
739endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200740call <SID>AddOption("report", gettext("threshold for reporting number of changed lines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000741call append("$", " \tset report=" . &report)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200742call <SID>AddOption("verbose", gettext("the higher the more messages are given"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000743call append("$", " \tset vbs=" . &vbs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200744call <SID>AddOption("verbosefile", gettext("file to write messages in"))
Bram Moolenaar7887d882005-07-01 22:33:52 +0000745call <SID>OptionG("vfile", &vfile)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200746call <SID>AddOption("more", gettext("pause listings when the screen is full"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000747call <SID>BinOptionG("more", &more)
748if has("dialog_con") || has("dialog_gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200749 call <SID>AddOption("confirm", gettext("start a dialog when a command fails"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000750 call <SID>BinOptionG("cf", &cf)
751endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200752call <SID>AddOption("errorbells", gettext("ring the bell for error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000753call <SID>BinOptionG("eb", &eb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200754call <SID>AddOption("visualbell", gettext("use a visual bell instead of beeping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000755call <SID>BinOptionG("vb", &vb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200756call <SID>AddOption("belloff", gettext("do not ring the bell for these reasons"))
Bram Moolenaardd1616e2015-07-22 22:22:59 +0200757call <SID>OptionG("belloff", &belloff)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000758if has("multi_lang")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200759 call <SID>AddOption("helplang", gettext("list of preferred languages for finding help"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000760 call <SID>OptionG("hlg", &hlg)
761endif
762
763
Bram Moolenaar14944c02020-09-11 20:51:26 +0200764call <SID>Header(gettext("selecting text"))
765call <SID>AddOption("selection", gettext("\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000766call <SID>OptionG("sel", &sel)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200767call <SID>AddOption("selectmode", gettext("\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode\ninstead of Visual mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768call <SID>OptionG("slm", &slm)
769if has("clipboard")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200770 call <SID>AddOption("clipboard", gettext("\"unnamed\" to use the * register like unnamed register\n\"autoselect\" to always put selected text on the clipboard"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000771 call <SID>OptionG("cb", &cb)
772endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200773call <SID>AddOption("keymodel", gettext("\"startsel\" and/or \"stopsel\"; what special keys can do"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000774call <SID>OptionG("km", &km)
775
776
Bram Moolenaar14944c02020-09-11 20:51:26 +0200777call <SID>Header(gettext("editing text"))
778call <SID>AddOption("undolevels", gettext("maximum number of changes that can be undone"))
779call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100780call append("$", " \tset ul=" . s:old_ul)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200781call <SID>AddOption("undofile", gettext("automatically save and restore undo history"))
Bram Moolenaar4694a172016-04-21 14:05:23 +0200782call <SID>BinOptionG("udf", &udf)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200783call <SID>AddOption("undodir", gettext("list of directories for undo files"))
Bram Moolenaar4694a172016-04-21 14:05:23 +0200784call <SID>OptionG("udir", &udir)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200785call <SID>AddOption("undoreload", gettext("maximum number lines to save for undo on a buffer reload"))
Bram Moolenaar59f931e2010-07-24 20:27:03 +0200786call append("$", " \tset ur=" . &ur)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200787call <SID>AddOption("modified", gettext("changes have been made and not written to a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200788call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000789call <SID>BinOptionL("mod")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200790call <SID>AddOption("readonly", gettext("buffer is not to be written"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200791call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000792call <SID>BinOptionL("ro")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200793call <SID>AddOption("modifiable", gettext("changes to the text are not possible"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200794call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000795call <SID>BinOptionL("ma")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200796call <SID>AddOption("textwidth", gettext("line length above which to break a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200797call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798call <SID>OptionL("tw")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200799call <SID>AddOption("wrapmargin", gettext("margin from the right in which to break a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200800call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000801call <SID>OptionL("wm")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200802call <SID>AddOption("backspace", gettext("specifies what <BS>, CTRL-W, etc. can do in Insert mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803call append("$", " \tset bs=" . &bs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200804call <SID>AddOption("comments", gettext("definition of what comment lines look like"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200805call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000806call <SID>OptionL("com")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200807call <SID>AddOption("formatoptions", gettext("list of flags that tell how automatic formatting works"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200808call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000809call <SID>OptionL("fo")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200810call <SID>AddOption("formatlistpat", gettext("pattern to recognize a numbered list"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200811call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar86b68352004-12-27 21:59:20 +0000812call <SID>OptionL("flp")
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000813if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200814 call <SID>AddOption("formatexpr", gettext("expression used for \"gq\" to format lines"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200815 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000816 call <SID>OptionL("fex")
817endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000818if has("insert_expand")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200819 call <SID>AddOption("complete", gettext("specifies how Insert mode completion works for CTRL-N and CTRL-P"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200820 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000821 call <SID>OptionL("cpt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200822 call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion"))
Bram Moolenaarbb15b652005-10-03 21:52:09 +0000823 call <SID>OptionG("cot", &cot)
Bram Moolenaar36e4d982019-08-20 21:12:16 +0200824 if exists("+completepopup")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200825 call <SID>AddOption("completepopup", gettext("options for the Insert mode completion info popup"))
Bram Moolenaar36e4d982019-08-20 21:12:16 +0200826 call <SID>OptionG("cpp", &cpp)
827 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200828 call <SID>AddOption("pumheight", gettext("maximum height of the popup menu"))
Bram Moolenaard3667a22006-03-16 21:35:52 +0000829 call <SID>OptionG("ph", &ph)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200830 call <SID>AddOption("pumwidth", gettext("minimum width of the popup menu"))
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +0100831 call <SID>OptionG("pw", &pw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200832 call <SID>AddOption("completefunc", gettext("user defined function for Insert mode completion"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200833 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000834 call <SID>OptionL("cfu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200835 call <SID>AddOption("omnifunc", gettext("function for filetype-specific Insert mode completion"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200836 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaare344bea2005-09-01 20:46:49 +0000837 call <SID>OptionL("ofu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200838 call <SID>AddOption("dictionary", gettext("list of dictionary files for keyword completion"))
839 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000840 call <SID>OptionG("dict", &dict)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200841 call <SID>AddOption("thesaurus", gettext("list of thesaurus files for keyword completion"))
842 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000843 call <SID>OptionG("tsr", &tsr)
844endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200845call <SID>AddOption("infercase", gettext("adjust case of a keyword completion match"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200846call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000847call <SID>BinOptionL("inf")
848if has("digraphs")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200849 call <SID>AddOption("digraph", gettext("enable entering digraphs with c1 <BS> c2"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000850 call <SID>BinOptionG("dg", &dg)
851endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200852call <SID>AddOption("tildeop", gettext("the \"~\" command behaves like an operator"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853call <SID>BinOptionG("top", &top)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200854call <SID>AddOption("operatorfunc", gettext("function called for the\"g@\" operator"))
Bram Moolenaar4770d092006-01-12 23:22:24 +0000855call <SID>OptionG("opfunc", &opfunc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200856call <SID>AddOption("showmatch", gettext("when inserting a bracket, briefly jump to its match"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000857call <SID>BinOptionG("sm", &sm)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200858call <SID>AddOption("matchtime", gettext("tenth of a second to show a match for 'showmatch'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000859call append("$", " \tset mat=" . &mat)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200860call <SID>AddOption("matchpairs", gettext("list of pairs that match for the \"%\" command"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200861call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862call <SID>OptionL("mps")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200863call <SID>AddOption("joinspaces", gettext("use two spaces after '.' when joining a line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000864call <SID>BinOptionG("js", &js)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200865call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for\nCTRL-A and CTRL-X commands"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200866call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000867call <SID>OptionL("nf")
868
869
Bram Moolenaar14944c02020-09-11 20:51:26 +0200870call <SID>Header(gettext("tabs and indenting"))
871call <SID>AddOption("tabstop", gettext("number of spaces a <Tab> in the text stands for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200872call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000873call <SID>OptionL("ts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200874call <SID>AddOption("shiftwidth", gettext("number of spaces used for each step of (auto)indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200875call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000876call <SID>OptionL("sw")
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200877if has("vartabs")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200878 call <SID>AddOption("vartabstop", gettext("list of number of spaces a tab counts for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200879 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200880 call <SID>OptionL("vts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200881 call <SID>AddOption("varsofttabstop", gettext("list of number of spaces a soft tabsstop counts for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200882 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200883 call <SID>OptionL("vsts")
884endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200885call <SID>AddOption("smarttab", gettext("a <Tab> in an indent inserts 'shiftwidth' spaces"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000886call <SID>BinOptionG("sta", &sta)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200887call <SID>AddOption("softtabstop", gettext("if non-zero, number of spaces to insert for a <Tab>"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200888call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000889call <SID>OptionL("sts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200890call <SID>AddOption("shiftround", gettext("round to 'shiftwidth' for \"<<\" and \">>\""))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000891call <SID>BinOptionG("sr", &sr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200892call <SID>AddOption("expandtab", gettext("expand <Tab> to spaces in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200893call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000894call <SID>BinOptionL("et")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200895call <SID>AddOption("autoindent", gettext("automatically set the indent of a new line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200896call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000897call <SID>BinOptionL("ai")
898if has("smartindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200899 call <SID>AddOption("smartindent", gettext("do clever autoindenting"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200900 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901 call <SID>BinOptionL("si")
902endif
903if has("cindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200904 call <SID>AddOption("cindent", gettext("enable specific indenting for C code"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200905 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906 call <SID>BinOptionL("cin")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200907 call <SID>AddOption("cinoptions", gettext("options for C-indenting"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200908 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000909 call <SID>OptionL("cino")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200910 call <SID>AddOption("cinkeys", gettext("keys that trigger C-indenting in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200911 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000912 call <SID>OptionL("cink")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200913 call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200914 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000915 call <SID>OptionL("cinw")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200916 call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200917 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000918 call <SID>OptionL("inde")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200919 call <SID>AddOption("indentkeys", gettext("keys that trigger indenting with 'indentexpr' in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200920 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000921 call <SID>OptionL("indk")
922endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200923call <SID>AddOption("copyindent", gettext("copy whitespace for indenting from previous line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200924call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925call <SID>BinOptionL("ci")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200926call <SID>AddOption("preserveindent", gettext("preserve kind of whitespace when changing indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200927call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000928call <SID>BinOptionL("pi")
929if has("lispindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200930 call <SID>AddOption("lisp", gettext("enable lisp mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200931 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932 call <SID>BinOptionL("lisp")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200933 call <SID>AddOption("lispwords", gettext("words that change how lisp indenting works"))
Bram Moolenaare7a88a82014-04-01 12:26:46 +0200934 call <SID>OptionL("lw")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935endif
936
937
938if has("folding")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200939 call <SID>Header(gettext("folding"))
940 call <SID>AddOption("foldenable", gettext("set to display all folds open"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200941 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942 call <SID>BinOptionL("fen")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200943 call <SID>AddOption("foldlevel", gettext("folds with a level higher than this number will be closed"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200944 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945 call <SID>OptionL("fdl")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200946 call <SID>AddOption("foldlevelstart", gettext("value for 'foldlevel' when starting to edit a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000947 call append("$", " \tset fdls=" . &fdls)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200948 call <SID>AddOption("foldcolumn", gettext("width of the column used to indicate folds"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200949 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000950 call <SID>OptionL("fdc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200951 call <SID>AddOption("foldtext", gettext("expression used to display the text of a closed fold"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200952 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953 call <SID>OptionL("fdt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200954 call <SID>AddOption("foldclose", gettext("set to \"all\" to close a fold when the cursor leaves it"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000955 call <SID>OptionG("fcl", &fcl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200956 call <SID>AddOption("foldopen", gettext("specifies for which commands a fold will be opened"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000957 call <SID>OptionG("fdo", &fdo)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200958 call <SID>AddOption("foldminlines", gettext("minimum number of screen lines for a fold to be closed"))
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("fml")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200961 call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000962 call <SID>OptionL("cms")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200963 call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200964 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000965 call <SID>OptionL("fdm")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200966 call <SID>AddOption("foldexpr", gettext("expression used when 'foldmethod' is \"expr\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200967 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968 call <SID>OptionL("fde")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200969 call <SID>AddOption("foldignore", gettext("used to ignore lines when 'foldmethod' is \"indent\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200970 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971 call <SID>OptionL("fdi")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200972 call <SID>AddOption("foldmarker", gettext("markers used when 'foldmethod' is \"marker\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200973 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974 call <SID>OptionL("fmr")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200975 call <SID>AddOption("foldnestmax", gettext("maximum fold depth for when 'foldmethod' is \"indent\" or \"syntax\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200976 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000977 call <SID>OptionL("fdn")
978endif
979
980
981if has("diff")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200982 call <SID>Header(gettext("diff mode"))
983 call <SID>AddOption("diff", gettext("use diff mode for the current window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200984 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985 call <SID>BinOptionL("diff")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200986 call <SID>AddOption("diffopt", gettext("options for using diff mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000987 call <SID>OptionG("dip", &dip)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200988 call <SID>AddOption("diffexpr", gettext("expression used to obtain a diff file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000989 call <SID>OptionG("dex", &dex)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200990 call <SID>AddOption("patchexpr", gettext("expression used to patch a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000991 call <SID>OptionG("pex", &pex)
992endif
993
994
Bram Moolenaar14944c02020-09-11 20:51:26 +0200995call <SID>Header(gettext("mapping"))
996call <SID>AddOption("maxmapdepth", gettext("maximum depth of mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000997call append("$", " \tset mmd=" . &mmd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200998call <SID>AddOption("remap", gettext("recognize mappings in mapped keys"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999call <SID>BinOptionG("remap", &remap)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001000call <SID>AddOption("timeout", gettext("allow timing out halfway into a mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001001call <SID>BinOptionG("to", &to)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001002call <SID>AddOption("ttimeout", gettext("allow timing out halfway into a key code"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001003call <SID>BinOptionG("ttimeout", &ttimeout)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001004call <SID>AddOption("timeoutlen", gettext("time in msec for 'timeout'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001005call append("$", " \tset tm=" . &tm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001006call <SID>AddOption("ttimeoutlen", gettext("time in msec for 'ttimeout'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001007call append("$", " \tset ttm=" . &ttm)
1008
1009
Bram Moolenaar14944c02020-09-11 20:51:26 +02001010call <SID>Header(gettext("reading and writing files"))
1011call <SID>AddOption("modeline", gettext("enable using settings from modelines when reading a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001012call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001013call <SID>BinOptionL("ml")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001014call <SID>AddOption("modelineexpr", gettext("allow setting expression options from a modeline"))
Bram Moolenaar68e65602019-05-26 21:33:31 +02001015call <SID>BinOptionG("mle", &mle)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001016call <SID>AddOption("modelines", gettext("number of lines to check for modelines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001017call append("$", " \tset mls=" . &mls)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001018call <SID>AddOption("binary", gettext("binary file editing"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001019call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001020call <SID>BinOptionL("bin")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001021call <SID>AddOption("endofline", gettext("last line in the file has an end-of-line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001022call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001023call <SID>BinOptionL("eol")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001024call <SID>AddOption("fixendofline", gettext("fixes missing end-of-line at end of text file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001025call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar34d72d42015-07-17 14:18:08 +02001026call <SID>BinOptionL("fixeol")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001027call <SID>AddOption("bomb", gettext("prepend a Byte Order Mark to the file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001028call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001029call <SID>BinOptionL("bomb")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001030call <SID>AddOption("fileformat", gettext("end-of-line format: \"dos\", \"unix\" or \"mac\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001031call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032call <SID>OptionL("ff")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001033call <SID>AddOption("fileformats", gettext("list of file formats to look for when editing a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001034call <SID>OptionG("ffs", &ffs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001035call <SID>AddOption("textmode", gettext("obsolete, use 'fileformat'"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001036call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037call <SID>BinOptionL("tx")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001038call <SID>AddOption("textauto", gettext("obsolete, use 'fileformats'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001039call <SID>BinOptionG("ta", &ta)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001040call <SID>AddOption("write", gettext("writing files is allowed"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001041call <SID>BinOptionG("write", &write)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001042call <SID>AddOption("writebackup", gettext("write a backup file before overwriting a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001043call <SID>BinOptionG("wb", &wb)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001044call <SID>AddOption("backup", gettext("keep a backup after overwriting a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001045call <SID>BinOptionG("bk", &bk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001046call <SID>AddOption("backupskip", gettext("patterns that specify for which files a backup is not made"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001047call append("$", " \tset bsk=" . &bsk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001048call <SID>AddOption("backupcopy", gettext("whether to make the backup as a copy or rename the existing file"))
1049call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001050call append("$", " \tset bkc=" . &bkc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001051call <SID>AddOption("backupdir", gettext("list of directories to put backup files in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001052call <SID>OptionG("bdir", &bdir)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001053call <SID>AddOption("backupext", gettext("file name extension for the backup file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001054call <SID>OptionG("bex", &bex)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001055call <SID>AddOption("autowrite", gettext("automatically write a file when leaving a modified buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001056call <SID>BinOptionG("aw", &aw)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001057call <SID>AddOption("autowriteall", gettext("as 'autowrite', but works with more commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058call <SID>BinOptionG("awa", &awa)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001059call <SID>AddOption("writeany", gettext("always write without asking for confirmation"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060call <SID>BinOptionG("wa", &wa)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001061call <SID>AddOption("autoread", gettext("automatically read a file when it was modified outside of Vim"))
1062call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063call <SID>BinOptionG("ar", &ar)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001064call <SID>AddOption("patchmode", gettext("keep oldest version of a file; specifies file name extension"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001065call <SID>OptionG("pm", &pm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001066call <SID>AddOption("fsync", gettext("forcibly sync the file to disk after writing it"))
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001067call <SID>BinOptionG("fs", &fs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001068call <SID>AddOption("shortname", gettext("use 8.3 file names"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001069call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001070call <SID>BinOptionL("sn")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001071call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip or blowfish"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001072call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarb702c842010-05-18 22:28:22 +02001073call <SID>OptionL("cm")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074
1075
Bram Moolenaar14944c02020-09-11 20:51:26 +02001076call <SID>Header(gettext("the swap file"))
1077call <SID>AddOption("directory", gettext("list of directories for the swap file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001078call <SID>OptionG("dir", &dir)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001079call <SID>AddOption("swapfile", gettext("use a swap file for this buffer"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001080call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001081call <SID>BinOptionL("swf")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001082call <SID>AddOption("swapsync", gettext("\"sync\", \"fsync\" or empty; how to flush a swap file to disk"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083call <SID>OptionG("sws", &sws)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001084call <SID>AddOption("updatecount", gettext("number of characters typed to cause a swap file update"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001085call append("$", " \tset uc=" . &uc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001086call <SID>AddOption("updatetime", gettext("time in msec after which the swap file will be updated"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087call append("$", " \tset ut=" . &ut)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001088call <SID>AddOption("maxmem", gettext("maximum amount of memory in Kbyte used for one buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001089call append("$", " \tset mm=" . &mm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001090call <SID>AddOption("maxmemtot", gettext("maximum amount of memory in Kbyte used for all buffers"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001091call append("$", " \tset mmt=" . &mmt)
1092
1093
Bram Moolenaar14944c02020-09-11 20:51:26 +02001094call <SID>Header(gettext("command line editing"))
1095call <SID>AddOption("history", gettext("how many command lines are remembered "))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001096call append("$", " \tset hi=" . &hi)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001097call <SID>AddOption("wildchar", gettext("key that triggers command-line expansion"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001098call append("$", " \tset wc=" . &wc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001099call <SID>AddOption("wildcharm", gettext("like 'wildchar' but can also be used in a mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100call append("$", " \tset wcm=" . &wcm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001101call <SID>AddOption("wildmode", gettext("specifies how command line completion works"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102call <SID>OptionG("wim", &wim)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001103if has("wildoptions")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001104 call <SID>AddOption("wildoptions", gettext("empty or \"tagfile\" to list file name of matching tags"))
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001105 call <SID>OptionG("wop", &wop)
1106endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001107call <SID>AddOption("suffixes", gettext("list of file name extensions that have a lower priority"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001108call <SID>OptionG("su", &su)
1109if has("file_in_path")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001110 call <SID>AddOption("suffixesadd", gettext("list of file name extensions added when searching for a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001111 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112 call <SID>OptionL("sua")
1113endif
1114if has("wildignore")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001115 call <SID>AddOption("wildignore", gettext("list of patterns to ignore files for file name completion"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001116 call <SID>OptionG("wig", &wig)
1117endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001118call <SID>AddOption("fileignorecase", gettext("ignore case when using file names"))
Bram Moolenaar91fc43d2013-04-05 15:41:05 +02001119call <SID>BinOptionG("fic", &fic)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001120call <SID>AddOption("wildignorecase", gettext("ignore case when completing file names"))
Bram Moolenaar81af9252010-12-10 20:35:50 +01001121call <SID>BinOptionG("wic", &wic)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001122if has("wildmenu")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001123 call <SID>AddOption("wildmenu", gettext("command-line completion shows a list of matches"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001124 call <SID>BinOptionG("wmnu", &wmnu)
1125endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001126call <SID>AddOption("cedit", gettext("key used to open the command-line window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001127call <SID>OptionG("cedit", &cedit)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001128call <SID>AddOption("cmdwinheight", gettext("height of the command-line window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001129call <SID>OptionG("cwh", &cwh)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130
1131
Bram Moolenaar14944c02020-09-11 20:51:26 +02001132call <SID>Header(gettext("executing external commands"))
1133call <SID>AddOption("shell", gettext("name of the shell program used for external commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001134call <SID>OptionG("sh", &sh)
1135if has("amiga")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001136 call <SID>AddOption("shelltype", gettext("when to use the shell or directly execute a command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001137 call append("$", " \tset st=" . &st)
1138endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001139call <SID>AddOption("shellquote", gettext("character(s) to enclose a shell command in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001140call <SID>OptionG("shq", &shq)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001141call <SID>AddOption("shellxquote", gettext("like 'shellquote' but include the redirection"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001142call <SID>OptionG("sxq", &sxq)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001143call <SID>AddOption("shellxescape", gettext("characters to escape when 'shellxquote' is ("))
Bram Moolenaardb7207e2012-02-22 17:30:19 +01001144call <SID>OptionG("sxe", &sxe)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001145call <SID>AddOption("shellcmdflag", gettext("argument for 'shell' to execute a command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001146call <SID>OptionG("shcf", &shcf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001147call <SID>AddOption("shellredir", gettext("used to redirect command output to a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001148call <SID>OptionG("srr", &srr)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001149call <SID>AddOption("shelltemp", gettext("use a temp file for shell commands instead of using a pipe"))
Bram Moolenaar551f84f2005-07-06 22:29:20 +00001150call <SID>BinOptionG("stmp", &stmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001151call <SID>AddOption("equalprg", gettext("program used for \"=\" command"))
1152call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001153call <SID>OptionG("ep", &ep)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001154call <SID>AddOption("formatprg", gettext("program used to format lines with \"gq\" command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001155call <SID>OptionG("fp", &fp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001156call <SID>AddOption("keywordprg", gettext("program used for the \"K\" command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001157call <SID>OptionG("kp", &kp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001158call <SID>AddOption("warn", gettext("warn when using a shell command and a buffer has changes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001159call <SID>BinOptionG("warn", &warn)
1160
1161
1162if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001163 call <SID>Header(gettext("running make and jumping to errors (quickfix)"))
1164 call <SID>AddOption("errorfile", gettext("name of the file that contains error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001165 call <SID>OptionG("ef", &ef)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001166 call <SID>AddOption("errorformat", gettext("list of formats for error messages"))
1167 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168 call <SID>OptionG("efm", &efm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001169 call <SID>AddOption("makeprg", gettext("program used for the \":make\" command"))
1170 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001171 call <SID>OptionG("mp", &mp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001172 call <SID>AddOption("shellpipe", gettext("string used to put the output of \":make\" in the error file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001173 call <SID>OptionG("sp", &sp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001174 call <SID>AddOption("makeef", gettext("name of the errorfile for the 'makeprg' command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001175 call <SID>OptionG("mef", &mef)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001176 call <SID>AddOption("grepprg", gettext("program used for the \":grep\" command"))
1177 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001178 call <SID>OptionG("gp", &gp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001179 call <SID>AddOption("grepformat", gettext("list of formats for output of 'grepprg'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001180 call <SID>OptionG("gfm", &gfm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001181 call <SID>AddOption("makeencoding", gettext("encoding of the \":make\" and \":grep\" output"))
1182 call append("$", gettext("\t(global or local to buffer)"))
Bram Moolenaarad4187e2017-03-06 21:45:20 +01001183 call <SID>OptionG("menc", &menc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001184 call <SID>AddOption("quickfixtextfunc", gettext("function to display text in the quickfix window"))
Bram Moolenaaracc22402020-06-07 21:07:18 +02001185 call <SID>OptionG("qftf", &qftf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001186endif
1187
1188
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001189if has("win32") || has("osfiletype")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001190 call <SID>Header(gettext("system specific"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001191 if has("osfiletype")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001192 call <SID>AddOption("osfiletype", gettext("OS-specific information about the type of file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001193 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001194 call <SID>OptionL("oft")
1195 endif
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001196 if has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001197 call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198 call <SID>BinOptionG("ssl", &ssl)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001199 call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
Bram Moolenaar088e8e32019-08-08 22:15:18 +02001200 call <SID>OptionG("csl", &csl)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001201 endif
1202endif
1203
1204
Bram Moolenaar14944c02020-09-11 20:51:26 +02001205call <SID>Header(gettext("language specific"))
1206call <SID>AddOption("isfname", gettext("specifies the characters in a file name"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001207call <SID>OptionG("isf", &isf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001208call <SID>AddOption("isident", gettext("specifies the characters in an identifier"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209call <SID>OptionG("isi", &isi)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001210call <SID>AddOption("iskeyword", gettext("specifies the characters in a keyword"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001211call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001212call <SID>OptionL("isk")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001213call <SID>AddOption("isprint", gettext("specifies printable characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001214call <SID>OptionG("isp", &isp)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001215if has("textobjects")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001216 call <SID>AddOption("quoteescape", gettext("specifies escape characters in a string"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001217 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001218 call <SID>OptionL("qe")
1219endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001220if has("rightleft")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001221 call <SID>AddOption("rightleft", gettext("display the buffer right-to-left"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001222 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001223 call <SID>BinOptionL("rl")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001224 call <SID>AddOption("rightleftcmd", gettext("when to edit the command-line right-to-left"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001225 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226 call <SID>OptionL("rlc")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001227 call <SID>AddOption("revins", gettext("insert characters backwards"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001228 call <SID>BinOptionG("ri", &ri)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001229 call <SID>AddOption("allowrevins", gettext("allow CTRL-_ in Insert and Command-line mode to toggle 'revins'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230 call <SID>BinOptionG("ari", &ari)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001231 call <SID>AddOption("aleph", gettext("the ASCII code for the first letter of the Hebrew alphabet"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001232 call append("$", " \tset al=" . &al)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001233 call <SID>AddOption("hkmap", gettext("use Hebrew keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001234 call <SID>BinOptionG("hk", &hk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001235 call <SID>AddOption("hkmapp", gettext("use phonetic Hebrew keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001236 call <SID>BinOptionG("hkp", &hkp)
1237endif
1238if has("farsi")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001239 call <SID>AddOption("altkeymap", gettext("use Farsi as the second language when 'revins' is set"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001240 call <SID>BinOptionG("akm", &akm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001241 call <SID>AddOption("fkmap", gettext("use Farsi keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001242 call <SID>BinOptionG("fk", &fk)
1243endif
1244if has("arabic")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001245 call <SID>AddOption("arabic", gettext("prepare for editing Arabic text"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001246 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001247 call <SID>BinOptionL("arab")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001248 call <SID>AddOption("arabicshape", gettext("perform shaping of Arabic characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249 call <SID>BinOptionG("arshape", &arshape)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001250 call <SID>AddOption("termbidi", gettext("terminal will perform bidi handling"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251 call <SID>BinOptionG("tbidi", &tbidi)
1252endif
1253if has("keymap")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001254 call <SID>AddOption("keymap", gettext("name of a keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001255 call <SID>OptionL("kmp")
1256endif
1257if has("langmap")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001258 call <SID>AddOption("langmap", gettext("list of characters that are translated in Normal mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001259 call <SID>OptionG("lmap", &lmap)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001260 call <SID>AddOption("langremap", gettext("apply 'langmap' to mapped characters"))
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02001261 call <SID>BinOptionG("lrm", &lrm)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001262endif
1263if has("xim")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001264 call <SID>AddOption("imdisable", gettext("when set never use IM; overrules following IM options"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001265 call <SID>BinOptionG("imd", &imd)
1266endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001267call <SID>AddOption("iminsert", gettext("in Insert mode: 1: use :lmap; 2: use IM; 0: neither"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001268call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269call <SID>OptionL("imi")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001270call <SID>AddOption("imstyle", gettext("input method style, 0: on-the-spot, 1: over-the-spot"))
Bram Moolenaar37c64c72017-09-19 22:06:03 +02001271call <SID>OptionG("imst", &imst)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001272call <SID>AddOption("imsearch", gettext("entering a search pattern: 1: use :lmap; 2: use IM; 0: neither"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001273call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001274call <SID>OptionL("ims")
1275if has("xim")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001276 call <SID>AddOption("imcmdline", gettext("when set always use IM when starting to edit a command line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001277 call <SID>BinOptionG("imc", &imc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001278 call <SID>AddOption("imstatusfunc", gettext("function to obtain IME status"))
Bram Moolenaar14b69452013-06-29 23:05:20 +02001279 call <SID>OptionG("imsf", &imsf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001280 call <SID>AddOption("imactivatefunc", gettext("function to enable/disable IME"))
Bram Moolenaar14b69452013-06-29 23:05:20 +02001281 call <SID>OptionG("imaf", &imaf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001282endif
1283
1284
Bram Moolenaar14944c02020-09-11 20:51:26 +02001285call <SID>Header(gettext("multi-byte characters"))
1286call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\"\n\"euc-jp\", \"big5\", etc."))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001287call <SID>OptionG("enc", &enc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001288call <SID>AddOption("fileencoding", gettext("character encoding for the current file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001289call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001290call <SID>OptionL("fenc")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001291call <SID>AddOption("fileencodings", gettext("automatically detected character encodings"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001292call <SID>OptionG("fencs", &fencs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001293call <SID>AddOption("termencoding", gettext("character encoding used by the terminal"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001294call <SID>OptionG("tenc", &tenc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001295call <SID>AddOption("charconvert", gettext("expression used for character encoding conversion"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001296call <SID>OptionG("ccv", &ccv)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001297call <SID>AddOption("delcombine", gettext("delete combining (composing) characters on their own"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001298call <SID>BinOptionG("deco", &deco)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001299call <SID>AddOption("maxcombine", gettext("maximum number of combining (composing) characters displayed"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001300call <SID>OptionG("mco", &mco)
1301if has("xim") && has("gui_gtk")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001302 call <SID>AddOption("imactivatekey", gettext("key that activates the X input method"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001303 call <SID>OptionG("imak", &imak)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001304endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001305call <SID>AddOption("ambiwidth", gettext("width of ambiguous width characters"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001306call <SID>OptionG("ambw", &ambw)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001307call <SID>AddOption("emoji", gettext("emoji characters are full width"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001308call <SID>BinOptionG("emo", &emo)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001309
1310
Bram Moolenaar14944c02020-09-11 20:51:26 +02001311call <SID>Header(gettext("various"))
1312call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\" and/or \"all\""))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001313call <SID>OptionG("ve", &ve)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001314call <SID>AddOption("eventignore", gettext("list of autocommand events which are to be ignored"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001315call <SID>OptionG("ei", &ei)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001316call <SID>AddOption("loadplugins", gettext("load plugin scripts when starting up"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001317call <SID>BinOptionG("lpl", &lpl)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001318call <SID>AddOption("exrc", gettext("enable reading .vimrc/.exrc/.gvimrc in the current directory"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001319call <SID>BinOptionG("ex", &ex)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001320call <SID>AddOption("secure", gettext("safer working with script files in the current directory"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001321call <SID>BinOptionG("secure", &secure)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001322call <SID>AddOption("gdefault", gettext("use the 'g' flag for \":substitute\""))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323call <SID>BinOptionG("gd", &gd)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001324call <SID>AddOption("edcompatible", gettext("'g' and 'c' flags of \":substitute\" toggle"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001325call <SID>BinOptionG("ed", &ed)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001326if exists("+opendevice")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001327 call <SID>AddOption("opendevice", gettext("allow reading/writing devices"))
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001328 call <SID>BinOptionG("odev", &odev)
1329endif
1330if exists("+maxfuncdepth")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001331 call <SID>AddOption("maxfuncdepth", gettext("maximum depth of function calls"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001332 call append("$", " \tset mfd=" . &mfd)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001333endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001334if has("mksession")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001335 call <SID>AddOption("sessionoptions", gettext("list of words that specifies what to put in a session file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001336 call <SID>OptionG("ssop", &ssop)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001337 call <SID>AddOption("viewoptions", gettext("list of words that specifies what to save for :mkview"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001338 call <SID>OptionG("vop", &vop)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001339 call <SID>AddOption("viewdir", gettext("directory where to store files with :mkview"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001340 call <SID>OptionG("vdir", &vdir)
1341endif
1342if has("viminfo")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001343 call <SID>AddOption("viminfo", gettext("list that specifies what to write in the viminfo file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001344 call <SID>OptionG("vi", &vi)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001345 call <SID>AddOption("viminfofile", gettext("file name used for the viminfo file"))
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02001346 call <SID>OptionG("vif", &vif)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001347endif
1348if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001349 call <SID>AddOption("bufhidden", gettext("what happens with a buffer when it's no longer in a window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001350 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001351 call <SID>OptionL("bh")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001352 call <SID>AddOption("buftype", gettext("\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001353 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001354 call <SID>OptionL("bt")
1355endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001356call <SID>AddOption("buflisted", gettext("whether the buffer shows up in the buffer list"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001357call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001358call <SID>BinOptionL("bl")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001359call <SID>AddOption("debug", gettext("set to \"msg\" to see all error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001360call append("$", " \tset debug=" . &debug)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001361if has("signs")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001362 call <SID>AddOption("signcolumn", gettext("whether to show the signcolumn"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001363 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001364 call <SID>OptionL("scl")
1365endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001366if has("mzscheme")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001367 call <SID>AddOption("mzquantum", gettext("interval in milliseconds between polls for MzScheme threads"))
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001368 call append("$", " \tset mzq=" . &mzq)
1369endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001370if exists("&luadll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001371 call <SID>AddOption("luadll", gettext("name of the Lua dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001372 call <SID>OptionG("luadll", &luadll)
1373endif
1374if exists("&perldll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001375 call <SID>AddOption("perldll", gettext("name of the Perl dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001376 call <SID>OptionG("perldll", &perldll)
1377endif
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01001378if has('pythonx')
Bram Moolenaar14944c02020-09-11 20:51:26 +02001379 call <SID>AddOption("pyxversion", gettext("whether to use Python 2 or 3"))
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01001380 call append("$", " \tset pyx=" . &wd)
1381endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001382if exists("&pythondll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001383 call <SID>AddOption("pythondll", gettext("name of the Python 2 dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001384 call <SID>OptionG("pythondll", &pythondll)
1385endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001386if exists("&pythonhome")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001387 call <SID>AddOption("pythonhome", gettext("name of the Python 2 home directory"))
Bram Moolenaar94073162018-01-31 21:49:05 +01001388 call <SID>OptionG("pythonhome", &pythonhome)
1389endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001390if exists("&pythonthreedll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001391 call <SID>AddOption("pythonthreedll", gettext("name of the Python 3 dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001392 call <SID>OptionG("pythonthreedll", &pythonthreedll)
1393endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001394if exists("&pythonthreehome")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001395 call <SID>AddOption("pythonthreehome", gettext("name of the Python 3 home directory"))
Bram Moolenaar94073162018-01-31 21:49:05 +01001396 call <SID>OptionG("pythonthreehome", &pythonthreehome)
1397endif
Bram Moolenaara93f9752015-11-10 20:45:09 +01001398if exists("&rubydll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001399 call <SID>AddOption("rubydll", gettext("name of the Ruby dynamic library"))
Bram Moolenaara93f9752015-11-10 20:45:09 +01001400 call <SID>OptionG("rubydll", &rubydll)
1401endif
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001402if exists("&tcldll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001403 call <SID>AddOption("tcldll", gettext("name of the Tcl dynamic library"))
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001404 call <SID>OptionG("tcldll", &tcldll)
1405endif
Bram Moolenaar01164a62017-11-02 22:58:42 +01001406if exists("&mzschemedll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001407 call <SID>AddOption("mzschemedll", gettext("name of the Tcl dynamic library"))
Bram Moolenaar01164a62017-11-02 22:58:42 +01001408 call <SID>OptionG("mzschemedll", &mzschemedll)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001409 call <SID>AddOption("mzschemegcdll", gettext("name of the Tcl GC dynamic library"))
Bram Moolenaar01164a62017-11-02 22:58:42 +01001410 call <SID>OptionG("mzschemegcdll", &mzschemegcdll)
1411endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001412
1413set cpo&vim
1414
1415" go to first line
14161
1417
1418" reset 'modified', so that ":q" can be used to close the window
1419setlocal nomodified
1420
1421if has("syntax")
1422 " Use Vim highlighting, with some additional stuff
1423 setlocal ft=vim
1424 syn match optwinHeader "^ \=[0-9].*"
1425 syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
1426 syn match optwinComment ".*" contained
1427 syn match optwinComment "^\t.*"
1428 if !exists("did_optwin_syntax_inits")
1429 let did_optwin_syntax_inits = 1
1430 hi link optwinHeader Title
1431 hi link optwinName Identifier
1432 hi link optwinComment Comment
1433 endif
1434endif
1435
1436" Install autocommands to enable mappings in option-window
1437noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR>
1438inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR>
1439noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
1440
1441" Make the buffer be deleted when the window is closed.
1442setlocal buftype=nofile bufhidden=delete noswapfile
1443
1444augroup optwin
1445 au! BufUnload,BufHidden option-window nested
1446 \ call <SID>unload() | delfun <SID>unload
1447augroup END
1448
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001449func <SID>unload()
Bram Moolenaar071d4272004-06-13 20:20:40 +00001450 delfun <SID>CR
1451 delfun <SID>Space
1452 delfun <SID>Find
1453 delfun <SID>Update
1454 delfun <SID>OptionL
1455 delfun <SID>OptionG
1456 delfun <SID>BinOptionL
1457 delfun <SID>BinOptionG
1458 delfun <SID>Header
1459 au! optwin
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001460endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +00001461
1462" Restore the previous value of 'title' and 'icon'.
1463let &title = s:old_title
1464let &icon = s:old_icon
1465let &ru = s:old_ru
1466let &sc = s:old_sc
1467let &cpo = s:cpo_save
Bram Moolenaar9c474b22018-02-27 17:04:25 +01001468let &ul = s:old_ul
1469unlet 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 +02001470
1471" vim: ts=8 sw=2 sts=2