-*options.txt* For Vim version 9.2. Last change: 2026 Mar 29
+*options.txt* For Vim version 9.2. Last change: 2026 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
Note: The match limit takes effect only during forward completion
(CTRL-N) and is ignored during backward completion (CTRL-P).
+ This option cannot be set in a modeline when 'modelineexpr' is off.
+
*'completefunc'* *'cfu'*
'completefunc' 'cfu' string (default: empty)
local to buffer
You can include a line break. Simplest method is to use |:let|: >
:let &guitabtooltip = "line one\nline two"
<
+ This option cannot be set in a modeline when 'modelineexpr' is off.
*'helpfile'* *'hf'*
'helpfile' 'hf' string (default (MS-Windows) "$VIMRUNTIME\doc\help.txt"
The format of the header produced in |:hardcopy| output.
See |pheader-option|.
+ This option cannot be set in a modeline when 'modelineexpr' is off.
+
*'printmbcharset'* *'pmbcs'*
'printmbcharset' 'pmbcs' string (default "")
global
func Test_modeline_fails_modelineexpr()
call s:modeline_fails('balloonexpr', 'balloonexpr=Something()', 'E992:')
+ call s:modeline_fails('complete', "complete=FSomething", 'E992:')
call s:modeline_fails('foldexpr', 'foldexpr=Something()', 'E992:')
call s:modeline_fails('foldtext', 'foldtext=Something()', 'E992:')
call s:modeline_fails('formatexpr', 'formatexpr=Something()', 'E992:')
call s:modeline_fails('guitablabel', 'guitablabel=Something()', 'E992:')
+ call s:modeline_fails('guitabtooltip', 'guitabtooltip=Something()', 'E992:')
call s:modeline_fails('iconstring', 'iconstring=Something()', 'E992:')
call s:modeline_fails('includeexpr', 'includeexpr=Something()', 'E992:')
call s:modeline_fails('indentexpr', 'indentexpr=Something()', 'E992:')
+ call s:modeline_fails('printheader', 'printheader=Something()', 'E992:')
call s:modeline_fails('rulerformat', 'rulerformat=Something()', 'E992:')
call s:modeline_fails('statusline', 'statusline=Something()', 'E992:')
call s:modeline_fails('tabline', 'tabline=Something()', 'E992:')
set equalalways&
endfunc
-func Test_modeline_forbidden()
- let tempfile = tempname()
- let lines =<< trim END
- some test text for completion
- vim: set complete=F{->system('touch_should_not_run')} :
- END
- call writefile(lines, tempfile, 'D')
- call assert_fails($'new {tempfile}', 'E992:')
- bw!
- let lines =<< trim END
- some text
- vim: set guitabtooltip=%{%mapset()%}:
- END
- call writefile(lines, tempfile)
- call assert_fails($'new {tempfile}', 'E992:')
- bw!
- let lines =<< trim END
- some text
- vim: set printheader=%{mapset('n',0,{})%)%}:
- END
- call writefile(lines, tempfile, 'D')
- call assert_fails($'new {tempfile}', 'E992:')
- bw!
-endfunc
-
" vim: shiftwidth=2 sts=2 expandtab