blob: 0158f9775d66f1cf838194e2f1f4e461899a58a5 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" These commands create the option window.
2"
Christian Brabandte978b452023-08-13 10:33:05 +02003" Maintainer: The Vim Project <https://github.com/vim/vim>
RestorerZd6a5edd2025-07-06 20:17:36 +02004" Last Change: 2025 Jul 05
Christian Brabandte978b452023-08-13 10:33:05 +02005" Former Maintainer: Bram Moolenaar <Bram@vim.org>
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7" If there already is an option window, jump to that one.
Bram Moolenaarab6c8582017-08-11 17:15:09 +02008let buf = bufnr('option-window')
9if buf >= 0
10 let winids = win_findbuf(buf)
11 if len(winids) > 0
12 if win_gotoid(winids[0]) == 1
Bram Moolenaar071d4272004-06-13 20:20:40 +000013 finish
14 endif
Bram Moolenaarab6c8582017-08-11 17:15:09 +020015 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000016endif
17
18" Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
19" not be recognized. See ":help 'cpoptions'".
20let s:cpo_save = &cpo
21set cpo&vim
22
23" function to be called when <CR> is hit in the option-window
Bram Moolenaara953b5c2020-09-10 14:25:25 +020024func <SID>CR()
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26 " If on a continued comment line, go back to the first comment line
Bram Moolenaar251e1912011-06-19 05:09:16 +020027 let lnum = search("^[^\t]", 'bWcn')
Bram Moolenaar071d4272004-06-13 20:20:40 +000028 let line = getline(lnum)
Bram Moolenaar071d4272004-06-13 20:20:40 +000029
30 " <CR> on a "set" line executes the option line
31 if match(line, "^ \tset ") >= 0
32
33 " For a local option: go to the previous window
34 " If this is a help window, go to the window below it
35 let thiswin = winnr()
36 let local = <SID>Find(lnum)
37 if local >= 0
38 exe line
39 call <SID>Update(lnum, line, local, thiswin)
40 endif
41
42 " <CR> on a "option" line shows help for that option
43 elseif match(line, "^[a-z]") >= 0
44 let name = substitute(line, '\([^\t]*\).*', '\1', "")
45 exe "help '" . name . "'"
46
47 " <CR> on an index line jumps to the group
48 elseif match(line, '^ \=[0-9]') >= 0
49 exe "norm! /" . line . "\<CR>zt"
50 endif
Bram Moolenaara953b5c2020-09-10 14:25:25 +020051endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
53" function to be called when <Space> is hit in the option-window
Bram Moolenaara953b5c2020-09-10 14:25:25 +020054func <SID>Space()
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
56 let lnum = line(".")
57 let line = getline(lnum)
58
59 " <Space> on a "set" line refreshes the option line
60 if match(line, "^ \tset ") >= 0
61
62 " For a local option: go to the previous window
63 " If this is a help window, go to the window below it
64 let thiswin = winnr()
65 let local = <SID>Find(lnum)
66 if local >= 0
67 call <SID>Update(lnum, line, local, thiswin)
68 endif
69
70 endif
Bram Moolenaara953b5c2020-09-10 14:25:25 +020071endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +000072
Bram Moolenaar64075b02020-09-09 12:56:30 +020073let s:local_to_window = gettext('(local to window)')
74let s:local_to_buffer = gettext('(local to buffer)')
Bram Moolenaarb5cfff02020-09-20 21:32:03 +020075let s:global_or_local = gettext('(global or local to buffer)')
Bram Moolenaar64075b02020-09-09 12:56:30 +020076
Bram Moolenaar071d4272004-06-13 20:20:40 +000077" find the window in which the option applies
78" returns 0 for global option, 1 for local option, -1 for error
Bram Moolenaara953b5c2020-09-10 14:25:25 +020079func <SID>Find(lnum)
Bram Moolenaar64075b02020-09-09 12:56:30 +020080 let line = getline(a:lnum - 1)
81 if line =~ s:local_to_window || line =~ s:local_to_buffer
Bram Moolenaar071d4272004-06-13 20:20:40 +000082 let local = 1
83 let thiswin = winnr()
Bram Moolenaar251e1912011-06-19 05:09:16 +020084 wincmd p
Bram Moolenaar071d4272004-06-13 20:20:40 +000085 if exists("b:current_syntax") && b:current_syntax == "help"
Bram Moolenaar251e1912011-06-19 05:09:16 +020086 wincmd j
Bram Moolenaar071d4272004-06-13 20:20:40 +000087 if winnr() == thiswin
Bram Moolenaar251e1912011-06-19 05:09:16 +020088 wincmd j
Bram Moolenaar071d4272004-06-13 20:20:40 +000089 endif
90 endif
91 else
92 let local = 0
93 endif
94 if local && (winnr() == thiswin || (exists("b:current_syntax")
95 \ && b:current_syntax == "help"))
96 echo "Don't know in which window"
97 let local = -1
98 endif
99 return local
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200100endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
102" Update a "set" line in the option window
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200103func <SID>Update(lnum, line, local, thiswin)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104 " get the new value of the option and update the option window line
105 if match(a:line, "=") >= 0
106 let name = substitute(a:line, '^ \tset \([^=]*\)=.*', '\1', "")
107 else
108 let name = substitute(a:line, '^ \tset \(no\)\=\([a-z]*\).*', '\2', "")
109 endif
110 if name == "pt" && &pt =~ "\x80"
111 let val = <SID>PTvalue()
112 else
Bram Moolenaar251e1912011-06-19 05:09:16 +0200113 let val = escape(eval('&' . name), " \t\\\"|")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000114 endif
115 if a:local
Bram Moolenaar251e1912011-06-19 05:09:16 +0200116 exe a:thiswin . "wincmd w"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117 endif
118 if match(a:line, "=") >= 0 || (val != "0" && val != "1")
119 call setline(a:lnum, " \tset " . name . "=" . val)
120 else
121 if val
122 call setline(a:lnum, " \tset " . name . "\tno" . name)
123 else
124 call setline(a:lnum, " \tset no" . name . "\t" . name)
125 endif
126 endif
127 set nomodified
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200128endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129
130" Reset 'title' and 'icon' to make it work faster.
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100131" Reset 'undolevels' to avoid undo'ing until the buffer is empty.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132let s:old_title = &title
133let s:old_icon = &icon
134let s:old_sc = &sc
135let s:old_ru = &ru
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100136let s:old_ul = &ul
137set notitle noicon nosc noru ul=-1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138
139" If the current window is a help window, try finding a non-help window.
140" Relies on syntax highlighting to be switched on.
141let s:thiswin = winnr()
142while exists("b:current_syntax") && b:current_syntax == "help"
Bram Moolenaar251e1912011-06-19 05:09:16 +0200143 wincmd w
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144 if s:thiswin == winnr()
145 break
146 endif
147endwhile
148
Bram Moolenaarab6c8582017-08-11 17:15:09 +0200149" Open the window. $OPTWIN_CMD is set to "tab" for ":tab options".
150exe $OPTWIN_CMD . ' new option-window'
Bram Moolenaar251e1912011-06-19 05:09:16 +0200151setlocal ts=15 tw=0 noro buftype=nofile
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152
153" Insert help and a "set" command for each option.
Bram Moolenaar0b39c3f2020-08-30 15:52:10 +0200154call append(0, gettext('" Each "set" line shows the current value of an option (on the left).'))
155call append(1, gettext('" Hit <Enter> on a "set" line to execute it.'))
156call append(2, gettext('" A boolean option will be toggled.'))
157call append(3, gettext('" For other options you can edit the value before hitting <Enter>.'))
158call append(4, gettext('" Hit <Enter> on a help line to open a help window on this option.'))
159call append(5, gettext('" Hit <Enter> on an index line to jump there.'))
160call append(6, gettext('" Hit <Space> on a "set" line to refresh it.'))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000161
162" These functions are called often below. Keep them fast!
163
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200164" Add an option name and explanation. The text can contain "\n" characters
165" where a line break is to be inserted.
166func <SID>AddOption(name, text)
167 let lines = split(a:text, "\n")
168 call append("$", a:name .. "\t" .. lines[0])
169 for line in lines[1:]
170 call append("$", "\t" .. line)
171 endfor
172endfunc
173
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174" Init a local binary option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200175func <SID>BinOptionL(name)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200176 let val = getwinvar(winnr('#'), '&' . a:name)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177 call append("$", substitute(substitute(" \tset " . val . a:name . "\t" .
178 \!val . a:name, "0", "no", ""), "1", "", ""))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200179endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180
181" Init a global binary option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200182func <SID>BinOptionG(name, val)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000183 call append("$", substitute(substitute(" \tset " . a:val . a:name . "\t" .
184 \!a:val . a:name, "0", "no", ""), "1", "", ""))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200185endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000186
187" Init a local string option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200188func <SID>OptionL(name)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200189 let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190 call append("$", " \tset " . a:name . "=" . val)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200191endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000192
193" Init a global string option
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200194func <SID>OptionG(name, val)
Bram Moolenaar251e1912011-06-19 05:09:16 +0200195 call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|"))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200196endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197
198let s:idx = 1
199let s:lnum = line("$")
200call append("$", "")
201
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200202func <SID>Header(text)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000203 let line = s:idx . " " . a:text
204 if s:idx < 10
205 let line = " " . line
206 endif
207 call append("$", "")
208 call append("$", line)
209 call append("$", "")
210 call append(s:lnum, line)
211 let s:idx = s:idx + 1
212 let s:lnum = s:lnum + 1
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200213endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000214
215" Get the value of 'pastetoggle'. It could be a special key.
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200216func <SID>PTvalue()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000217 redir @a
218 silent set pt
219 redir END
220 return substitute(@a, '[^=]*=\(.*\)', '\1', "")
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200221endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222
223" Restore the previous value of 'cpoptions' here, it's used below.
224let &cpo = s:cpo_save
225
226" List of all options, organized by function.
227" The text should be sufficient to know what the option is used for.
228
Bram Moolenaar14944c02020-09-11 20:51:26 +0200229call <SID>Header(gettext("important"))
230call <SID>AddOption("compatible", gettext("behave very Vi compatible (not advisable)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231call <SID>BinOptionG("cp", &cp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200232call <SID>AddOption("cpoptions", gettext("list of flags to specify Vi compatibility"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233call <SID>OptionG("cpo", &cpo)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200234call <SID>AddOption("insertmode", gettext("use Insert mode as the default mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235call <SID>BinOptionG("im", &im)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200236call <SID>AddOption("paste", gettext("paste mode, insert typed text literally"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237call <SID>BinOptionG("paste", &paste)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200238call <SID>AddOption("pastetoggle", gettext("key sequence to toggle paste mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000239if &pt =~ "\x80"
240 call append("$", " \tset pt=" . <SID>PTvalue())
241else
242 call <SID>OptionG("pt", &pt)
243endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200244call <SID>AddOption("runtimepath", gettext("list of directories used for runtime files and plugins"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000245call <SID>OptionG("rtp", &rtp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200246call <SID>AddOption("packpath", gettext("list of directories used for plugin packages"))
Bram Moolenaarf6fee0e2016-02-21 23:02:49 +0100247call <SID>OptionG("pp", &pp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200248call <SID>AddOption("helpfile", gettext("name of the main help file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000249call <SID>OptionG("hf", &hf)
250
251
Bram Moolenaar14944c02020-09-11 20:51:26 +0200252call <SID>Header(gettext("moving around, searching and patterns"))
253call <SID>AddOption("whichwrap", gettext("list of flags specifying which commands wrap to another line"))
Bram Moolenaar4507f6a2020-09-09 15:10:52 +0200254call <SID>OptionG("ww", &ww)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200255call <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 +0000256call <SID>BinOptionG("sol", &sol)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200257call <SID>AddOption("paragraphs", gettext("nroff macro names that separate paragraphs"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000258call <SID>OptionG("para", &para)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200259call <SID>AddOption("sections", gettext("nroff macro names that separate sections"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000260call <SID>OptionG("sect", &sect)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200261call <SID>AddOption("path", gettext("list of directory names used for file searching"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200262call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263call <SID>OptionG("pa", &pa)
Bram Moolenaar0e6adf82021-12-16 14:41:10 +0000264call <SID>AddOption("cdhome", gettext(":cd without argument goes to the home directory"))
265call <SID>BinOptionG("cdh", &cdh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200266call <SID>AddOption("cdpath", gettext("list of directory names used for :cd"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000267call <SID>OptionG("cd", &cd)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200268if exists("+autochdir")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200269 call <SID>AddOption("autochdir", gettext("change to directory of file in buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270 call <SID>BinOptionG("acd", &acd)
271endif
Bram Moolenaar8b9abfd2021-03-29 20:49:05 +0200272call <SID>AddOption("autoshelldir", gettext("change to pwd of shell in terminal buffer"))
273call <SID>BinOptionG("asd", &asd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200274call <SID>AddOption("wrapscan", gettext("search commands wrap around the end of the buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000275call <SID>BinOptionG("ws", &ws)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200276call <SID>AddOption("incsearch", gettext("show match for partly typed search command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277call <SID>BinOptionG("is", &is)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200278call <SID>AddOption("magic", gettext("change the way backslashes are used in search patterns"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279call <SID>BinOptionG("magic", &magic)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200280call <SID>AddOption("regexpengine", gettext("select the default regexp engine used"))
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200281call <SID>OptionG("re", &re)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200282call <SID>AddOption("ignorecase", gettext("ignore case when using a search pattern"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283call <SID>BinOptionG("ic", &ic)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200284call <SID>AddOption("smartcase", gettext("override 'ignorecase' when pattern has upper case characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000285call <SID>BinOptionG("scs", &scs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200286call <SID>AddOption("casemap", gettext("what method to use for changing case of letters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000287call <SID>OptionG("cmp", &cmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200288call <SID>AddOption("maxmempattern", gettext("maximum amount of memory in Kbyte used for pattern matching"))
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000289call append("$", " \tset mmp=" . &mmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200290call <SID>AddOption("define", gettext("pattern for a macro definition line"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200291call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292call <SID>OptionG("def", &def)
293if has("find_in_path")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200294 call <SID>AddOption("include", gettext("pattern for an include-file line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200295 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296 call <SID>OptionL("inc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200297 call <SID>AddOption("includeexpr", gettext("expression used to transform an include line to a file name"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200298 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299 call <SID>OptionL("inex")
300endif
301
302
Bram Moolenaar14944c02020-09-11 20:51:26 +0200303call <SID>Header(gettext("tags"))
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200304call <SID>AddOption("tagbsearch", gettext("use binary searching in tags files"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305call <SID>BinOptionG("tbs", &tbs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200306call <SID>AddOption("taglength", gettext("number of significant characters in a tag name or zero"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000307call append("$", " \tset tl=" . &tl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200308call <SID>AddOption("tags", gettext("list of file names to search for tags"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200309call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310call <SID>OptionG("tag", &tag)
Bram Moolenaara953b5c2020-09-10 14:25:25 +0200311call <SID>AddOption("tagcase", gettext("how to handle case when searching in tags files:\n\"followic\" to follow 'ignorecase', \"ignore\" or \"match\""))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200312call append("$", "\t" .. s:global_or_local)
Bram Moolenaar0f6562e2015-11-24 18:48:14 +0100313call <SID>OptionG("tc", &tc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200314call <SID>AddOption("tagrelative", gettext("file names in a tags file are relative to the tags file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315call <SID>BinOptionG("tr", &tr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200316call <SID>AddOption("tagstack", gettext("a :tag command will use the tagstack"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317call <SID>BinOptionG("tgst", &tgst)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200318call <SID>AddOption("showfulltag", gettext("when completing tags in Insert mode show more info"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319call <SID>BinOptionG("sft", &sft)
Bram Moolenaar45e18cb2019-04-28 18:05:35 +0200320if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200321 call <SID>AddOption("tagfunc", gettext("a function to be used to perform tag searches"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200322 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar45e18cb2019-04-28 18:05:35 +0200323 call <SID>OptionL("tfu")
324endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325if has("cscope")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200326 call <SID>AddOption("cscopeprg", gettext("command for executing cscope"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000327 call <SID>OptionG("csprg", &csprg)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200328 call <SID>AddOption("cscopetag", gettext("use cscope for tag commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329 call <SID>BinOptionG("cst", &cst)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200330 call <SID>AddOption("cscopetagorder", gettext("0 or 1; the order in which \":cstag\" performs a search"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331 call append("$", " \tset csto=" . &csto)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200332 call <SID>AddOption("cscopeverbose", gettext("give messages when adding a cscope database"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000333 call <SID>BinOptionG("csverb", &csverb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200334 call <SID>AddOption("cscopepathcomp", gettext("how many components of the path to show"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000335 call append("$", " \tset cspc=" . &cspc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200336 call <SID>AddOption("cscopequickfix", gettext("when to open a quickfix window for cscope"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337 call <SID>OptionG("csqf", &csqf)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200338 call <SID>AddOption("cscoperelative", gettext("file names in a cscope file are relative to that file"))
Bram Moolenaar251e1912011-06-19 05:09:16 +0200339 call <SID>BinOptionG("csre", &csre)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000340endif
341
342
Bram Moolenaar14944c02020-09-11 20:51:26 +0200343call <SID>Header(gettext("displaying text"))
344call <SID>AddOption("scroll", gettext("number of lines to scroll for CTRL-U and CTRL-D"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200345call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346call <SID>OptionL("scr")
Bram Moolenaarf6196f42022-10-02 21:29:55 +0100347call <SID>AddOption("smoothscroll", gettext("scroll by screen line"))
348call append("$", "\t" .. s:local_to_window)
349call <SID>BinOptionL("sms")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200350call <SID>AddOption("scrolloff", gettext("number of screen lines to show around the cursor"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000351call append("$", " \tset so=" . &so)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200352call <SID>AddOption("wrap", gettext("long lines wrap"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200353call append("$", "\t" .. s:local_to_window)
Bram Moolenaar87768892018-05-15 21:42:51 +0200354call <SID>BinOptionL("wrap")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200355call <SID>AddOption("linebreak", gettext("wrap long lines at a character in 'breakat'"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200356call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000357call <SID>BinOptionL("lbr")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200358call <SID>AddOption("breakindent", gettext("preserve indentation in wrapped text"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200359call append("$", "\t" .. s:local_to_window)
Bram Moolenaar597a4222014-06-25 14:39:50 +0200360call <SID>BinOptionL("bri")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200361call <SID>AddOption("breakindentopt", gettext("adjust breakindent behaviour"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200362call append("$", "\t" .. s:local_to_window)
Bram Moolenaar597a4222014-06-25 14:39:50 +0200363call <SID>OptionL("briopt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200364call <SID>AddOption("breakat", gettext("which characters might cause a line break"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000365call <SID>OptionG("brk", &brk)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200366call <SID>AddOption("showbreak", gettext("string to put before wrapped screen lines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000367call <SID>OptionG("sbr", &sbr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200368call <SID>AddOption("sidescroll", gettext("minimal number of columns to scroll horizontally"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000369call append("$", " \tset ss=" . &ss)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200370call <SID>AddOption("sidescrolloff", gettext("minimal number of columns to keep left and right of the cursor"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000371call append("$", " \tset siso=" . &siso)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200372call <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 +0000373call <SID>OptionG("dy", &dy)
glepnirb8762042025-04-07 20:57:14 +0200374call <SID>AddOption("fillchars", gettext("characters to use for the status line, folds, diffs, buffer text, filler lines and truncation in the completion menu"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000375call <SID>OptionG("fcs", &fcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200376call <SID>AddOption("cmdheight", gettext("number of lines used for the command-line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377call append("$", " \tset ch=" . &ch)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200378call <SID>AddOption("columns", gettext("width of the display"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000379call append("$", " \tset co=" . &co)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200380call <SID>AddOption("lines", gettext("number of lines in the display"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000381call append("$", " \tset lines=" . &lines)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200382call <SID>AddOption("window", gettext("number of lines to scroll for CTRL-F and CTRL-B"))
Bram Moolenaar1b20d3d2010-07-24 20:44:02 +0200383call append("$", " \tset window=" . &window)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200384call <SID>AddOption("lazyredraw", gettext("don't redraw while executing macros"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385call <SID>BinOptionG("lz", &lz)
Bram Moolenaar63ce8c02008-06-04 12:29:14 +0000386if has("reltime")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200387 call <SID>AddOption("redrawtime", gettext("timeout for 'hlsearch' and :match highlighting in msec"))
Bram Moolenaar63ce8c02008-06-04 12:29:14 +0000388 call append("$", " \tset rdt=" . &rdt)
389endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200390call <SID>AddOption("writedelay", gettext("delay in msec for each char written to the display\n(for debugging)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000391call append("$", " \tset wd=" . &wd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200392call <SID>AddOption("list", gettext("show <Tab> as ^I and end-of-line as $"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200393call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000394call <SID>BinOptionL("list")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200395call <SID>AddOption("listchars", gettext("list of strings used for list mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000396call <SID>OptionG("lcs", &lcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200397call <SID>AddOption("number", gettext("show the line number for each line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200398call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399call <SID>BinOptionL("nu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200400call <SID>AddOption("relativenumber", gettext("show the relative line number for each line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200401call append("$", "\t" .. s:local_to_window)
Bram Moolenaar64486672010-05-16 15:46:46 +0200402call <SID>BinOptionL("rnu")
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000403if has("linebreak")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200404 call <SID>AddOption("numberwidth", gettext("number of columns to use for the line number"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200405 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000406 call <SID>OptionL("nuw")
407endif
64-bitman88d41ab2025-04-06 17:20:39 +0200408if has("quickfix")
409 call <SID>AddOption("chistory", gettext("maximum number of quickfix lists that can be stored in history"))
410 call <SID>OptionL("chi")
411 call <SID>AddOption("lhistory", gettext("maximum number of location lists that can be stored in history"))
412 call append("$", "\t" .. s:local_to_window)
413 call <SID>OptionL("lhi")
414endif
Bram Moolenaar860cae12010-06-05 23:22:07 +0200415if has("conceal")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200416 call <SID>AddOption("conceallevel", gettext("controls whether concealable text is hidden"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200417 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200418 call <SID>OptionL("cole")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200419 call <SID>AddOption("concealcursor", gettext("modes in which text in the cursor line can be concealed"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200420 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarfa9a3702010-07-24 15:48:31 +0200421 call <SID>OptionL("cocu")
Bram Moolenaar860cae12010-06-05 23:22:07 +0200422endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000423
424
Bram Moolenaar14944c02020-09-11 20:51:26 +0200425call <SID>Header(gettext("syntax, highlighting and spelling"))
426call <SID>AddOption("background", gettext("\"dark\" or \"light\"; the background color brightness"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000427call <SID>OptionG("bg", &bg)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200428call <SID>AddOption("filetype", gettext("type of file; triggers the FileType event when set"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200429call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100430call <SID>OptionL("ft")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000431if has("syntax")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200432 call <SID>AddOption("syntax", gettext("name of syntax highlighting used"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200433 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434 call <SID>OptionL("syn")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200435 call <SID>AddOption("synmaxcol", gettext("maximum column to look for syntax items"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200436 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar9ff70112005-07-11 22:29:03 +0000437 call <SID>OptionL("smc")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200439call <SID>AddOption("highlight", gettext("which highlighting to use for various occasions"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000440call <SID>OptionG("hl", &hl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200441call <SID>AddOption("hlsearch", gettext("highlight all matches for the last used search pattern"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000442call <SID>BinOptionG("hls", &hls)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200443call <SID>AddOption("wincolor", gettext("highlight group to use for the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200444call append("$", "\t" .. s:local_to_window)
Bram Moolenaar68e65602019-05-26 21:33:31 +0200445call <SID>OptionL("wcr")
Bram Moolenaar8a24b792016-04-30 16:13:10 +0200446if has("termguicolors")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200447 call <SID>AddOption("termguicolors", gettext("use GUI colors for the terminal"))
Bram Moolenaar868cfc12016-04-30 16:49:58 +0200448 call <SID>BinOptionG("tgc", &tgc)
Bram Moolenaar8e3d1b62016-04-30 15:17:19 +0200449endif
Bram Moolenaar7887d882005-07-01 22:33:52 +0000450if has("syntax")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200451 call <SID>AddOption("cursorcolumn", gettext("highlight the screen column of the cursor"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200452 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000453 call <SID>BinOptionL("cuc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200454 call <SID>AddOption("cursorline", gettext("highlight the screen line of the cursor"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200455 call append("$", "\t" .. s:local_to_window)
Bram Moolenaarf71a3db2006-03-12 21:50:18 +0000456 call <SID>BinOptionL("cul")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200457 call <SID>AddOption("cursorlineopt", gettext("specifies which area 'cursorline' highlights"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200458 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar410e98a2019-09-09 22:05:49 +0200459 call <SID>OptionL("culopt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200460 call <SID>AddOption("colorcolumn", gettext("columns to highlight"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200461 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar607cc1e2010-07-18 18:47:44 +0200462 call <SID>OptionL("cc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200463 call <SID>AddOption("spell", gettext("highlight spelling mistakes"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200464 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000465 call <SID>BinOptionL("spell")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200466 call <SID>AddOption("spelllang", gettext("list of accepted languages"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200467 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000468 call <SID>OptionL("spl")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200469 call <SID>AddOption("spellfile", gettext("file that \"zg\" adds good words to"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200470 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000471 call <SID>OptionL("spf")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200472 call <SID>AddOption("spellcapcheck", gettext("pattern to locate the end of a sentence"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200473 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar551f84f2005-07-06 22:29:20 +0000474 call <SID>OptionL("spc")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200475 call <SID>AddOption("spelloptions", gettext("flags to change how spell checking works"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200476 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar65e0d772020-06-14 17:29:55 +0200477 call <SID>OptionL("spo")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200478 call <SID>AddOption("spellsuggest", gettext("methods used to suggest corrections"))
Bram Moolenaar7887d882005-07-01 22:33:52 +0000479 call <SID>OptionG("sps", &sps)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200480 call <SID>AddOption("mkspellmem", gettext("amount of memory used by :mkspell before compressing"))
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000481 call <SID>OptionG("msm", &msm)
Bram Moolenaar7887d882005-07-01 22:33:52 +0000482endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483
484
Bram Moolenaar14944c02020-09-11 20:51:26 +0200485call <SID>Header(gettext("multiple windows"))
486call <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 +0000487call append("$", " \tset ls=" . &ls)
488if has("statusline")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200489 call <SID>AddOption("statusline", gettext("alternate format to be used for a status line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000490 call <SID>OptionG("stl", &stl)
491endif
Colin Kennedy21570352024-03-03 16:16:47 +0100492call append("$", "\t" .. s:local_to_window)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200493call <SID>AddOption("equalalways", gettext("make all windows the same size when adding/removing windows"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000494call <SID>BinOptionG("ea", &ea)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200495call <SID>AddOption("eadirection", gettext("in which direction 'equalalways' works: \"ver\", \"hor\" or \"both\""))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100496call <SID>OptionG("ead", &ead)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200497call <SID>AddOption("winheight", gettext("minimal number of lines used for the current window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000498call append("$", " \tset wh=" . &wh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200499call <SID>AddOption("winminheight", gettext("minimal number of lines used for any window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000500call append("$", " \tset wmh=" . &wmh)
Colin Kennedy21570352024-03-03 16:16:47 +0100501call <SID>AddOption("winfixbuf", gettext("keep window focused on a single buffer"))
502call <SID>OptionG("wfb", &wfb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200503call <SID>AddOption("winfixheight", gettext("keep the height of the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200504call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505call <SID>BinOptionL("wfh")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200506call <SID>AddOption("winfixwidth", gettext("keep the width of the window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200507call append("$", "\t" .. s:local_to_window)
Bram Moolenaarbe4d5062006-03-18 21:30:13 +0000508call <SID>BinOptionL("wfw")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200509call <SID>AddOption("winwidth", gettext("minimal number of columns used for the current window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100510call append("$", " \tset wiw=" . &wiw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200511call <SID>AddOption("winminwidth", gettext("minimal number of columns used for any window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100512call append("$", " \tset wmw=" . &wmw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200513call <SID>AddOption("helpheight", gettext("initial height of the help window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514call append("$", " \tset hh=" . &hh)
515if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200516 call <SID>AddOption("previewpopup", gettext("use a popup window for preview"))
Bram Moolenaar85850f32019-07-19 22:05:51 +0200517 call append("$", " \tset pvp=" . &pvp)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200518 call <SID>AddOption("previewheight", gettext("default height for the preview window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519 call append("$", " \tset pvh=" . &pvh)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200520 call <SID>AddOption("previewwindow", gettext("identifies the preview window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200521 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000522 call <SID>BinOptionL("pvw")
523endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200524call <SID>AddOption("hidden", gettext("don't unload a buffer when no longer shown in a window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525call <SID>BinOptionG("hid", &hid)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200526call <SID>AddOption("switchbuf", gettext("\"useopen\" and/or \"split\"; which window to use when jumping\nto a buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527call <SID>OptionG("swb", &swb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200528call <SID>AddOption("splitbelow", gettext("a new window is put below the current one"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529call <SID>BinOptionG("sb", &sb)
Luuk van Baal13ece2a2022-10-03 15:28:08 +0100530call <SID>AddOption("splitkeep", gettext("determines scroll behavior for split windows"))
xrandomname0b8b1452023-08-31 06:18:40 +0000531call <SID>OptionG("spk", &spk)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200532call <SID>AddOption("splitright", gettext("a new window is put right of the current one"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100533call <SID>BinOptionG("spr", &spr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200534call <SID>AddOption("scrollbind", gettext("this window scrolls together with other bound windows"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200535call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100536call <SID>BinOptionL("scb")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200537call <SID>AddOption("scrollopt", gettext("\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'"))
Bram Moolenaar314dd792019-02-03 15:27:20 +0100538call <SID>OptionG("sbo", &sbo)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200539call <SID>AddOption("cursorbind", gettext("this window's cursor moves together with other bound windows"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200540call append("$", "\t" .. s:local_to_window)
Bram Moolenaar314dd792019-02-03 15:27:20 +0100541call <SID>BinOptionL("crb")
Bram Moolenaar74675a62017-07-15 13:53:23 +0200542if has("terminal")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200543 call <SID>AddOption("termwinsize", gettext("size of a terminal window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200544 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200545 call <SID>OptionL("tws")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200546 call <SID>AddOption("termwinkey", gettext("key that precedes Vim commands in a terminal window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200547 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar6d150f72018-04-21 20:03:20 +0200548 call <SID>OptionL("twk")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200549 call <SID>AddOption("termwinscroll", gettext("max number of lines to keep for scrollback in a terminal window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200550 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200551 call <SID>OptionL("twsl")
Bram Moolenaarc6ddce32019-02-08 12:47:03 +0100552 if has('win32')
Bram Moolenaar14944c02020-09-11 20:51:26 +0200553 call <SID>AddOption("termwintype", gettext("type of pty to use for a terminal window"))
Bram Moolenaarc6ddce32019-02-08 12:47:03 +0100554 call <SID>OptionG("twt", &twt)
555 endif
Bram Moolenaar0aed9a22017-08-19 23:18:02 +0200556 if exists("&winptydll")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200557 call <SID>AddOption("winptydll", gettext("name of the winpty dynamic library"))
Bram Moolenaar0aed9a22017-08-19 23:18:02 +0200558 call <SID>OptionG("winptydll", &winptydll)
559 endif
Bram Moolenaar74675a62017-07-15 13:53:23 +0200560endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561
562
Bram Moolenaar14944c02020-09-11 20:51:26 +0200563call <SID>Header(gettext("multiple tab pages"))
564call <SID>AddOption("showtabline", gettext("0, 1 or 2; when to use a tab pages line"))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000565call append("$", " \tset stal=" . &stal)
LemonBoy5247b0b2024-07-12 19:30:58 +0200566call <SID>AddOption("tabclose", gettext("behaviour when closing tab pages: left, uselast or empty"))
567call append("$", " \tset tcl=" . &tcl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200568call <SID>AddOption("tabpagemax", gettext("maximum number of tab pages to open for -p and \"tab all\""))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000569call append("$", " \tset tpm=" . &tpm)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200570call <SID>AddOption("tabline", gettext("custom tab pages line"))
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000571call <SID>OptionG("tal", &tal)
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000572if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200573 call <SID>AddOption("guitablabel", gettext("custom tab page label for the GUI"))
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000574 call <SID>OptionG("gtl", &gtl)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200575 call <SID>AddOption("guitabtooltip", gettext("custom tab page tooltip for the GUI"))
Bram Moolenaarf9393ef2006-04-24 19:47:27 +0000576 call <SID>OptionG("gtt", &gtt)
577endif
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000578
579
Bram Moolenaar14944c02020-09-11 20:51:26 +0200580call <SID>Header(gettext("terminal"))
581call <SID>AddOption("term", gettext("name of the used terminal"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000582call <SID>OptionG("term", &term)
Bram Moolenaar6f79e612021-12-21 09:12:23 +0000583
Bram Moolenaar14944c02020-09-11 20:51:26 +0200584call <SID>AddOption("ttytype", gettext("alias for 'term'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000585call <SID>OptionG("tty", &tty)
Bram Moolenaar6f79e612021-12-21 09:12:23 +0000586
Bram Moolenaar14944c02020-09-11 20:51:26 +0200587call <SID>AddOption("ttybuiltin", gettext("check built-in termcaps first"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000588call <SID>BinOptionG("tbi", &tbi)
Bram Moolenaar6f79e612021-12-21 09:12:23 +0000589
Bram Moolenaar14944c02020-09-11 20:51:26 +0200590call <SID>AddOption("ttyfast", gettext("terminal connection is fast"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000591call <SID>BinOptionG("tf", &tf)
Bram Moolenaar6f79e612021-12-21 09:12:23 +0000592
593call <SID>AddOption("xtermcodes", gettext("request terminal key codes when an xterm is detected"))
594call <SID>BinOptionG("xtermcodes", &xtermcodes)
595
Bram Moolenaar14944c02020-09-11 20:51:26 +0200596call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000597call <SID>BinOptionG("wiv", &wiv)
Bram Moolenaar6f79e612021-12-21 09:12:23 +0000598
Bram Moolenaarb59ae592022-11-23 23:46:31 +0000599call <SID>AddOption("keyprotocol", gettext("what keyboard protocol to use for which terminal"))
600call <SID>OptionG("kpc", &kpc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200601call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000602call <SID>BinOptionG("ek", &ek)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200603call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000604call append("$", " \tset sj=" . &sj)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200605call <SID>AddOption("ttyscroll", gettext("maximum number of lines to use scrolling instead of redrawing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000606call append("$", " \tset tsl=" . &tsl)
Bram Moolenaara06ecab2016-07-16 14:47:36 +0200607if has("gui") || has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200608 call <SID>AddOption("guicursor", gettext("specifies what the cursor looks like in different modes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000609 call <SID>OptionG("gcr", &gcr)
610endif
611if has("title")
612 let &title = s:old_title
Bram Moolenaar14944c02020-09-11 20:51:26 +0200613 call <SID>AddOption("title", gettext("show info in the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000614 call <SID>BinOptionG("title", &title)
615 set notitle
Bram Moolenaar14944c02020-09-11 20:51:26 +0200616 call <SID>AddOption("titlelen", gettext("percentage of 'columns' used for the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000617 call append("$", " \tset titlelen=" . &titlelen)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200618 call <SID>AddOption("titlestring", gettext("when not empty, string to be used for the window title"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000619 call <SID>OptionG("titlestring", &titlestring)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200620 call <SID>AddOption("titleold", gettext("string to restore the title to when exiting Vim"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000621 call <SID>OptionG("titleold", &titleold)
622 let &icon = s:old_icon
Bram Moolenaar14944c02020-09-11 20:51:26 +0200623 call <SID>AddOption("icon", gettext("set the text of the icon for this window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000624 call <SID>BinOptionG("icon", &icon)
625 set noicon
Bram Moolenaar14944c02020-09-11 20:51:26 +0200626 call <SID>AddOption("iconstring", gettext("when not empty, text for the icon of this window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000627 call <SID>OptionG("iconstring", &iconstring)
628endif
629if has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200630 call <SID>AddOption("restorescreen", gettext("restore the screen contents when exiting Vim"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000631 call <SID>BinOptionG("rs", &rs)
632endif
633
634
Bram Moolenaar14944c02020-09-11 20:51:26 +0200635call <SID>Header(gettext("using the mouse"))
636call <SID>AddOption("mouse", gettext("list of flags for using the mouse"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000637call <SID>OptionG("mouse", &mouse)
638if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200639 call <SID>AddOption("mousefocus", gettext("the window with the mouse pointer becomes the current one"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000640 call <SID>BinOptionG("mousef", &mousef)
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100641endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200642call <SID>AddOption("scrollfocus", gettext("the window with the mouse pointer scrolls with the mouse wheel"))
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100643call <SID>BinOptionG("scf", &scf)
644if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200645 call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000646 call <SID>BinOptionG("mh", &mh)
Tom Praschan3506cf32022-04-07 12:39:08 +0100647 call <SID>AddOption("mousemoveevent", gettext("report mouse movement events"))
648 call <SID>BinOptionG("mousemev", &mousemev)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000649endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200650call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000651call <SID>OptionG("mousem", &mousem)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200652call <SID>AddOption("mousetime", gettext("maximum time in msec to recognize a double-click"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000653call append("$", " \tset mouset=" . &mouset)
Bram Moolenaarcb80aa22020-10-26 21:12:46 +0100654call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"sgr\", etc.; type of mouse"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000655call <SID>OptionG("ttym", &ttym)
656if has("mouseshape")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200657 call <SID>AddOption("mouseshape", gettext("what the mouse pointer looks like in different modes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658 call <SID>OptionG("mouses", &mouses)
659endif
660
661
662if has("gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200663 call <SID>Header(gettext("GUI"))
664 call <SID>AddOption("guifont", gettext("list of font names to be used in the GUI"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000665 call <SID>OptionG("gfn", &gfn)
666 if has("xfontset")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200667 call <SID>AddOption("guifontset", gettext("pair of fonts to be used, for multibyte editing"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668 call <SID>OptionG("gfs", &gfs)
669 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200670 call <SID>AddOption("guifontwide", gettext("list of font names to be used for double-wide characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671 call <SID>OptionG("gfw", &gfw)
672 if has("mac")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200673 call <SID>AddOption("antialias", gettext("use smooth, antialiased fonts"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674 call <SID>BinOptionG("anti", &anti)
675 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200676 call <SID>AddOption("guioptions", gettext("list of flags that specify how the GUI works"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000677 call <SID>OptionG("go", &go)
678 if has("gui_gtk")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200679 call <SID>AddOption("toolbar", gettext("\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000680 call <SID>OptionG("tb", &tb)
681 if has("gui_gtk2")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200682 call <SID>AddOption("toolbariconsize", gettext("size of toolbar icons"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000683 call <SID>OptionG("tbis", &tbis)
684 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200685 call <SID>AddOption("guiheadroom", gettext("room (in pixels) left above/below the window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000686 call append("$", " \tset ghr=" . &ghr)
RestorerZ29ebebd2025-07-03 20:27:37 +0200687 endif
688 if has("gui_gtk") || has("gui_win32")
Bram Moolenaar113cb512021-11-07 20:27:04 +0000689 call <SID>AddOption("guiligatures", gettext("list of ASCII characters that can be combined into complex shapes"))
Bram Moolenaar079ba762021-10-23 12:08:41 +0100690 call <SID>OptionG("gli", &gli)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000691 endif
Bram Moolenaarfb539272014-08-22 19:21:47 +0200692 if has("directx")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200693 call <SID>AddOption("renderoptions", gettext("options for text rendering"))
Bram Moolenaarfb539272014-08-22 19:21:47 +0200694 call <SID>OptionG("rop", &rop)
695 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200696 call <SID>AddOption("guipty", gettext("use a pseudo-tty for I/O to external commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000697 call <SID>BinOptionG("guipty", &guipty)
698 if has("browse")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200699 call <SID>AddOption("browsedir", gettext("\"last\", \"buffer\" or \"current\": which directory used for the file browser"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700 call <SID>OptionG("bsdir", &bsdir)
701 endif
702 if has("multi_lang")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200703 call <SID>AddOption("langmenu", gettext("language to be used for the menus"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704 call <SID>OptionG("langmenu", &lm)
705 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200706 call <SID>AddOption("menuitems", gettext("maximum number of items in one menu"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000707 call append("$", " \tset mis=" . &mis)
708 if has("winaltkeys")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200709 call <SID>AddOption("winaltkeys", gettext("\"no\", \"yes\" or \"menu\"; how to use the ALT key"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710 call <SID>OptionG("wak", &wak)
711 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200712 call <SID>AddOption("linespace", gettext("number of pixel lines to use between characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000713 call append("$", " \tset lsp=" . &lsp)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100714 if has("balloon_eval") || has("balloon_eval_term")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200715 call <SID>AddOption("balloondelay", gettext("delay in milliseconds before a balloon may pop up"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000716 call append("$", " \tset bdlay=" . &bdlay)
Bram Moolenaara2a80162017-11-21 23:09:50 +0100717 if has("balloon_eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200718 call <SID>AddOption("ballooneval", gettext("use balloon evaluation in the GUI"))
Bram Moolenaara2a80162017-11-21 23:09:50 +0100719 call <SID>BinOptionG("beval", &beval)
720 endif
721 if has("balloon_eval_term")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200722 call <SID>AddOption("balloonevalterm", gettext("use balloon evaluation in the terminal"))
Bram Moolenaara2a80162017-11-21 23:09:50 +0100723 call <SID>BinOptionG("bevalterm", &beval)
724 endif
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000725 if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200726 call <SID>AddOption("balloonexpr", gettext("expression to show in balloon eval"))
Bram Moolenaar52b4b552005-03-07 23:00:57 +0000727 call append("$", " \tset bexpr=" . &bexpr)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000728 endif
729 endif
730endif
731
732if has("printer")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200733 call <SID>Header(gettext("printing"))
734 call <SID>AddOption("printoptions", gettext("list of items that control the format of :hardcopy output"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000735 call <SID>OptionG("popt", &popt)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200736 call <SID>AddOption("printdevice", gettext("name of the printer to be used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000737 call <SID>OptionG("pdev", &pdev)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000738 if has("postscript")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200739 call <SID>AddOption("printexpr", gettext("expression used to print the PostScript file for :hardcopy"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000740 call <SID>OptionG("pexpr", &pexpr)
741 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200742 call <SID>AddOption("printfont", gettext("name of the font to be used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000743 call <SID>OptionG("pfn", &pfn)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200744 call <SID>AddOption("printheader", gettext("format of the header used for :hardcopy"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745 call <SID>OptionG("pheader", &pheader)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000746 if has("postscript")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200747 call <SID>AddOption("printencoding", gettext("encoding used to print the PostScript file for :hardcopy"))
Bram Moolenaar8299df92004-07-10 09:47:34 +0000748 call <SID>OptionG("penc", &penc)
749 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200750 call <SID>AddOption("printmbcharset", gettext("the CJK character set to be used for CJK output from :hardcopy"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +0100751 call <SID>OptionG("pmbcs", &pmbcs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200752 call <SID>AddOption("printmbfont", gettext("list of font names to be used for CJK output from :hardcopy"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +0100753 call <SID>OptionG("pmbfn", &pmbfn)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754endif
755
Bram Moolenaar14944c02020-09-11 20:51:26 +0200756call <SID>Header(gettext("messages and info"))
757call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show search message)"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000758call <SID>BinOptionG("terse", &terse)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200759call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000760call <SID>OptionG("shm", &shm)
zeertzjq8cc43da2024-12-07 16:09:08 +0100761call <SID>AddOption("messagesopt", gettext("options for outputting messages"))
Christian Brabandt51d4d842024-12-06 17:26:25 +0100762call <SID>OptionG("mopt", &mopt)
Bram Moolenaarf1dcd142022-12-31 15:30:45 +0000763call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000764let &sc = s:old_sc
765call <SID>BinOptionG("sc", &sc)
766set nosc
Bram Moolenaarf1dcd142022-12-31 15:30:45 +0000767call <SID>AddOption("showcmdloc", gettext("location where to show the (partial) command keys for 'showcmd'"))
768 call <SID>OptionG("sloc", &sloc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200769call <SID>AddOption("showmode", gettext("display the current mode in the status line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000770call <SID>BinOptionG("smd", &smd)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200771call <SID>AddOption("ruler", gettext("show cursor position below each window"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000772let &ru = s:old_ru
773call <SID>BinOptionG("ru", &ru)
774set noru
775if has("statusline")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200776 call <SID>AddOption("rulerformat", gettext("alternate format to be used for the ruler"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777 call <SID>OptionG("ruf", &ruf)
778endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200779call <SID>AddOption("report", gettext("threshold for reporting number of changed lines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000780call append("$", " \tset report=" . &report)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200781call <SID>AddOption("verbose", gettext("the higher the more messages are given"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782call append("$", " \tset vbs=" . &vbs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200783call <SID>AddOption("verbosefile", gettext("file to write messages in"))
Bram Moolenaar7887d882005-07-01 22:33:52 +0000784call <SID>OptionG("vfile", &vfile)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200785call <SID>AddOption("more", gettext("pause listings when the screen is full"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000786call <SID>BinOptionG("more", &more)
787if has("dialog_con") || has("dialog_gui")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200788 call <SID>AddOption("confirm", gettext("start a dialog when a command fails"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000789 call <SID>BinOptionG("cf", &cf)
790endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200791call <SID>AddOption("errorbells", gettext("ring the bell for error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000792call <SID>BinOptionG("eb", &eb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200793call <SID>AddOption("visualbell", gettext("use a visual bell instead of beeping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794call <SID>BinOptionG("vb", &vb)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200795call <SID>AddOption("belloff", gettext("do not ring the bell for these reasons"))
Bram Moolenaardd1616e2015-07-22 22:22:59 +0200796call <SID>OptionG("belloff", &belloff)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000797if has("multi_lang")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200798 call <SID>AddOption("helplang", gettext("list of preferred languages for finding help"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000799 call <SID>OptionG("hlg", &hlg)
800endif
801
802
Bram Moolenaar14944c02020-09-11 20:51:26 +0200803call <SID>Header(gettext("selecting text"))
804call <SID>AddOption("selection", gettext("\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000805call <SID>OptionG("sel", &sel)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200806call <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 +0000807call <SID>OptionG("slm", &slm)
808if has("clipboard")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200809 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 +0000810 call <SID>OptionG("cb", &cb)
Foxe Chenb90c2392025-06-27 21:10:35 +0200811 call <SID>AddOption("clipmethod", gettext("Ordered list of possible methods for accessing the clipboard"))
812 call <SID>OptionG("cpm", &cpm)
813endif
814if has("wayland_clipboard")
815 call <SID>AddOption("wltimeoutlen", gettext("Timeout to use when polling for data to read or write in wayland"))
816 call <SID>OptionG("wtm", &wtm)
817endif
818if has('wayland')
819 call <SID>AddOption("wlseat", gettext("Wayland seat to use"))
820 call <SID>OptionG("wse", &wse)
821endif
822if has("wayland_clipboard")
823 call <SID>AddOption("wlsteal", gettext("Enable wayland focus stealing functionality in order to access the clipboard"))
824 call <SID>BinOptionG("wst", &wst)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000825endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200826call <SID>AddOption("keymodel", gettext("\"startsel\" and/or \"stopsel\"; what special keys can do"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000827call <SID>OptionG("km", &km)
828
829
Bram Moolenaar14944c02020-09-11 20:51:26 +0200830call <SID>Header(gettext("editing text"))
831call <SID>AddOption("undolevels", gettext("maximum number of changes that can be undone"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200832call append("$", "\t" .. s:global_or_local)
Bram Moolenaar9c474b22018-02-27 17:04:25 +0100833call append("$", " \tset ul=" . s:old_ul)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200834call <SID>AddOption("undofile", gettext("automatically save and restore undo history"))
Bram Moolenaar4694a172016-04-21 14:05:23 +0200835call <SID>BinOptionG("udf", &udf)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200836call <SID>AddOption("undodir", gettext("list of directories for undo files"))
Bram Moolenaar4694a172016-04-21 14:05:23 +0200837call <SID>OptionG("udir", &udir)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200838call <SID>AddOption("undoreload", gettext("maximum number lines to save for undo on a buffer reload"))
Bram Moolenaar59f931e2010-07-24 20:27:03 +0200839call append("$", " \tset ur=" . &ur)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200840call <SID>AddOption("modified", gettext("changes have been made and not written to a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200841call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000842call <SID>BinOptionL("mod")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200843call <SID>AddOption("readonly", gettext("buffer is not to be written"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200844call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845call <SID>BinOptionL("ro")
Bram Moolenaarcb80aa22020-10-26 21:12:46 +0100846call <SID>AddOption("modifiable", gettext("changes to the text are possible"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200847call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000848call <SID>BinOptionL("ma")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200849call <SID>AddOption("textwidth", gettext("line length above which to break a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200850call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000851call <SID>OptionL("tw")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200852call <SID>AddOption("wrapmargin", gettext("margin from the right in which to break a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200853call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000854call <SID>OptionL("wm")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200855call <SID>AddOption("backspace", gettext("specifies what <BS>, CTRL-W, etc. can do in Insert mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856call append("$", " \tset bs=" . &bs)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200857call <SID>AddOption("comments", gettext("definition of what comment lines look like"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200858call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000859call <SID>OptionL("com")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200860call <SID>AddOption("formatoptions", gettext("list of flags that tell how automatic formatting works"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200861call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862call <SID>OptionL("fo")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200863call <SID>AddOption("formatlistpat", gettext("pattern to recognize a numbered list"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200864call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar86b68352004-12-27 21:59:20 +0000865call <SID>OptionL("flp")
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000866if has("eval")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200867 call <SID>AddOption("formatexpr", gettext("expression used for \"gq\" to format lines"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200868 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000869 call <SID>OptionL("fex")
870endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000871if has("insert_expand")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200872 call <SID>AddOption("complete", gettext("specifies how Insert mode completion works for CTRL-N and CTRL-P"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200873 call append("$", "\t" .. s:local_to_buffer)
glepnirf31cfa22025-03-06 21:59:13 +0100874 call <SID>OptionL("cfc")
zeertzjq53d59ec2025-03-07 19:09:09 +0100875 call <SID>AddOption("completefuzzycollect", gettext("use fuzzy collection for specific completion modes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000876 call <SID>OptionL("cpt")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200877 call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion"))
zeertzjq529b9ad2024-06-05 20:27:06 +0200878 call <SID>OptionL("cot")
glepnir6a89c942024-10-01 20:32:12 +0200879 call <SID>AddOption("completeitemalign", gettext("popup menu item align order"))
880 call <SID>OptionG("cia", &cia)
Bram Moolenaar36e4d982019-08-20 21:12:16 +0200881 if exists("+completepopup")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200882 call <SID>AddOption("completepopup", gettext("options for the Insert mode completion info popup"))
Bram Moolenaar36e4d982019-08-20 21:12:16 +0200883 call <SID>OptionG("cpp", &cpp)
884 endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200885 call <SID>AddOption("pumheight", gettext("maximum height of the popup menu"))
Bram Moolenaard3667a22006-03-16 21:35:52 +0000886 call <SID>OptionG("ph", &ph)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200887 call <SID>AddOption("pumwidth", gettext("minimum width of the popup menu"))
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +0100888 call <SID>OptionG("pw", &pw)
glepnir532c5ae2025-03-28 19:21:59 +0100889 call <SID>AddOption("pummaxwidth", gettext("maximum width of the popup menu"))
glepnir88d75932025-03-27 20:09:07 +0100890 call <SID>OptionG("pmw", &pmw)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200891 call <SID>AddOption("completefunc", gettext("user defined function for Insert mode completion"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200892 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000893 call <SID>OptionL("cfu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200894 call <SID>AddOption("omnifunc", gettext("function for filetype-specific Insert mode completion"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200895 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaare344bea2005-09-01 20:46:49 +0000896 call <SID>OptionL("ofu")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200897 call <SID>AddOption("dictionary", gettext("list of dictionary files for keyword completion"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200898 call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899 call <SID>OptionG("dict", &dict)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200900 call <SID>AddOption("thesaurus", gettext("list of thesaurus files for keyword completion"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +0200901 call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902 call <SID>OptionG("tsr", &tsr)
Bram Moolenaar079ba762021-10-23 12:08:41 +0100903 call <SID>AddOption("thesaurusfunc", gettext("function used for thesaurus completion"))
904 call append("$", "\t" .. s:global_or_local)
905 call <SID>OptionG("tsrfu", &tsrfu)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200907call <SID>AddOption("infercase", gettext("adjust case of a keyword completion match"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200908call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000909call <SID>BinOptionL("inf")
910if has("digraphs")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200911 call <SID>AddOption("digraph", gettext("enable entering digraphs with c1 <BS> c2"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000912 call <SID>BinOptionG("dg", &dg)
913endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200914call <SID>AddOption("tildeop", gettext("the \"~\" command behaves like an operator"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000915call <SID>BinOptionG("top", &top)
Bram Moolenaar3132cdd2020-11-05 20:41:49 +0100916call <SID>AddOption("operatorfunc", gettext("function called for the \"g@\" operator"))
Bram Moolenaar4770d092006-01-12 23:22:24 +0000917call <SID>OptionG("opfunc", &opfunc)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200918call <SID>AddOption("showmatch", gettext("when inserting a bracket, briefly jump to its match"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000919call <SID>BinOptionG("sm", &sm)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200920call <SID>AddOption("matchtime", gettext("tenth of a second to show a match for 'showmatch'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000921call append("$", " \tset mat=" . &mat)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200922call <SID>AddOption("matchpairs", gettext("list of pairs that match for the \"%\" command"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200923call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000924call <SID>OptionL("mps")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200925call <SID>AddOption("joinspaces", gettext("use two spaces after '.' when joining a line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000926call <SID>BinOptionG("js", &js)
Bram Moolenaarcb80aa22020-10-26 21:12:46 +0100927call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\", \"hex\", \"bin\" and/or \"unsigned\"; number formats\nrecognized for CTRL-A and CTRL-X commands"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200928call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000929call <SID>OptionL("nf")
930
931
Bram Moolenaar14944c02020-09-11 20:51:26 +0200932call <SID>Header(gettext("tabs and indenting"))
933call <SID>AddOption("tabstop", gettext("number of spaces a <Tab> in the text stands for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200934call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935call <SID>OptionL("ts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200936call <SID>AddOption("shiftwidth", gettext("number of spaces used for each step of (auto)indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200937call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000938call <SID>OptionL("sw")
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200939if has("vartabs")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200940 call <SID>AddOption("vartabstop", gettext("list of number of spaces a tab counts for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200941 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200942 call <SID>OptionL("vts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200943 call <SID>AddOption("varsofttabstop", gettext("list of number of spaces a soft tabsstop counts for"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200944 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200945 call <SID>OptionL("vsts")
946endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200947call <SID>AddOption("smarttab", gettext("a <Tab> in an indent inserts 'shiftwidth' spaces"))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948call <SID>BinOptionG("sta", &sta)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200949call <SID>AddOption("softtabstop", gettext("if non-zero, number of spaces to insert for a <Tab>"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200950call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951call <SID>OptionL("sts")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200952call <SID>AddOption("shiftround", gettext("round to 'shiftwidth' for \"<<\" and \">>\""))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953call <SID>BinOptionG("sr", &sr)
Bram Moolenaar14944c02020-09-11 20:51:26 +0200954call <SID>AddOption("expandtab", gettext("expand <Tab> to spaces in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200955call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000956call <SID>BinOptionL("et")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200957call <SID>AddOption("autoindent", gettext("automatically set the indent of a new line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200958call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000959call <SID>BinOptionL("ai")
960if has("smartindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200961 call <SID>AddOption("smartindent", gettext("do clever autoindenting"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200962 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000963 call <SID>BinOptionL("si")
964endif
965if has("cindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200966 call <SID>AddOption("cindent", gettext("enable specific indenting for C code"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200967 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968 call <SID>BinOptionL("cin")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200969 call <SID>AddOption("cinoptions", gettext("options for C-indenting"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200970 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971 call <SID>OptionL("cino")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200972 call <SID>AddOption("cinkeys", gettext("keys that trigger C-indenting in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200973 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974 call <SID>OptionL("cink")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200975 call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200976 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000977 call <SID>OptionL("cinw")
Tom Praschan3506cf32022-04-07 12:39:08 +0100978 call <SID>AddOption("cinscopedecls", gettext("list of scope declaration names used by cino-g"))
979 call append("$", "\t" .. s:local_to_buffer)
980 call <SID>OptionL("cinsd")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200981 call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200982 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000983 call <SID>OptionL("inde")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200984 call <SID>AddOption("indentkeys", gettext("keys that trigger indenting with 'indentexpr' in Insert mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200985 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986 call <SID>OptionL("indk")
987endif
Bram Moolenaar14944c02020-09-11 20:51:26 +0200988call <SID>AddOption("copyindent", gettext("copy whitespace for indenting from previous line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200989call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000990call <SID>BinOptionL("ci")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200991call <SID>AddOption("preserveindent", gettext("preserve kind of whitespace when changing indent"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200992call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000993call <SID>BinOptionL("pi")
994if has("lispindent")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200995 call <SID>AddOption("lisp", gettext("enable lisp mode"))
Bram Moolenaar64075b02020-09-09 12:56:30 +0200996 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000997 call <SID>BinOptionL("lisp")
Bram Moolenaar14944c02020-09-11 20:51:26 +0200998 call <SID>AddOption("lispwords", gettext("words that change how lisp indenting works"))
Bram Moolenaare7a88a82014-04-01 12:26:46 +0200999 call <SID>OptionL("lw")
Bram Moolenaar3c053a12022-10-16 13:11:12 +01001000 call <SID>AddOption("lispoptions", gettext("options for Lisp indenting"))
1001 call <SID>OptionL("lop")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001002endif
1003
1004
1005if has("folding")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001006 call <SID>Header(gettext("folding"))
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001007 call <SID>AddOption("foldenable", gettext("unset to display all folds open"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001008 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001009 call <SID>BinOptionL("fen")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001010 call <SID>AddOption("foldlevel", gettext("folds with a level higher than this number will be closed"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001011 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001012 call <SID>OptionL("fdl")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001013 call <SID>AddOption("foldlevelstart", gettext("value for 'foldlevel' when starting to edit a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001014 call append("$", " \tset fdls=" . &fdls)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001015 call <SID>AddOption("foldcolumn", gettext("width of the column used to indicate folds"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001016 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001017 call <SID>OptionL("fdc")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001018 call <SID>AddOption("foldtext", gettext("expression used to display the text of a closed fold"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001019 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001020 call <SID>OptionL("fdt")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001021 call <SID>AddOption("foldclose", gettext("set to \"all\" to close a fold when the cursor leaves it"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001022 call <SID>OptionG("fcl", &fcl)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001023 call <SID>AddOption("foldopen", gettext("specifies for which commands a fold will be opened"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001024 call <SID>OptionG("fdo", &fdo)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001025 call <SID>AddOption("foldminlines", gettext("minimum number of screen lines for a fold to be closed"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001026 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001027 call <SID>OptionL("fml")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001028 call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001029 call <SID>OptionL("cms")
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001030 call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\",\n\"syntax\" or \"diff\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001031 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001032 call <SID>OptionL("fdm")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001033 call <SID>AddOption("foldexpr", gettext("expression used when 'foldmethod' is \"expr\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001034 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001035 call <SID>OptionL("fde")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001036 call <SID>AddOption("foldignore", gettext("used to ignore lines when 'foldmethod' is \"indent\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001037 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038 call <SID>OptionL("fdi")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001039 call <SID>AddOption("foldmarker", gettext("markers used when 'foldmethod' is \"marker\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001040 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001041 call <SID>OptionL("fmr")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001042 call <SID>AddOption("foldnestmax", gettext("maximum fold depth for when 'foldmethod' is \"indent\" or \"syntax\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001043 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001044 call <SID>OptionL("fdn")
1045endif
1046
1047
1048if has("diff")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001049 call <SID>Header(gettext("diff mode"))
1050 call <SID>AddOption("diff", gettext("use diff mode for the current window"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001051 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001052 call <SID>BinOptionL("diff")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001053 call <SID>AddOption("diffopt", gettext("options for using diff mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001054 call <SID>OptionG("dip", &dip)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001055 call <SID>AddOption("diffexpr", gettext("expression used to obtain a diff file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001056 call <SID>OptionG("dex", &dex)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001057 call <SID>AddOption("patchexpr", gettext("expression used to patch a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058 call <SID>OptionG("pex", &pex)
1059endif
1060
1061
Bram Moolenaar14944c02020-09-11 20:51:26 +02001062call <SID>Header(gettext("mapping"))
1063call <SID>AddOption("maxmapdepth", gettext("maximum depth of mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001064call append("$", " \tset mmd=" . &mmd)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001065call <SID>AddOption("remap", gettext("recognize mappings in mapped keys"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001066call <SID>BinOptionG("remap", &remap)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001067call <SID>AddOption("timeout", gettext("allow timing out halfway into a mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001068call <SID>BinOptionG("to", &to)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001069call <SID>AddOption("ttimeout", gettext("allow timing out halfway into a key code"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001070call <SID>BinOptionG("ttimeout", &ttimeout)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001071call <SID>AddOption("timeoutlen", gettext("time in msec for 'timeout'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072call append("$", " \tset tm=" . &tm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001073call <SID>AddOption("ttimeoutlen", gettext("time in msec for 'ttimeout'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001074call append("$", " \tset ttm=" . &ttm)
1075
1076
Bram Moolenaar14944c02020-09-11 20:51:26 +02001077call <SID>Header(gettext("reading and writing files"))
1078call <SID>AddOption("modeline", gettext("enable using settings from modelines when reading a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001079call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001080call <SID>BinOptionL("ml")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001081call <SID>AddOption("modelineexpr", gettext("allow setting expression options from a modeline"))
Bram Moolenaar68e65602019-05-26 21:33:31 +02001082call <SID>BinOptionG("mle", &mle)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001083call <SID>AddOption("modelines", gettext("number of lines to check for modelines"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001084call append("$", " \tset mls=" . &mls)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001085call <SID>AddOption("binary", gettext("binary file editing"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001086call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087call <SID>BinOptionL("bin")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001088call <SID>AddOption("endofline", gettext("last line in the file has an end-of-line"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001089call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001090call <SID>BinOptionL("eol")
Bram Moolenaar6ebe4f92022-10-28 20:47:54 +01001091call <SID>AddOption("endoffile", gettext("last line in the file followed by CTRL-Z"))
1092call append("$", "\t" .. s:local_to_buffer)
1093call <SID>BinOptionL("eof")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001094call <SID>AddOption("fixendofline", gettext("fixes missing end-of-line at end of text file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001095call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar34d72d42015-07-17 14:18:08 +02001096call <SID>BinOptionL("fixeol")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001097call <SID>AddOption("bomb", gettext("prepend a Byte Order Mark to the file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001098call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001099call <SID>BinOptionL("bomb")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001100call <SID>AddOption("fileformat", gettext("end-of-line format: \"dos\", \"unix\" or \"mac\""))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001101call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102call <SID>OptionL("ff")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001103call <SID>AddOption("fileformats", gettext("list of file formats to look for when editing a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001104call <SID>OptionG("ffs", &ffs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001105call <SID>AddOption("textmode", gettext("obsolete, use 'fileformat'"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001106call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001107call <SID>BinOptionL("tx")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001108call <SID>AddOption("textauto", gettext("obsolete, use 'fileformats'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001109call <SID>BinOptionG("ta", &ta)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001110call <SID>AddOption("write", gettext("writing files is allowed"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001111call <SID>BinOptionG("write", &write)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001112call <SID>AddOption("writebackup", gettext("write a backup file before overwriting a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001113call <SID>BinOptionG("wb", &wb)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001114call <SID>AddOption("backup", gettext("keep a backup after overwriting a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001115call <SID>BinOptionG("bk", &bk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001116call <SID>AddOption("backupskip", gettext("patterns that specify for which files a backup is not made"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001117call append("$", " \tset bsk=" . &bsk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001118call <SID>AddOption("backupcopy", gettext("whether to make the backup as a copy or rename the existing file"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001119call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001120call append("$", " \tset bkc=" . &bkc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001121call <SID>AddOption("backupdir", gettext("list of directories to put backup files in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001122call <SID>OptionG("bdir", &bdir)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001123call <SID>AddOption("backupext", gettext("file name extension for the backup file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001124call <SID>OptionG("bex", &bex)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001125call <SID>AddOption("autowrite", gettext("automatically write a file when leaving a modified buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001126call <SID>BinOptionG("aw", &aw)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001127call <SID>AddOption("autowriteall", gettext("as 'autowrite', but works with more commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001128call <SID>BinOptionG("awa", &awa)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001129call <SID>AddOption("writeany", gettext("always write without asking for confirmation"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130call <SID>BinOptionG("wa", &wa)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001131call <SID>AddOption("autoread", gettext("automatically read a file when it was modified outside of Vim"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001132call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001133call <SID>BinOptionG("ar", &ar)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001134call <SID>AddOption("patchmode", gettext("keep oldest version of a file; specifies file name extension"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001135call <SID>OptionG("pm", &pm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001136call <SID>AddOption("fsync", gettext("forcibly sync the file to disk after writing it"))
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001137call <SID>BinOptionG("fs", &fs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001138call <SID>AddOption("shortname", gettext("use 8.3 file names"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001139call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaara06ecab2016-07-16 14:47:36 +02001140call <SID>BinOptionL("sn")
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001141call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip, blowfish or blowfish2"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001142call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarb702c842010-05-18 22:28:22 +02001143call <SID>OptionL("cm")
Bram Moolenaar071d4272004-06-13 20:20:40 +00001144
1145
Bram Moolenaar14944c02020-09-11 20:51:26 +02001146call <SID>Header(gettext("the swap file"))
1147call <SID>AddOption("directory", gettext("list of directories for the swap file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001148call <SID>OptionG("dir", &dir)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001149call <SID>AddOption("swapfile", gettext("use a swap file for this buffer"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001150call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001151call <SID>BinOptionL("swf")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001152call <SID>AddOption("swapsync", gettext("\"sync\", \"fsync\" or empty; how to flush a swap file to disk"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001153call <SID>OptionG("sws", &sws)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001154call <SID>AddOption("updatecount", gettext("number of characters typed to cause a swap file update"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001155call append("$", " \tset uc=" . &uc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001156call <SID>AddOption("updatetime", gettext("time in msec after which the swap file will be updated"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001157call append("$", " \tset ut=" . &ut)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001158call <SID>AddOption("maxmem", gettext("maximum amount of memory in Kbyte used for one buffer"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001159call append("$", " \tset mm=" . &mm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001160call <SID>AddOption("maxmemtot", gettext("maximum amount of memory in Kbyte used for all buffers"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001161call append("$", " \tset mmt=" . &mmt)
1162
1163
Bram Moolenaar14944c02020-09-11 20:51:26 +02001164call <SID>Header(gettext("command line editing"))
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001165call <SID>AddOption("history", gettext("how many command lines are remembered"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001166call append("$", " \tset hi=" . &hi)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001167call <SID>AddOption("wildchar", gettext("key that triggers command-line expansion"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168call append("$", " \tset wc=" . &wc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001169call <SID>AddOption("wildcharm", gettext("like 'wildchar' but can also be used in a mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001170call append("$", " \tset wcm=" . &wcm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001171call <SID>AddOption("wildmode", gettext("specifies how command line completion works"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001172call <SID>OptionG("wim", &wim)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001173if has("wildoptions")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001174 call <SID>AddOption("wildoptions", gettext("empty or \"tagfile\" to list file name of matching tags"))
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001175 call <SID>OptionG("wop", &wop)
1176endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001177call <SID>AddOption("suffixes", gettext("list of file name extensions that have a lower priority"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001178call <SID>OptionG("su", &su)
1179if has("file_in_path")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001180 call <SID>AddOption("suffixesadd", gettext("list of file name extensions added when searching for a file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001181 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001182 call <SID>OptionL("sua")
1183endif
1184if has("wildignore")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001185 call <SID>AddOption("wildignore", gettext("list of patterns to ignore files for file name completion"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001186 call <SID>OptionG("wig", &wig)
1187endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001188call <SID>AddOption("fileignorecase", gettext("ignore case when using file names"))
Bram Moolenaar91fc43d2013-04-05 15:41:05 +02001189call <SID>BinOptionG("fic", &fic)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001190call <SID>AddOption("wildignorecase", gettext("ignore case when completing file names"))
Bram Moolenaar81af9252010-12-10 20:35:50 +01001191call <SID>BinOptionG("wic", &wic)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001192if has("wildmenu")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001193 call <SID>AddOption("wildmenu", gettext("command-line completion shows a list of matches"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001194 call <SID>BinOptionG("wmnu", &wmnu)
1195endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001196call <SID>AddOption("cedit", gettext("key used to open the command-line window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001197call <SID>OptionG("cedit", &cedit)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001198call <SID>AddOption("cmdwinheight", gettext("height of the command-line window"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001199call <SID>OptionG("cwh", &cwh)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001200
1201
Bram Moolenaar14944c02020-09-11 20:51:26 +02001202call <SID>Header(gettext("executing external commands"))
1203call <SID>AddOption("shell", gettext("name of the shell program used for external commands"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001204call <SID>OptionG("sh", &sh)
1205if has("amiga")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001206 call <SID>AddOption("shelltype", gettext("when to use the shell or directly execute a command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001207 call append("$", " \tset st=" . &st)
1208endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001209call <SID>AddOption("shellquote", gettext("character(s) to enclose a shell command in"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001210call <SID>OptionG("shq", &shq)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001211call <SID>AddOption("shellxquote", gettext("like 'shellquote' but include the redirection"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001212call <SID>OptionG("sxq", &sxq)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001213call <SID>AddOption("shellxescape", gettext("characters to escape when 'shellxquote' is ("))
Bram Moolenaardb7207e2012-02-22 17:30:19 +01001214call <SID>OptionG("sxe", &sxe)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001215call <SID>AddOption("shellcmdflag", gettext("argument for 'shell' to execute a command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001216call <SID>OptionG("shcf", &shcf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001217call <SID>AddOption("shellredir", gettext("used to redirect command output to a file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001218call <SID>OptionG("srr", &srr)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001219call <SID>AddOption("shelltemp", gettext("use a temp file for shell commands instead of using a pipe"))
Bram Moolenaar551f84f2005-07-06 22:29:20 +00001220call <SID>BinOptionG("stmp", &stmp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001221call <SID>AddOption("equalprg", gettext("program used for \"=\" command"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001222call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001223call <SID>OptionG("ep", &ep)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001224call <SID>AddOption("formatprg", gettext("program used to format lines with \"gq\" command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001225call <SID>OptionG("fp", &fp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001226call <SID>AddOption("keywordprg", gettext("program used for the \"K\" command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001227call <SID>OptionG("kp", &kp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001228call <SID>AddOption("warn", gettext("warn when using a shell command and a buffer has changes"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229call <SID>BinOptionG("warn", &warn)
1230
1231
1232if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001233 call <SID>Header(gettext("running make and jumping to errors (quickfix)"))
1234 call <SID>AddOption("errorfile", gettext("name of the file that contains error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235 call <SID>OptionG("ef", &ef)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001236 call <SID>AddOption("errorformat", gettext("list of formats for error messages"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001237 call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001238 call <SID>OptionG("efm", &efm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001239 call <SID>AddOption("makeprg", gettext("program used for the \":make\" command"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001240 call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001241 call <SID>OptionG("mp", &mp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001242 call <SID>AddOption("shellpipe", gettext("string used to put the output of \":make\" in the error file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001243 call <SID>OptionG("sp", &sp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001244 call <SID>AddOption("makeef", gettext("name of the errorfile for the 'makeprg' command"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001245 call <SID>OptionG("mef", &mef)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001246 call <SID>AddOption("grepprg", gettext("program used for the \":grep\" command"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001247 call append("$", "\t" .. s:global_or_local)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001248 call <SID>OptionG("gp", &gp)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001249 call <SID>AddOption("grepformat", gettext("list of formats for output of 'grepprg'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001250 call <SID>OptionG("gfm", &gfm)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001251 call <SID>AddOption("makeencoding", gettext("encoding of the \":make\" and \":grep\" output"))
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001252 call append("$", "\t" .. s:global_or_local)
Bram Moolenaarad4187e2017-03-06 21:45:20 +01001253 call <SID>OptionG("menc", &menc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001254 call <SID>AddOption("quickfixtextfunc", gettext("function to display text in the quickfix window"))
Bram Moolenaaracc22402020-06-07 21:07:18 +02001255 call <SID>OptionG("qftf", &qftf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001256endif
1257
1258
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001259if has("win32")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001260 call <SID>Header(gettext("system specific"))
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001261 call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
1262 call <SID>BinOptionG("ssl", &ssl)
1263 call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
1264 call <SID>OptionG("csl", &csl)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001265endif
1266
1267
Bram Moolenaar14944c02020-09-11 20:51:26 +02001268call <SID>Header(gettext("language specific"))
1269call <SID>AddOption("isfname", gettext("specifies the characters in a file name"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001270call <SID>OptionG("isf", &isf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001271call <SID>AddOption("isident", gettext("specifies the characters in an identifier"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001272call <SID>OptionG("isi", &isi)
glepnirbcd59952025-04-24 21:48:35 +02001273call <SID>AddOption("isexpand", gettext("defines trigger strings for complete_match()"))
1274call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001275call <SID>AddOption("iskeyword", gettext("specifies the characters in a keyword"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001276call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001277call <SID>OptionL("isk")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001278call <SID>AddOption("isprint", gettext("specifies printable characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001279call <SID>OptionG("isp", &isp)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001280if has("textobjects")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001281 call <SID>AddOption("quoteescape", gettext("specifies escape characters in a string"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001282 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001283 call <SID>OptionL("qe")
1284endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001285if has("rightleft")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001286 call <SID>AddOption("rightleft", gettext("display the buffer right-to-left"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001287 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001288 call <SID>BinOptionL("rl")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001289 call <SID>AddOption("rightleftcmd", gettext("when to edit the command-line right-to-left"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001290 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001291 call <SID>OptionL("rlc")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001292 call <SID>AddOption("revins", gettext("insert characters backwards"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001293 call <SID>BinOptionG("ri", &ri)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001294 call <SID>AddOption("allowrevins", gettext("allow CTRL-_ in Insert and Command-line mode to toggle 'revins'"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001295 call <SID>BinOptionG("ari", &ari)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001296 call <SID>AddOption("aleph", gettext("the ASCII code for the first letter of the Hebrew alphabet"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001297 call append("$", " \tset al=" . &al)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001298 call <SID>AddOption("hkmap", gettext("use Hebrew keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001299 call <SID>BinOptionG("hk", &hk)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001300 call <SID>AddOption("hkmapp", gettext("use phonetic Hebrew keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001301 call <SID>BinOptionG("hkp", &hkp)
1302endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001303if has("arabic")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001304 call <SID>AddOption("arabic", gettext("prepare for editing Arabic text"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001305 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001306 call <SID>BinOptionL("arab")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001307 call <SID>AddOption("arabicshape", gettext("perform shaping of Arabic characters"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001308 call <SID>BinOptionG("arshape", &arshape)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001309 call <SID>AddOption("termbidi", gettext("terminal will perform bidi handling"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001310 call <SID>BinOptionG("tbidi", &tbidi)
1311endif
1312if has("keymap")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001313 call <SID>AddOption("keymap", gettext("name of a keyboard mapping"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001314 call <SID>OptionL("kmp")
1315endif
1316if has("langmap")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001317 call <SID>AddOption("langmap", gettext("list of characters that are translated in Normal mode"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001318 call <SID>OptionG("lmap", &lmap)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001319 call <SID>AddOption("langremap", gettext("apply 'langmap' to mapped characters"))
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02001320 call <SID>BinOptionG("lrm", &lrm)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001321endif
1322if has("xim")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001323 call <SID>AddOption("imdisable", gettext("when set never use IM; overrules following IM options"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001324 call <SID>BinOptionG("imd", &imd)
1325endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001326call <SID>AddOption("iminsert", gettext("in Insert mode: 1: use :lmap; 2: use IM; 0: neither"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001327call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001328call <SID>OptionL("imi")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001329call <SID>AddOption("imstyle", gettext("input method style, 0: on-the-spot, 1: over-the-spot"))
Bram Moolenaar37c64c72017-09-19 22:06:03 +02001330call <SID>OptionG("imst", &imst)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001331call <SID>AddOption("imsearch", gettext("entering a search pattern: 1: use :lmap; 2: use IM; 0: neither"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001332call append("$", "\t" .. s:local_to_window)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001333call <SID>OptionL("ims")
1334if has("xim")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001335 call <SID>AddOption("imcmdline", gettext("when set always use IM when starting to edit a command line"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001336 call <SID>BinOptionG("imc", &imc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001337 call <SID>AddOption("imstatusfunc", gettext("function to obtain IME status"))
Bram Moolenaar14b69452013-06-29 23:05:20 +02001338 call <SID>OptionG("imsf", &imsf)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001339 call <SID>AddOption("imactivatefunc", gettext("function to enable/disable IME"))
Bram Moolenaar14b69452013-06-29 23:05:20 +02001340 call <SID>OptionG("imaf", &imaf)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001341endif
1342
1343
Bram Moolenaar14944c02020-09-11 20:51:26 +02001344call <SID>Header(gettext("multi-byte characters"))
Bram Moolenaar3132cdd2020-11-05 20:41:49 +01001345call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\",\n\"euc-jp\", \"big5\", etc."))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001346call <SID>OptionG("enc", &enc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001347call <SID>AddOption("fileencoding", gettext("character encoding for the current file"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001348call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001349call <SID>OptionL("fenc")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001350call <SID>AddOption("fileencodings", gettext("automatically detected character encodings"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001351call <SID>OptionG("fencs", &fencs)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001352call <SID>AddOption("termencoding", gettext("character encoding used by the terminal"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001353call <SID>OptionG("tenc", &tenc)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001354call <SID>AddOption("charconvert", gettext("expression used for character encoding conversion"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001355call <SID>OptionG("ccv", &ccv)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001356call <SID>AddOption("delcombine", gettext("delete combining (composing) characters on their own"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001357call <SID>BinOptionG("deco", &deco)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001358call <SID>AddOption("maxcombine", gettext("maximum number of combining (composing) characters displayed"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001359call <SID>OptionG("mco", &mco)
1360if has("xim") && has("gui_gtk")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001361 call <SID>AddOption("imactivatekey", gettext("key that activates the X input method"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001362 call <SID>OptionG("imak", &imak)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001363endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001364call <SID>AddOption("ambiwidth", gettext("width of ambiguous width characters"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001365call <SID>OptionG("ambw", &ambw)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001366call <SID>AddOption("emoji", gettext("emoji characters are full width"))
Bram Moolenaar76cbe812019-02-17 17:53:49 +01001367call <SID>BinOptionG("emo", &emo)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001368
1369
Bram Moolenaar14944c02020-09-11 20:51:26 +02001370call <SID>Header(gettext("various"))
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001371call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\", \"all\"\nand/or \"onemore\""))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001372call <SID>OptionG("ve", &ve)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001373call <SID>AddOption("eventignore", gettext("list of autocommand events which are to be ignored"))
Bram Moolenaar314dd792019-02-03 15:27:20 +01001374call <SID>OptionG("ei", &ei)
Luuk van Baalb7147f82025-02-08 18:52:39 +01001375call <SID>AddOption("eventignorewin", gettext("list of autocommand events which are to be ignored in a window"))
1376call <SID>OptionG("eiw", &eiw)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001377call <SID>AddOption("loadplugins", gettext("load plugin scripts when starting up"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001378call <SID>BinOptionG("lpl", &lpl)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001379call <SID>AddOption("exrc", gettext("enable reading .vimrc/.exrc/.gvimrc in the current directory"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001380call <SID>BinOptionG("ex", &ex)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001381call <SID>AddOption("secure", gettext("safer working with script files in the current directory"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001382call <SID>BinOptionG("secure", &secure)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001383call <SID>AddOption("gdefault", gettext("use the 'g' flag for \":substitute\""))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001384call <SID>BinOptionG("gd", &gd)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001385call <SID>AddOption("edcompatible", gettext("'g' and 'c' flags of \":substitute\" toggle"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001386call <SID>BinOptionG("ed", &ed)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001387if exists("+opendevice")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001388 call <SID>AddOption("opendevice", gettext("allow reading/writing devices"))
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001389 call <SID>BinOptionG("odev", &odev)
1390endif
1391if exists("+maxfuncdepth")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001392 call <SID>AddOption("maxfuncdepth", gettext("maximum depth of function calls"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001393 call append("$", " \tset mfd=" . &mfd)
Bram Moolenaard5ab34b2007-05-05 17:15:44 +00001394endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001395if has("mksession")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001396 call <SID>AddOption("sessionoptions", gettext("list of words that specifies what to put in a session file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001397 call <SID>OptionG("ssop", &ssop)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001398 call <SID>AddOption("viewoptions", gettext("list of words that specifies what to save for :mkview"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001399 call <SID>OptionG("vop", &vop)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001400 call <SID>AddOption("viewdir", gettext("directory where to store files with :mkview"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001401 call <SID>OptionG("vdir", &vdir)
1402endif
1403if has("viminfo")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001404 call <SID>AddOption("viminfo", gettext("list that specifies what to write in the viminfo file"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001405 call <SID>OptionG("vi", &vi)
Bram Moolenaar14944c02020-09-11 20:51:26 +02001406 call <SID>AddOption("viminfofile", gettext("file name used for the viminfo file"))
Bram Moolenaarf55e4c82017-08-01 20:44:53 +02001407 call <SID>OptionG("vif", &vif)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001408endif
1409if has("quickfix")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001410 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 +02001411 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001412 call <SID>OptionL("bh")
Bram Moolenaarcb80aa22020-10-26 21:12:46 +01001413 call <SID>AddOption("buftype", gettext("empty, \"nofile\", \"nowrite\", \"quickfix\", etc.: type of buffer"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001414 call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001415 call <SID>OptionL("bt")
1416endif
Bram Moolenaar14944c02020-09-11 20:51:26 +02001417call <SID>AddOption("buflisted", gettext("whether the buffer shows up in the buffer list"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001418call append("$", "\t" .. s:local_to_buffer)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001419call <SID>BinOptionL("bl")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001420call <SID>AddOption("debug", gettext("set to \"msg\" to see all error messages"))
Bram Moolenaar071d4272004-06-13 20:20:40 +00001421call append("$", " \tset debug=" . &debug)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001422if has("signs")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001423 call <SID>AddOption("signcolumn", gettext("whether to show the signcolumn"))
Bram Moolenaar64075b02020-09-09 12:56:30 +02001424 call append("$", "\t" .. s:local_to_window)
Bram Moolenaar95ec9d62016-08-12 18:29:59 +02001425 call <SID>OptionL("scl")
1426endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001427if has("mzscheme")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001428 call <SID>AddOption("mzquantum", gettext("interval in milliseconds between polls for MzScheme threads"))
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001429 call append("$", " \tset mzq=" . &mzq)
1430endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001431if exists("&luadll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001432 call <SID>AddOption("luadll", gettext("name of the Lua dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001433 call <SID>OptionG("luadll", &luadll)
1434endif
1435if exists("&perldll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001436 call <SID>AddOption("perldll", gettext("name of the Perl dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001437 call <SID>OptionG("perldll", &perldll)
1438endif
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01001439if has('pythonx')
Bram Moolenaar14944c02020-09-11 20:51:26 +02001440 call <SID>AddOption("pyxversion", gettext("whether to use Python 2 or 3"))
Bram Moolenaarf42dd3c2017-01-28 16:06:38 +01001441 call append("$", " \tset pyx=" . &wd)
1442endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001443if exists("&pythondll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001444 call <SID>AddOption("pythondll", gettext("name of the Python 2 dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001445 call <SID>OptionG("pythondll", &pythondll)
1446endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001447if exists("&pythonhome")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001448 call <SID>AddOption("pythonhome", gettext("name of the Python 2 home directory"))
Bram Moolenaar94073162018-01-31 21:49:05 +01001449 call <SID>OptionG("pythonhome", &pythonhome)
1450endif
Bram Moolenaard4ece232015-11-10 19:48:14 +01001451if exists("&pythonthreedll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001452 call <SID>AddOption("pythonthreedll", gettext("name of the Python 3 dynamic library"))
Bram Moolenaard4ece232015-11-10 19:48:14 +01001453 call <SID>OptionG("pythonthreedll", &pythonthreedll)
1454endif
Bram Moolenaar94073162018-01-31 21:49:05 +01001455if exists("&pythonthreehome")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001456 call <SID>AddOption("pythonthreehome", gettext("name of the Python 3 home directory"))
Bram Moolenaar94073162018-01-31 21:49:05 +01001457 call <SID>OptionG("pythonthreehome", &pythonthreehome)
1458endif
Bram Moolenaara93f9752015-11-10 20:45:09 +01001459if exists("&rubydll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001460 call <SID>AddOption("rubydll", gettext("name of the Ruby dynamic library"))
Bram Moolenaara93f9752015-11-10 20:45:09 +01001461 call <SID>OptionG("rubydll", &rubydll)
1462endif
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001463if exists("&tcldll")
Bram Moolenaar14944c02020-09-11 20:51:26 +02001464 call <SID>AddOption("tcldll", gettext("name of the Tcl dynamic library"))
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001465 call <SID>OptionG("tcldll", &tcldll)
1466endif
Bram Moolenaar01164a62017-11-02 22:58:42 +01001467if exists("&mzschemedll")
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001468 call <SID>AddOption("mzschemedll", gettext("name of the MzScheme dynamic library"))
Bram Moolenaar01164a62017-11-02 22:58:42 +01001469 call <SID>OptionG("mzschemedll", &mzschemedll)
Bram Moolenaarb5cfff02020-09-20 21:32:03 +02001470 call <SID>AddOption("mzschemegcdll", gettext("name of the MzScheme GC dynamic library"))
Bram Moolenaar01164a62017-11-02 22:58:42 +01001471 call <SID>OptionG("mzschemegcdll", &mzschemegcdll)
1472endif
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +02001473if has("tabpanel")
Christian Brabandt234c7282025-06-16 20:22:30 +02001474 call <SID>AddOption("showtabpanel", gettext("0, 1 or 2; when to use the tabpanel"))
RestorerZd6a5edd2025-07-06 20:17:36 +02001475 call <SID>OptionG("showtabpanel", &showtabpanel)
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +02001476 call <SID>AddOption("tabpanel", gettext("custom tab pages in tabpanel"))
RestorerZd6a5edd2025-07-06 20:17:36 +02001477 call <SID>OptionG("tabpanel", &tabpanel)
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +02001478 call <SID>AddOption("tabpanelopt", gettext("options for using tabpanel"))
RestorerZd6a5edd2025-07-06 20:17:36 +02001479 call <SID>OptionG("tabpanelopt", &tabpanelopt)
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +02001480endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00001481
1482set cpo&vim
1483
1484" go to first line
14851
1486
1487" reset 'modified', so that ":q" can be used to close the window
1488setlocal nomodified
1489
1490if has("syntax")
1491 " Use Vim highlighting, with some additional stuff
1492 setlocal ft=vim
1493 syn match optwinHeader "^ \=[0-9].*"
1494 syn match optwinName "^[a-z]*\t" nextgroup=optwinComment
1495 syn match optwinComment ".*" contained
1496 syn match optwinComment "^\t.*"
1497 if !exists("did_optwin_syntax_inits")
1498 let did_optwin_syntax_inits = 1
1499 hi link optwinHeader Title
1500 hi link optwinName Identifier
1501 hi link optwinComment Comment
1502 endif
1503endif
1504
1505" Install autocommands to enable mappings in option-window
1506noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR>
1507inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR>
1508noremap <silent> <buffer> <Space> :call <SID>Space()<CR>
1509
1510" Make the buffer be deleted when the window is closed.
1511setlocal buftype=nofile bufhidden=delete noswapfile
1512
1513augroup optwin
1514 au! BufUnload,BufHidden option-window nested
1515 \ call <SID>unload() | delfun <SID>unload
1516augroup END
1517
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001518func <SID>unload()
Bram Moolenaar071d4272004-06-13 20:20:40 +00001519 delfun <SID>CR
1520 delfun <SID>Space
1521 delfun <SID>Find
1522 delfun <SID>Update
1523 delfun <SID>OptionL
1524 delfun <SID>OptionG
1525 delfun <SID>BinOptionL
1526 delfun <SID>BinOptionG
1527 delfun <SID>Header
1528 au! optwin
Bram Moolenaara953b5c2020-09-10 14:25:25 +02001529endfunc
Bram Moolenaar071d4272004-06-13 20:20:40 +00001530
1531" Restore the previous value of 'title' and 'icon'.
1532let &title = s:old_title
1533let &icon = s:old_icon
1534let &ru = s:old_ru
1535let &sc = s:old_sc
1536let &cpo = s:cpo_save
Bram Moolenaar9c474b22018-02-27 17:04:25 +01001537let &ul = s:old_ul
1538unlet 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 +02001539
1540" vim: ts=8 sw=2 sts=2