2014-07-10 21:05:51 -07:00
" These commands create the option window.
"
2023-08-13 05:25:10 -07:00
" Maintainer: The Vim Project <https://github.com/vim/vim>
2023-08-30 23:22:07 -07:00
" Last Change: 2023 Aug 31
2023-08-13 05:25:10 -07:00
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
2014-07-10 21:05:51 -07:00
" If there already is an option window, jump to that one.
2018-08-24 19:06:37 -07:00
let buf = bufnr ( 'option-window' )
if buf > = 0
let winids = win_findbuf ( buf )
if len ( winids ) > 0
if win_gotoid ( winids [0 ]) = = 1
2014-07-10 21:05:51 -07:00
finish
endif
2018-08-24 19:06:37 -07:00
endif
2014-07-10 21:05:51 -07:00
endif
" Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
" not be recognized. See ":help 'cpoptions'".
let s :cpo_save = &cpo
set cpo &vim
" function to be called when <CR> is hit in the option-window
2022-10-28 07:49:20 -07:00
func < SID > CR ( )
2014-07-10 21:05:51 -07:00
" If on a continued comment line, go back to the first comment line
let lnum = search ( "^[^\t]" , 'bWcn' )
let line = getline ( lnum )
" <CR> on a "set" line executes the option line
if match ( line , "^ \tset " ) > = 0
" For a local option: go to the previous window
" If this is a help window, go to the window below it
let thiswin = winnr ( )
let local = < SID > Find ( lnum )
if local > = 0
exe line
call < SID > Update ( lnum , line , local , thiswin )
endif
" <CR> on a "option" line shows help for that option
elseif match ( line , "^[a-z]" ) > = 0
let name = substitute ( line , '\([^\t]*\).*' , '\1' , "" )
exe "help '" . name . "'"
" <CR> on an index line jumps to the group
elseif match ( line , '^ \=[0-9]' ) > = 0
exe "norm! /" . line . "\<CR>zt"
endif
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" function to be called when <Space> is hit in the option-window
2022-10-28 07:49:20 -07:00
func < SID > Space ( )
2014-07-10 21:05:51 -07:00
let lnum = line ( "." )
let line = getline ( lnum )
" <Space> on a "set" line refreshes the option line
if match ( line , "^ \tset " ) > = 0
" For a local option: go to the previous window
" If this is a help window, go to the window below it
let thiswin = winnr ( )
let local = < SID > Find ( lnum )
if local > = 0
call < SID > Update ( lnum , line , local , thiswin )
endif
endif
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
2022-10-28 07:39:03 -07:00
let s :local_to_window = gettext ( '(local to window)' )
let s :local_to_buffer = gettext ( '(local to buffer)' )
2022-10-28 08:15:44 -07:00
let s :global_or_local = gettext ( '(global or local to buffer)' )
2021-05-01 11:23:09 -07:00
2014-07-10 21:05:51 -07:00
" find the window in which the option applies
" returns 0 for global option, 1 for local option, -1 for error
2022-10-28 07:49:20 -07:00
func < SID > Find ( lnum )
2022-10-28 07:39:03 -07:00
let line = getline ( a :lnum - 1 )
if line = ~ s :local_to_window | | line = ~ s :local_to_buffer
2014-07-10 21:05:51 -07:00
let local = 1
let thiswin = winnr ( )
wincmd p
if exists ( "b:current_syntax" ) && b :current_syntax = = "help"
wincmd j
if winnr ( ) = = thiswin
wincmd j
endif
endif
else
let local = 0
endif
if local && ( winnr ( ) = = thiswin | | ( exists ( "b:current_syntax" )
\ && b :current_syntax = = "help" ) )
echo "Don't know in which window"
let local = -1
endif
return local
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Update a "set" line in the option window
2022-10-28 07:49:20 -07:00
func < SID > Update ( lnum , line , local , thiswin )
2014-07-10 21:05:51 -07:00
" get the new value of the option and update the option window line
if match ( a :line , "=" ) > = 0
let name = substitute ( a :line , '^ \tset \([^=]*\)=.*' , '\1' , "" )
else
let name = substitute ( a :line , '^ \tset \(no\)\=\([a-z]*\).*' , '\2' , "" )
endif
2023-03-12 19:29:11 -07:00
let val = escape ( eval ( '&' . name ) , " \t\\\"|" )
2014-07-10 21:05:51 -07:00
if a :local
exe a :thiswin . "wincmd w"
endif
if match ( a :line , "=" ) > = 0 | | ( val ! = "0" && val ! = "1" )
call setline ( a :lnum , " \tset " . name . "=" . val )
else
if val
call setline ( a :lnum , " \tset " . name . "\tno" . name )
else
call setline ( a :lnum , " \tset no" . name . "\t" . name )
endif
endif
set nomodified
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Reset 'title' and 'icon' to make it work faster.
2018-10-12 18:50:33 -07:00
" Reset 'undolevels' to avoid undo'ing until the buffer is empty.
2014-07-10 21:05:51 -07:00
let s :old_title = &title
let s :old_icon = &icon
let s :old_sc = &sc
let s :old_ru = &ru
2018-10-12 18:50:33 -07:00
let s :old_ul = &ul
set notitle noicon nosc noru ul = -1
2014-07-10 21:05:51 -07:00
" If the current window is a help window, try finding a non-help window.
" Relies on syntax highlighting to be switched on.
let s :thiswin = winnr ( )
while exists ( "b:current_syntax" ) && b :current_syntax = = "help"
wincmd w
if s :thiswin = = winnr ( )
break
endif
endwhile
2018-08-24 19:06:37 -07:00
" Open the window. $OPTWIN_CMD is set to "tab" for ":tab options".
exe $OPTWIN_CMD . ' new option-window'
2014-07-10 21:05:51 -07:00
setlocal ts = 15 tw = 0 noro buftype = nofile
" Insert help and a "set" command for each option.
2022-10-27 03:08:06 -07:00
call append ( 0 , gettext ( '" Each "set" line shows the current value of an option (on the left).' ) )
call append ( 1 , gettext ( '" Hit <Enter> on a "set" line to execute it.' ) )
call append ( 2 , gettext ( '" A boolean option will be toggled.' ) )
call append ( 3 , gettext ( '" For other options you can edit the value before hitting <Enter>.' ) )
call append ( 4 , gettext ( '" Hit <Enter> on a help line to open a help window on this option.' ) )
call append ( 5 , gettext ( '" Hit <Enter> on an index line to jump there.' ) )
call append ( 6 , gettext ( '" Hit <Space> on a "set" line to refresh it.' ) )
2014-07-10 21:05:51 -07:00
" These functions are called often below. Keep them fast!
2021-05-01 11:23:09 -07:00
" Add an option name and explanation. The text can contain "\n" characters
" where a line break is to be inserted.
func < SID > AddOption ( name , text )
let lines = split ( a :text , "\n" )
call append ( "$" , a :name .. "\t" .. lines [0 ])
for line in lines [1 :]
call append ( "$" , "\t" .. line )
endfor
endfunc
2014-07-10 21:05:51 -07:00
" Init a local binary option
2022-10-28 07:49:20 -07:00
func < SID > BinOptionL ( name )
2014-07-10 21:05:51 -07:00
let val = getwinvar ( winnr ( '#' ) , '&' . a :name )
call append ( "$" , substitute ( substitute ( " \tset " . val . a :name . "\t" .
\! val . a :name , "0" , "no" , "" ) , "1" , "" , "" ) )
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Init a global binary option
2022-10-28 07:49:20 -07:00
func < SID > BinOptionG ( name , val )
2014-07-10 21:05:51 -07:00
call append ( "$" , substitute ( substitute ( " \tset " . a :val . a :name . "\t" .
\! a :val . a :name , "0" , "no" , "" ) , "1" , "" , "" ) )
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Init a local string option
2022-10-28 07:49:20 -07:00
func < SID > OptionL ( name )
2014-07-10 21:05:51 -07:00
let val = escape ( getwinvar ( winnr ( '#' ) , '&' . a :name ) , " \t\\\"|" )
call append ( "$" , " \tset " . a :name . "=" . val )
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Init a global string option
2022-10-28 07:49:20 -07:00
func < SID > OptionG ( name , val )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset " . a :name . "=" . escape ( a :val , " \t\\\"|" ) )
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
let s :idx = 1
let s :lnum = line ( "$" )
call append ( "$" , "" )
2022-10-28 07:49:20 -07:00
func < SID > Header ( text )
2014-07-10 21:05:51 -07:00
let line = s :idx . " " . a :text
if s :idx < 10
let line = " " . line
endif
call append ( "$" , "" )
call append ( "$" , line )
call append ( "$" , "" )
call append ( s :lnum , line )
let s :idx = s :idx + 1
let s :lnum = s :lnum + 1
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Restore the previous value of 'cpoptions' here, it's used below.
let &cpo = s :cpo_save
" List of all options, organized by function.
" The text should be sufficient to know what the option is used for.
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "important" ) )
call < SID > AddOption ( "compatible" , gettext ( "behave very Vi compatible (not advisable)" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "cp" , &cp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cpoptions" , gettext ( "list of flags to specify Vi compatibility" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "cpo" , &cpo )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "paste" , gettext ( "paste mode, insert typed text literally" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "paste" , &paste )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "runtimepath" , gettext ( "list of directories used for runtime files and plugins" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "rtp" , &rtp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "packpath" , gettext ( "list of directories used for plugin packages" ) )
2016-04-25 20:07:51 -07:00
call < SID > OptionG ( "pp" , &pp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "helpfile" , gettext ( "name of the main help file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "hf" , &hf )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "moving around, searching and patterns" ) )
call < SID > AddOption ( "whichwrap" , gettext ( "list of flags specifying which commands wrap to another line" ) )
2022-10-28 07:48:51 -07:00
call < SID > OptionG ( "ww" , &ww )
2022-10-28 07:49:20 -07:00
call < SID > AddOption ( "startofline" , gettext ( "many jump commands move the cursor to the first non-blank\ncharacter of a line" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sol" , &sol )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "paragraphs" , gettext ( "nroff macro names that separate paragraphs" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "para" , ¶ )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "sections" , gettext ( "nroff macro names that separate sections" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sect" , § )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "path" , gettext ( "list of directory names used for file searching" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "pa" , &pa )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cdhome" , gettext ( ":cd without argument goes to the home directory" ) )
2021-12-24 20:31:54 -07:00
call < SID > BinOptionG ( "cdh" , &cdh )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cdpath" , gettext ( "list of directory names used for :cd" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "cd" , &cd )
if exists ( "+autochdir" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "autochdir" , gettext ( "change to directory of file in buffer" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "acd" , &acd )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wrapscan" , gettext ( "search commands wrap around the end of the buffer" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ws" , &ws )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "incsearch" , gettext ( "show match for partly typed search command" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "is" , &is )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "magic" , gettext ( "change the way backslashes are used in search patterns" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "magic" , &magic )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "regexpengine" , gettext ( "select the default regexp engine used" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "re" , &re )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ignorecase" , gettext ( "ignore case when using a search pattern" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ic" , &ic )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "smartcase" , gettext ( "override 'ignorecase' when pattern has upper case characters" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "scs" , &scs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "casemap" , gettext ( "what method to use for changing case of letters" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "cmp" , &cmp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "maxmempattern" , gettext ( "maximum amount of memory in Kbyte used for pattern matching" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mmp=" . &mmp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "define" , gettext ( "pattern for a macro definition line" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "def" , &def )
if has ( "find_in_path" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "include" , gettext ( "pattern for an include-file line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "inc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "includeexpr" , gettext ( "expression used to transform an include line to a file name" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "inex" )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "tags" ) )
2022-10-28 07:49:20 -07:00
call < SID > AddOption ( "tagbsearch" , gettext ( "use binary searching in tags files" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "tbs" , &tbs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "taglength" , gettext ( "number of significant characters in a tag name or zero" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset tl=" . &tl )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tags" , gettext ( "list of file names to search for tags" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "tag" , &tag )
2022-10-28 07:49:20 -07:00
call < SID > AddOption ( "tagcase" , gettext ( "how to handle case when searching in tags files:\n\"followic\" to follow 'ignorecase', \"ignore\" or \"match\"" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2016-02-16 11:24:54 -07:00
call < SID > OptionG ( "tc" , &tc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tagrelative" , gettext ( "file names in a tags file are relative to the tags file" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "tr" , &tr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tagstack" , gettext ( "a :tag command will use the tagstack" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "tgst" , &tgst )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "showfulltag" , gettext ( "when completing tags in Insert mode show more info" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sft" , &sft )
2019-10-10 14:06:45 -07:00
if has ( "eval" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tagfunc" , gettext ( "a function to be used to perform tag searches" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2019-10-10 14:06:45 -07:00
call < SID > OptionL ( "tfu" )
endif
2014-07-10 21:05:51 -07:00
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "displaying text" ) )
call < SID > AddOption ( "scroll" , gettext ( "number of lines to scroll for CTRL-U and CTRL-D" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "scr" )
2023-04-25 16:55:00 -07:00
call < SID > AddOption ( "smoothscroll" , gettext ( "scroll by screen line" ) )
call append ( "$" , "\t" .. s :local_to_window )
call < SID > BinOptionL ( "sms" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "scrolloff" , gettext ( "number of screen lines to show around the cursor" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset so=" . &so )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wrap" , gettext ( "long lines wrap" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2018-10-12 18:55:07 -07:00
call < SID > BinOptionL ( "wrap" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "linebreak" , gettext ( "wrap long lines at a character in 'breakat'" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "lbr" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "breakindent" , gettext ( "preserve indentation in wrapped text" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "bri" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "breakindentopt" , gettext ( "adjust breakindent behaviour" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "briopt" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "breakat" , gettext ( "which characters might cause a line break" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "brk" , &brk )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "showbreak" , gettext ( "string to put before wrapped screen lines" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sbr" , &sbr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "sidescroll" , gettext ( "minimal number of columns to scroll horizontally" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ss=" . &ss )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "sidescrolloff" , gettext ( "minimal number of columns to keep left and right of the cursor" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset siso=" . &siso )
2022-10-28 07:59:15 -07:00
call < 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" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "dy" , &dy )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fillchars" , gettext ( "characters to use for the status line, folds and filler lines" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "fcs" , &fcs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cmdheight" , gettext ( "number of lines used for the command-line" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ch=" . &ch )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "columns" , gettext ( "width of the display" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset co=" . &co )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "lines" , gettext ( "number of lines in the display" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset lines=" . &lines )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "window" , gettext ( "number of lines to scroll for CTRL-F and CTRL-B" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset window=" . &window )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "lazyredraw" , gettext ( "don't redraw while executing macros" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "lz" , &lz )
if has ( "reltime" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "redrawtime" , gettext ( "timeout for 'hlsearch' and :match highlighting in msec" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset rdt=" . &rdt )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "writedelay" , gettext ( "delay in msec for each char written to the display\n(for debugging)" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset wd=" . &wd )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "list" , gettext ( "show <Tab> as ^I and end-of-line as $" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "list" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "listchars" , gettext ( "list of strings used for list mode" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "lcs" , &lcs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "number" , gettext ( "show the line number for each line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "nu" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "relativenumber" , gettext ( "show the relative line number for each line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "rnu" )
if has ( "linebreak" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "numberwidth" , gettext ( "number of columns to use for the line number" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "nuw" )
endif
if has ( "conceal" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "conceallevel" , gettext ( "controls whether concealable text is hidden" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cole" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "concealcursor" , gettext ( "modes in which text in the cursor line can be concealed" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cocu" )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "syntax, highlighting and spelling" ) )
call < SID > AddOption ( "background" , gettext ( "\"dark\" or \"light\"; the background color brightness" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "bg" , &bg )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "filetype" , gettext ( "type of file; triggers the FileType event when set" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2019-07-28 18:16:37 -07:00
call < SID > OptionL ( "ft" )
2014-07-10 21:05:51 -07:00
if has ( "syntax" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "syntax" , gettext ( "name of syntax highlighting used" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "syn" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "synmaxcol" , gettext ( "maximum column to look for syntax items" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "smc" )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "highlight" , gettext ( "which highlighting to use for various occasions" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "hl" , &hl )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "hlsearch" , gettext ( "highlight all matches for the last used search pattern" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "hls" , &hls )
2016-05-01 15:34:06 -07:00
if has ( "termguicolors" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "termguicolors" , gettext ( "use GUI colors for the terminal" ) )
2016-05-01 15:34:06 -07:00
call < SID > BinOptionG ( "tgc" , &tgc )
endif
2014-07-10 21:05:51 -07:00
if has ( "syntax" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cursorcolumn" , gettext ( "highlight the screen column of the cursor" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "cuc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cursorline" , gettext ( "highlight the screen line of the cursor" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "cul" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cursorlineopt" , gettext ( "specifies which area 'cursorline' highlights" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2021-07-30 18:51:26 -07:00
call < SID > OptionL ( "culopt" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "colorcolumn" , gettext ( "columns to highlight" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spell" , gettext ( "highlight spelling mistakes" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "spell" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spelllang" , gettext ( "list of accepted languages" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "spl" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spellfile" , gettext ( "file that \"zg\" adds good words to" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "spf" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spellcapcheck" , gettext ( "pattern to locate the end of a sentence" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "spc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spelloptions" , gettext ( "flags to change how spell checking works" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2021-04-28 18:30:58 -07:00
call < SID > OptionL ( "spo" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "spellsuggest" , gettext ( "methods used to suggest corrections" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sps" , &sps )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mkspellmem" , gettext ( "amount of memory used by :mkspell before compressing" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "msm" , &msm )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "multiple windows" ) )
call < SID > AddOption ( "laststatus" , gettext ( "0, 1, 2 or 3; when to use a status line for the last window" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ls=" . &ls )
if has ( "statusline" )
2023-01-09 10:12:06 -07:00
call < SID > AddOption ( "statuscolumn" , gettext ( "custom format for the status column" ) )
call append ( "$" , "\t" .. s :local_to_window )
call < SID > OptionG ( "stc" , &stc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "statusline" , gettext ( "alternate format to be used for a status line" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "stl" , &stl )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "equalalways" , gettext ( "make all windows the same size when adding/removing windows" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ea" , &ea )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "eadirection" , gettext ( "in which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "ead" , &ead )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winheight" , gettext ( "minimal number of lines used for the current window" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset wh=" . &wh )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winminheight" , gettext ( "minimal number of lines used for any window" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset wmh=" . &wmh )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winfixheight" , gettext ( "keep the height of the window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "wfh" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winfixwidth" , gettext ( "keep the width of the window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "wfw" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winwidth" , gettext ( "minimal number of columns used for the current window" ) )
2019-07-28 18:16:37 -07:00
call append ( "$" , " \tset wiw=" . &wiw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winminwidth" , gettext ( "minimal number of columns used for any window" ) )
2019-07-28 18:16:37 -07:00
call append ( "$" , " \tset wmw=" . &wmw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "helpheight" , gettext ( "initial height of the help window" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset hh=" . &hh )
if has ( "quickfix" )
2022-10-28 07:59:15 -07:00
" call <SID>AddOption("previewpopup", gettext("use a popup window for preview"))
2019-08-02 07:41:18 -07:00
" call append("$", " \tset pvp=" . &pvp)
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "previewheight" , gettext ( "default height for the preview window" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset pvh=" . &pvh )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "previewwindow" , gettext ( "identifies the preview window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "pvw" )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "hidden" , gettext ( "don't unload a buffer when no longer shown in a window" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "hid" , &hid )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "switchbuf" , gettext ( "\"useopen\" and/or \"split\"; which window to use when jumping\nto a buffer" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "swb" , &swb )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "splitbelow" , gettext ( "a new window is put below the current one" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sb" , &sb )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "splitkeep" , gettext ( "determines scroll behavior for split windows" ) )
2023-08-30 23:22:07 -07:00
call < SID > OptionG ( "spk" , &spk )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "splitright" , gettext ( "a new window is put right of the current one" ) )
2019-07-28 18:16:37 -07:00
call < SID > BinOptionG ( "spr" , &spr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "scrollbind" , gettext ( "this window scrolls together with other bound windows" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2019-07-28 18:16:37 -07:00
call < SID > BinOptionL ( "scb" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "scrollopt" , gettext ( "\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "sbo" , &sbo )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cursorbind" , gettext ( "this window's cursor moves together with other bound windows" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2019-07-28 18:16:37 -07:00
call < SID > BinOptionL ( "crb" )
2017-11-06 17:38:06 -07:00
if has ( "terminal" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "termsize" , gettext ( "size of a terminal window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2017-11-06 17:38:06 -07:00
call < SID > OptionL ( "tms" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "termkey" , gettext ( "key that precedes Vim commands in a terminal window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2017-11-06 17:38:06 -07:00
call < SID > OptionL ( "tk" )
endif
2014-07-10 21:05:51 -07:00
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "multiple tab pages" ) )
call < SID > AddOption ( "showtabline" , gettext ( "0, 1 or 2; when to use a tab pages line" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset stal=" . &stal )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tabpagemax" , gettext ( "maximum number of tab pages to open for -p and \"tab all\"" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset tpm=" . &tpm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tabline" , gettext ( "custom tab pages line" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "tal" , &tal )
if has ( "gui" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guitablabel" , gettext ( "custom tab page label for the GUI" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gtl" , >l )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guitabtooltip" , gettext ( "custom tab page tooltip for the GUI" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gtt" , >t )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "terminal" ) )
call < SID > AddOption ( "scrolljump" , gettext ( "minimal number of lines to scroll at a time" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset sj=" . &sj )
if has ( "gui" ) | | has ( "msdos" ) | | has ( "win32" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guicursor" , gettext ( "specifies what the cursor looks like in different modes" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gcr" , &gcr )
endif
if has ( "title" )
let &title = s :old_title
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "title" , gettext ( "show info in the window title" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "title" , &title )
set notitle
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "titlelen" , gettext ( "percentage of 'columns' used for the window title" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset titlelen=" . &titlelen )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "titlestring" , gettext ( "when not empty, string to be used for the window title" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "titlestring" , &titlestring )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "titleold" , gettext ( "string to restore the title to when exiting Vim" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "titleold" , &titleold )
let &icon = s :old_icon
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "icon" , gettext ( "set the text of the icon for this window" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "icon" , &icon )
set noicon
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "iconstring" , gettext ( "when not empty, text for the icon of this window" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "iconstring" , &iconstring )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "using the mouse" ) )
call < SID > AddOption ( "mouse" , gettext ( "list of flags for using the mouse" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "mouse" , &mouse )
if has ( "gui" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mousefocus" , gettext ( "the window with the mouse pointer becomes the current one" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "mousef" , &mousef )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mousehide" , gettext ( "hide the mouse pointer while typing" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "mh" , &mh )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mousemodel" , gettext ( "\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "mousem" , &mousem )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mousetime" , gettext ( "maximum time in msec to recognize a double-click" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mouset=" . &mouset )
if has ( "mouseshape" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "mouseshape" , gettext ( "what the mouse pointer looks like in different modes" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "mouses" , &mouses )
endif
if has ( "gui" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "GUI" ) )
call < SID > AddOption ( "guifont" , gettext ( "list of font names to be used in the GUI" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gfn" , &gfn )
if has ( "xfontset" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guifontset" , gettext ( "pair of fonts to be used, for multibyte editing" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gfs" , &gfs )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guifontwide" , gettext ( "list of font names to be used for double-wide characters" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gfw" , &gfw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "guioptions" , gettext ( "list of flags that specify how the GUI works" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "go" , &go )
if has ( "gui_gtk" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "toolbar" , gettext ( "\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "tb" , &tb )
if has ( "gui_gtk2" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "toolbariconsize" , gettext ( "size of toolbar icons" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "tbis" , &tbis )
endif
endif
if has ( "browse" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "browsedir" , gettext ( "\"last\", \"buffer\" or \"current\": which directory used for the file browser" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "bsdir" , &bsdir )
endif
if has ( "multi_lang" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "langmenu" , gettext ( "language to be used for the menus" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "langmenu" , &lm )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "menuitems" , gettext ( "maximum number of items in one menu" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mis=" . &mis )
if has ( "winaltkeys" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "winaltkeys" , gettext ( "\"no\", \"yes\" or \"menu\"; how to use the ALT key" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "wak" , &wak )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "linespace" , gettext ( "number of pixel lines to use between characters" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset lsp=" . &lsp )
2018-10-28 05:44:08 -07:00
if has ( "balloon_eval" ) | | has ( "balloon_eval_term" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "balloondelay" , gettext ( "delay in milliseconds before a balloon may pop up" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset bdlay=" . &bdlay )
2018-10-28 05:44:08 -07:00
if has ( "balloon_eval" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ballooneval" , gettext ( "use balloon evaluation in the GUI" ) )
2018-10-28 05:44:08 -07:00
call < SID > BinOptionG ( "beval" , &beval )
endif
if has ( "balloon_eval_term" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "balloonevalterm" , gettext ( "use balloon evaluation in the terminal" ) )
2018-10-28 05:44:08 -07:00
call < SID > BinOptionG ( "bevalterm" , &beval )
endif
2014-07-10 21:05:51 -07:00
if has ( "eval" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "balloonexpr" , gettext ( "expression to show in balloon eval" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset bexpr=" . &bexpr )
endif
endif
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "messages and info" ) )
call < SID > AddOption ( "terse" , gettext ( "add 's' flag in 'shortmess' (don't show search message)" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "terse" , &terse )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shortmess" , gettext ( "list of flags to make messages shorter" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "shm" , &shm )
2023-01-01 07:00:39 -07:00
call < SID > AddOption ( "showcmd" , gettext ( "show (partial) command keys in location given by 'showcmdloc'" ) )
2014-07-10 21:05:51 -07:00
let &sc = s :old_sc
call < SID > BinOptionG ( "sc" , &sc )
set nosc
2023-01-01 07:00:39 -07:00
call < SID > AddOption ( "showcmdloc" , gettext ( "location where to show the (partial) command keys for 'showcmd'" ) )
call < SID > OptionG ( "sloc" , &sloc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "showmode" , gettext ( "display the current mode in the status line" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "smd" , &smd )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ruler" , gettext ( "show cursor position below each window" ) )
2014-07-10 21:05:51 -07:00
let &ru = s :old_ru
call < SID > BinOptionG ( "ru" , &ru )
set noru
if has ( "statusline" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "rulerformat" , gettext ( "alternate format to be used for the ruler" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ruf" , &ruf )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "report" , gettext ( "threshold for reporting number of changed lines" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset report=" . &report )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "verbose" , gettext ( "the higher the more messages are given" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset vbs=" . &vbs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "verbosefile" , gettext ( "file to write messages in" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "vfile" , &vfile )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "more" , gettext ( "pause listings when the screen is full" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "more" , &more )
if has ( "dialog_con" ) | | has ( "dialog_gui" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "confirm" , gettext ( "start a dialog when a command fails" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "cf" , &cf )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "errorbells" , gettext ( "ring the bell for error messages" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "eb" , &eb )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "visualbell" , gettext ( "use a visual bell instead of beeping" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "vb" , &vb )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "belloff" , gettext ( "do not ring the bell for these reasons" ) )
2016-03-29 07:04:54 -07:00
call < SID > OptionG ( "belloff" , &belloff )
2014-07-10 21:05:51 -07:00
if has ( "multi_lang" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "helplang" , gettext ( "list of preferred languages for finding help" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "hlg" , &hlg )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "selecting text" ) )
call < SID > AddOption ( "selection" , gettext ( "\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sel" , &sel )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "selectmode" , gettext ( "\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode\ninstead of Visual mode" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "slm" , &slm )
if has ( "clipboard" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "clipboard" , gettext ( "\"unnamed\" to use the * register like unnamed register\n\"autoselect\" to always put selected text on the clipboard" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "cb" , &cb )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "keymodel" , gettext ( "\"startsel\" and/or \"stopsel\"; what special keys can do" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "km" , &km )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "editing text" ) )
call < SID > AddOption ( "undolevels" , gettext ( "maximum number of changes that can be undone" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2018-10-12 18:50:33 -07:00
call append ( "$" , " \tset ul=" . s :old_ul )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "undofile" , gettext ( "automatically save and restore undo history" ) )
2016-10-04 07:15:16 -07:00
call < SID > BinOptionG ( "udf" , &udf )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "undodir" , gettext ( "list of directories for undo files" ) )
2016-10-04 07:15:16 -07:00
call < SID > OptionG ( "udir" , &udir )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "undoreload" , gettext ( "maximum number lines to save for undo on a buffer reload" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ur=" . &ur )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "modified" , gettext ( "changes have been made and not written to a file" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "mod" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "readonly" , gettext ( "buffer is not to be written" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "ro" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "modifiable" , gettext ( "changes to the text are possible" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "ma" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "textwidth" , gettext ( "line length above which to break a line" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "tw" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wrapmargin" , gettext ( "margin from the right in which to break a line" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "wm" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backspace" , gettext ( "specifies what <BS>, CTRL-W, etc. can do in Insert mode" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset bs=" . &bs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "comments" , gettext ( "definition of what comment lines look like" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "com" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "formatoptions" , gettext ( "list of flags that tell how automatic formatting works" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fo" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "formatlistpat" , gettext ( "pattern to recognize a numbered list" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "flp" )
if has ( "eval" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "formatexpr" , gettext ( "expression used for \"gq\" to format lines" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fex" )
endif
if has ( "insert_expand" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "complete" , gettext ( "specifies how Insert mode completion works for CTRL-N and CTRL-P" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cpt" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "completeopt" , gettext ( "whether to use a popup menu for Insert mode completion" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "cot" , &cot )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "pumheight" , gettext ( "maximum height of the popup menu" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ph" , &ph )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "pumwidth" , gettext ( "minimum width of the popup menu" ) )
2022-10-28 07:39:03 -07:00
call < SID > OptionG ( "pw" , &pw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "completefunc" , gettext ( "user defined function for Insert mode completion" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cfu" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "omnifunc" , gettext ( "function for filetype-specific Insert mode completion" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "ofu" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "dictionary" , gettext ( "list of dictionary files for keyword completion" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "dict" , &dict )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "thesaurus" , gettext ( "list of thesaurus files for keyword completion" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "tsr" , &tsr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "thesaurusfunc" , gettext ( "function used for thesaurus completion" ) )
call append ( "$" , "\t" .. s :global_or_local )
call < SID > OptionG ( "tsrfu" , &tsrfu )
2014-07-10 21:05:51 -07:00
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "infercase" , gettext ( "adjust case of a keyword completion match" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "inf" )
if has ( "digraphs" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "digraph" , gettext ( "enable entering digraphs with c1 <BS> c2" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "dg" , &dg )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "tildeop" , gettext ( "the \"~\" command behaves like an operator" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "top" , &top )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "operatorfunc" , gettext ( "function called for the \"g@\" operator" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "opfunc" , &opfunc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "showmatch" , gettext ( "when inserting a bracket, briefly jump to its match" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sm" , &sm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "matchtime" , gettext ( "tenth of a second to show a match for 'showmatch'" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mat=" . &mat )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "matchpairs" , gettext ( "list of pairs that match for the \"%\" command" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "mps" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "joinspaces" , gettext ( "use two spaces after '.' when joining a line" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "js" , &js )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "nrformats" , gettext ( "\"alpha\", \"octal\", \"hex\", \"bin\" and/or \"unsigned\"; number formats\nrecognized for CTRL-A and CTRL-X commands" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "nf" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "tabs and indenting" ) )
call < SID > AddOption ( "tabstop" , gettext ( "number of spaces a <Tab> in the text stands for" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "ts" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shiftwidth" , gettext ( "number of spaces used for each step of (auto)indent" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "sw" )
2021-02-13 12:06:37 -07:00
if has ( "vartabs" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "vartabstop" , gettext ( "list of number of spaces a tab counts for" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2021-02-13 12:06:37 -07:00
call < SID > OptionL ( "vts" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "varsofttabstop" , gettext ( "list of number of spaces a soft tabsstop counts for" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2021-02-13 12:06:37 -07:00
call < SID > OptionL ( "vsts" )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "smarttab" , gettext ( "a <Tab> in an indent inserts 'shiftwidth' spaces" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sta" , &sta )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "softtabstop" , gettext ( "if non-zero, number of spaces to insert for a <Tab>" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "sts" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shiftround" , gettext ( "round to 'shiftwidth' for \"<<\" and \">>\"" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "sr" , &sr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "expandtab" , gettext ( "expand <Tab> to spaces in Insert mode" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "et" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "autoindent" , gettext ( "automatically set the indent of a new line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "ai" )
if has ( "smartindent" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "smartindent" , gettext ( "do clever autoindenting" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "si" )
endif
if has ( "cindent" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cindent" , gettext ( "enable specific indenting for C code" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "cin" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cinoptions" , gettext ( "options for C-indenting" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cino" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cinkeys" , gettext ( "keys that trigger C-indenting in Insert mode" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cink" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cinwords" , gettext ( "list of words that cause more C-indent" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cinw" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cinscopedecls" , gettext ( "list of scope declaration names used by cino-g" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2022-04-07 07:14:02 -07:00
call < SID > OptionL ( "cinsd" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "indentexpr" , gettext ( "expression used to obtain the indent of a line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "inde" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "indentkeys" , gettext ( "keys that trigger indenting with 'indentexpr' in Insert mode" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "indk" )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "copyindent" , gettext ( "copy whitespace for indenting from previous line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "ci" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "preserveindent" , gettext ( "preserve kind of whitespace when changing indent" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "pi" )
if has ( "lispindent" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "lisp" , gettext ( "enable lisp mode" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "lisp" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "lispwords" , gettext ( "words that change how lisp indenting works" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "lw" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "lispoptions" , gettext ( "options for Lisp indenting" ) )
2022-10-16 23:19:48 -07:00
call < SID > OptionL ( "lop" )
2014-07-10 21:05:51 -07:00
endif
if has ( "folding" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "folding" ) )
call < SID > AddOption ( "foldenable" , gettext ( "unset to display all folds open" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "fen" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldlevel" , gettext ( "folds with a level higher than this number will be closed" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdl" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldlevelstart" , gettext ( "value for 'foldlevel' when starting to edit a file" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset fdls=" . &fdls )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldcolumn" , gettext ( "width of the column used to indicate folds" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldtext" , gettext ( "expression used to display the text of a closed fold" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdt" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldclose" , gettext ( "set to \"all\" to close a fold when the cursor leaves it" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "fcl" , &fcl )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldopen" , gettext ( "specifies for which commands a fold will be opened" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "fdo" , &fdo )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldminlines" , gettext ( "minimum number of screen lines for a fold to be closed" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fml" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "commentstring" , gettext ( "template for comments; used to put the marker in" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "cms" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldmethod" , gettext ( "folding type: \"manual\", \"indent\", \"expr\", \"marker\",\n\"syntax\" or \"diff\"" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdm" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldexpr" , gettext ( "expression used when 'foldmethod' is \"expr\"" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fde" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldignore" , gettext ( "used to ignore lines when 'foldmethod' is \"indent\"" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdi" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldmarker" , gettext ( "markers used when 'foldmethod' is \"marker\"" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fmr" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "foldnestmax" , gettext ( "maximum fold depth for when 'foldmethod' is \"indent\" or \"syntax\"" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "fdn" )
endif
if has ( "diff" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "diff mode" ) )
call < SID > AddOption ( "diff" , gettext ( "use diff mode for the current window" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "diff" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "diffopt" , gettext ( "options for using diff mode" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "dip" , &dip )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "diffexpr" , gettext ( "expression used to obtain a diff file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "dex" , &dex )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "patchexpr" , gettext ( "expression used to patch a file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "pex" , &pex )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "mapping" ) )
call < SID > AddOption ( "maxmapdepth" , gettext ( "maximum depth of mapping" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mmd=" . &mmd )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "timeout" , gettext ( "allow timing out halfway into a mapping" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "to" , &to )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ttimeout" , gettext ( "allow timing out halfway into a key code" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ttimeout" , &ttimeout )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "timeoutlen" , gettext ( "time in msec for 'timeout'" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset tm=" . &tm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ttimeoutlen" , gettext ( "time in msec for 'ttimeout'" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ttm=" . &ttm )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "reading and writing files" ) )
call < SID > AddOption ( "modeline" , gettext ( "enable using settings from modelines when reading a file" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "ml" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "modelineexpr" , gettext ( "allow setting expression options from a modeline" ) )
2019-08-01 21:29:23 -07:00
call < SID > BinOptionG ( "mle" , &mle )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "modelines" , gettext ( "number of lines to check for modelines" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mls=" . &mls )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "binary" , gettext ( "binary file editing" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "bin" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "endofline" , gettext ( "last line in the file has an end-of-line" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "eol" )
2022-10-28 18:03:15 -07:00
call < SID > AddOption ( "endoffile" , gettext ( "last line in the file followed by CTRL-Z" ) )
call append ( "$" , "\t" .. s :local_to_buffer )
call < SID > BinOptionL ( "eof" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fixendofline" , gettext ( "fixes missing end-of-line at end of text file" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2015-10-08 11:17:25 -07:00
call < SID > BinOptionL ( "fixeol" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "bomb" , gettext ( "prepend a Byte Order Mark to the file" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2022-08-05 17:29:57 -07:00
call < SID > BinOptionL ( "bomb" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fileformat" , gettext ( "end-of-line format: \"dos\", \"unix\" or \"mac\"" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "ff" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fileformats" , gettext ( "list of file formats to look for when editing a file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ffs" , &ffs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "write" , gettext ( "writing files is allowed" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "write" , &write )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "writebackup" , gettext ( "write a backup file before overwriting a file" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "wb" , &wb )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backup" , gettext ( "keep a backup after overwriting a file" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "bk" , &bk )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backupskip" , gettext ( "patterns that specify for which files a backup is not made" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset bsk=" . &bsk )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backupcopy" , gettext ( "whether to make the backup as a copy or rename the existing file" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset bkc=" . &bkc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backupdir" , gettext ( "list of directories to put backup files in" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "bdir" , &bdir )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "backupext" , gettext ( "file name extension for the backup file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "bex" , &bex )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "autowrite" , gettext ( "automatically write a file when leaving a modified buffer" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "aw" , &aw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "autowriteall" , gettext ( "as 'autowrite', but works with more commands" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "awa" , &awa )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "writeany" , gettext ( "always write without asking for confirmation" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "wa" , &wa )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "autoread" , gettext ( "automatically read a file when it was modified outside of Vim" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ar" , &ar )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "patchmode" , gettext ( "keep oldest version of a file; specifies file name extension" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "pm" , &pm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fsync" , gettext ( "forcibly sync the file to disk after writing it" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "fs" , &fs )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "the swap file" ) )
call < SID > AddOption ( "directory" , gettext ( "list of directories for the swap file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "dir" , &dir )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "swapfile" , gettext ( "use a swap file for this buffer" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "swf" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "updatecount" , gettext ( "number of characters typed to cause a swap file update" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset uc=" . &uc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "updatetime" , gettext ( "time in msec after which the swap file will be updated" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset ut=" . &ut )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "command line editing" ) )
call < SID > AddOption ( "history" , gettext ( "how many command lines are remembered" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset hi=" . &hi )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildchar" , gettext ( "key that triggers command-line expansion" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset wc=" . &wc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildcharm" , gettext ( "like 'wildchar' but can also be used in a mapping" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset wcm=" . &wcm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildmode" , gettext ( "specifies how command line completion works" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "wim" , &wim )
if has ( "wildoptions" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildoptions" , gettext ( "empty or \"tagfile\" to list file name of matching tags" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "wop" , &wop )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "suffixes" , gettext ( "list of file name extensions that have a lower priority" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "su" , &su )
if has ( "file_in_path" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "suffixesadd" , gettext ( "list of file name extensions added when searching for a file" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "sua" )
endif
if has ( "wildignore" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildignore" , gettext ( "list of patterns to ignore files for file name completion" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "wig" , &wig )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fileignorecase" , gettext ( "ignore case when using file names" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "fic" , &fic )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildignorecase" , gettext ( "ignore case when completing file names" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "wic" , &wic )
if has ( "wildmenu" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "wildmenu" , gettext ( "command-line completion shows a list of matches" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "wmnu" , &wmnu )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cedit" , gettext ( "key used to open the command-line window" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "cedit" , &cedit )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "cmdwinheight" , gettext ( "height of the command-line window" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "cwh" , &cwh )
2014-07-10 21:05:51 -07:00
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "executing external commands" ) )
call < SID > AddOption ( "shell" , gettext ( "name of the shell program used for external commands" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sh" , &sh )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellquote" , gettext ( "character(s) to enclose a shell command in" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "shq" , &shq )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellxquote" , gettext ( "like 'shellquote' but include the redirection" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sxq" , &sxq )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellxescape" , gettext ( "characters to escape when 'shellxquote' is (" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sxe" , &sxe )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellcmdflag" , gettext ( "argument for 'shell' to execute a command" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "shcf" , &shcf )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellredir" , gettext ( "used to redirect command output to a file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "srr" , &srr )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shelltemp" , gettext ( "use a temp file for shell commands instead of using a pipe" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "stmp" , &stmp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "equalprg" , gettext ( "program used for \"=\" command" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ep" , &ep )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "formatprg" , gettext ( "program used to format lines with \"gq\" command" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "fp" , &fp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "keywordprg" , gettext ( "program used for the \"K\" command" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "kp" , &kp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "warn" , gettext ( "warn when using a shell command and a buffer has changes" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "warn" , &warn )
if has ( "quickfix" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "running make and jumping to errors (quickfix)" ) )
call < SID > AddOption ( "errorfile" , gettext ( "name of the file that contains error messages" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ef" , &ef )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "errorformat" , gettext ( "list of formats for error messages" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "efm" , &efm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "makeprg" , gettext ( "program used for the \":make\" command" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "mp" , &mp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "shellpipe" , gettext ( "string used to put the output of \":make\" in the error file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "sp" , &sp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "makeef" , gettext ( "name of the errorfile for the 'makeprg' command" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "mef" , &mef )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "grepprg" , gettext ( "program used for the \":grep\" command" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gp" , &gp )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "grepformat" , gettext ( "list of formats for output of 'grepprg'" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "gfm" , &gfm )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "makeencoding" , gettext ( "encoding of the \":make\" and \":grep\" output" ) )
2022-10-28 08:15:44 -07:00
call append ( "$" , "\t" .. s :global_or_local )
2018-01-28 14:53:53 -07:00
call < SID > OptionG ( "menc" , &menc )
2014-07-10 21:05:51 -07:00
endif
2021-05-01 11:23:09 -07:00
if has ( "win32" )
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "system specific" ) )
call < SID > AddOption ( "shellslash" , gettext ( "use forward slashes in file names; for Unix-like shells" ) )
2021-05-01 11:23:09 -07:00
call < SID > BinOptionG ( "ssl" , &ssl )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "completeslash" , gettext ( "specifies slash/backslash used for completion" ) )
2021-05-01 11:23:09 -07:00
call < SID > OptionG ( "csl" , &csl )
2014-07-10 21:05:51 -07:00
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "language specific" ) )
call < SID > AddOption ( "isfname" , gettext ( "specifies the characters in a file name" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "isf" , &isf )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "isident" , gettext ( "specifies the characters in an identifier" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "isi" , &isi )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "iskeyword" , gettext ( "specifies the characters in a keyword" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "isk" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "isprint" , gettext ( "specifies printable characters" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "isp" , &isp )
if has ( "textobjects" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "quoteescape" , gettext ( "specifies escape characters in a string" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "qe" )
endif
if has ( "rightleft" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "rightleft" , gettext ( "display the buffer right-to-left" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "rl" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "rightleftcmd" , gettext ( "when to edit the command-line right-to-left" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "rlc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "revins" , gettext ( "insert characters backwards" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ri" , &ri )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "allowrevins" , gettext ( "allow CTRL-_ in Insert and Command-line mode to toggle 'revins'" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ari" , &ari )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "aleph" , gettext ( "the ASCII code for the first letter of the Hebrew alphabet" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset al=" . &al )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "hkmap" , gettext ( "use Hebrew keyboard mapping" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "hk" , &hk )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "hkmapp" , gettext ( "use phonetic Hebrew keyboard mapping" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "hkp" , &hkp )
endif
if has ( "arabic" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "arabic" , gettext ( "prepare for editing Arabic text" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "arab" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "arabicshape" , gettext ( "perform shaping of Arabic characters" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "arshape" , &arshape )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "termbidi" , gettext ( "terminal will perform bidi handling" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "tbidi" , &tbidi )
endif
if has ( "keymap" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "keymap" , gettext ( "name of a keyboard mapping" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "kmp" )
endif
if has ( "langmap" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "langmap" , gettext ( "list of characters that are translated in Normal mode" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "lmap" , &lmap )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "langremap" , gettext ( "apply 'langmap' to mapped characters" ) )
2017-04-16 08:42:41 -07:00
call < SID > BinOptionG ( "lrm" , &lrm )
2014-07-10 21:05:51 -07:00
endif
if has ( "xim" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imdisable" , gettext ( "when set never use IM; overrules following IM options" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "imd" , &imd )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "iminsert" , gettext ( "in Insert mode: 1: use :lmap; 2: use IM; 0: neither" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "imi" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imsearch" , gettext ( "entering a search pattern: 1: use :lmap; 2: use IM; 0: neither" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "ims" )
if has ( "xim" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imcmdline" , gettext ( "when set always use IM when starting to edit a command line" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "imc" , &imc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imstatusfunc" , gettext ( "function to obtain IME status" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "imsf" , &imsf )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imactivatefunc" , gettext ( "function to enable/disable IME" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "imaf" , &imaf )
endif
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "multi-byte characters" ) )
call < SID > AddOption ( "encoding" , gettext ( "character encoding used in Nvim: \"utf-8\"" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "enc" , &enc )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fileencoding" , gettext ( "character encoding for the current file" ) )
2022-08-05 17:29:57 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
call < SID > OptionL ( "fenc" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "fileencodings" , gettext ( "automatically detected character encodings" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "fencs" , &fencs )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "charconvert" , gettext ( "expression used for character encoding conversion" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "ccv" , &ccv )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "delcombine" , gettext ( "delete combining (composing) characters on their own" ) )
2022-08-05 17:29:57 -07:00
call < SID > BinOptionG ( "deco" , &deco )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "maxcombine" , gettext ( "maximum number of combining (composing) characters displayed" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "mco" , &mco )
if has ( "xim" ) && has ( "gui_gtk" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "imactivatekey" , gettext ( "key that activates the X input method" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "imak" , &imak )
2014-07-10 21:05:51 -07:00
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "ambiwidth" , gettext ( "width of ambiguous width characters" ) )
2022-08-05 17:29:57 -07:00
call < SID > OptionG ( "ambw" , &ambw )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "emoji" , gettext ( "emoji characters are full width" ) )
2022-08-05 17:29:57 -07:00
call < SID > BinOptionG ( "emo" , &emo )
2014-07-10 21:05:51 -07:00
2022-10-28 07:59:15 -07:00
call < SID > Header ( gettext ( "various" ) )
call < SID > AddOption ( "virtualedit" , gettext ( "when to use virtual editing: \"block\", \"insert\", \"all\"\nand/or \"onemore\"" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "ve" , &ve )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "eventignore" , gettext ( "list of autocommand events which are to be ignored" ) )
2019-07-28 18:16:37 -07:00
call < SID > OptionG ( "ei" , &ei )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "loadplugins" , gettext ( "load plugin scripts when starting up" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "lpl" , &lpl )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "exrc" , gettext ( "enable reading .vimrc/.exrc/.gvimrc in the current directory" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "ex" , &ex )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "secure" , gettext ( "safer working with script files in the current directory" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "secure" , &secure )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "gdefault" , gettext ( "use the 'g' flag for \":substitute\"" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "gd" , &gd )
if exists ( "+opendevice" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "opendevice" , gettext ( "allow reading/writing devices" ) )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionG ( "odev" , &odev )
endif
if exists ( "+maxfuncdepth" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "maxfuncdepth" , gettext ( "maximum depth of function calls" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset mfd=" . &mfd )
endif
if has ( "mksession" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "sessionoptions" , gettext ( "list of words that specifies what to put in a session file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "ssop" , &ssop )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "viewoptions" , gettext ( "list of words that specifies what to save for :mkview" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "vop" , &vop )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "viewdir" , gettext ( "directory where to store files with :mkview" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "vdir" , &vdir )
endif
2015-07-05 16:16:05 -07:00
if has ( "shada" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "viminfo" , gettext ( "list that specifies what to write in the ShaDa file" ) )
2014-07-10 21:05:51 -07:00
call < SID > OptionG ( "vi" , &vi )
endif
if has ( "quickfix" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "bufhidden" , gettext ( "what happens with a buffer when it's no longer in a window" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "bh" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "buftype" , gettext ( "empty, \"nofile\", \"nowrite\", \"quickfix\", etc.: type of buffer" ) )
2021-05-01 11:23:09 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > OptionL ( "bt" )
endif
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "buflisted" , gettext ( "whether the buffer shows up in the buffer list" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_buffer )
2014-07-10 21:05:51 -07:00
call < SID > BinOptionL ( "bl" )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "debug" , gettext ( "set to \"msg\" to see all error messages" ) )
2014-07-10 21:05:51 -07:00
call append ( "$" , " \tset debug=" . &debug )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "signcolumn" , gettext ( "whether to show the signcolumn" ) )
2022-10-28 07:39:03 -07:00
call append ( "$" , "\t" .. s :local_to_window )
2016-10-29 17:04:13 -07:00
call < SID > OptionL ( "scl" )
2014-07-10 21:05:51 -07:00
set cpo &vim
" go to first line
1
" reset 'modified', so that ":q" can be used to close the window
setlocal nomodified
if has ( "syntax" )
" Use Vim highlighting, with some additional stuff
setlocal ft = vim
syn match optwinHeader "^ \=[0-9].*"
syn match optwinName "^[a-z]*\t" nextgroup = optwinComment
syn match optwinComment ".*" contained
syn match optwinComment "^\t.*"
if ! exists ( "did_optwin_syntax_inits" )
let did_optwin_syntax_inits = 1
hi link optwinHeader Title
hi link optwinName Identifier
hi link optwinComment Comment
endif
endif
2017-11-07 12:43:11 -07:00
if exists ( "&mzschemedll" )
2022-10-28 08:15:44 -07:00
call < SID > AddOption ( "mzschemedll" , gettext ( "name of the MzScheme dynamic library" ) )
2017-11-07 12:43:11 -07:00
call < SID > OptionG ( "mzschemedll" , &mzschemedll )
2022-10-28 08:15:44 -07:00
call < SID > AddOption ( "mzschemegcdll" , gettext ( "name of the MzScheme GC dynamic library" ) )
2017-11-07 12:43:11 -07:00
call < SID > OptionG ( "mzschemegcdll" , &mzschemegcdll )
endif
2019-01-02 06:51:03 -07:00
if has ( 'pythonx' )
2022-10-28 07:59:15 -07:00
call < SID > AddOption ( "pyxversion" , gettext ( "whether to use Python 2 or 3" ) )
2019-01-02 06:51:03 -07:00
call append ( "$" , " \tset pyx=" . &wd )
endif
2014-07-10 21:05:51 -07:00
" Install autocommands to enable mappings in option-window
noremap < silent > < buffer > < CR > < C - \> < C - N > :call < SID > CR ( ) < CR >
inoremap < silent > < buffer > < CR > < Esc > :call < SID > CR ( ) < CR >
noremap < silent > < buffer > < Space > :call < SID > Space ( ) < CR >
" Make the buffer be deleted when the window is closed.
setlocal buftype = nofile bufhidden = delete noswapfile
augroup optwin
au ! BufUnload , BufHidden option - window nested
\ call < SID > unload ( ) | delfun < SID > unload
augroup END
2022-10-28 07:49:20 -07:00
func < SID > unload ( )
2014-07-10 21:05:51 -07:00
delfun < SID > CR
delfun < SID > Space
delfun < SID > Find
delfun < SID > Update
delfun < SID > OptionL
delfun < SID > OptionG
delfun < SID > BinOptionL
delfun < SID > BinOptionG
delfun < SID > Header
au ! optwin
2022-10-28 07:49:20 -07:00
endfunc
2014-07-10 21:05:51 -07:00
" Restore the previous value of 'title' and 'icon'.
let &title = s :old_title
let &icon = s :old_icon
let &ru = s :old_ru
let &sc = s :old_sc
let &cpo = s :cpo_save
2018-10-12 18:50:33 -07:00
let &ul = s :old_ul
unlet s :old_title s :old_icon s :old_ru s :old_sc s :cpo_save s :idx s :lnum s :old_ul
2014-07-10 21:05:51 -07:00
" vim: ts=8 sw=2 sts=2