se tpm (for &tabpagemax).The "tpm" should be colored like all othe other option names.
@cecamp The bug is in syntax/vim.vim, line 33, where the string "there" has somehow made it into the list of option names. The first quote mark is interpreted as a comment delimiter, and all of the option names on line 33 after that are wiped out. tpm is just one of them; you can try the others and see that they're not correctly colored either.
This probably reflects a bug in whatever script tries to auto-extract option names from the source.
Ubuntu 20.04
8.2.3640
No response
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 412afe934..e19d007fb 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -30,7 +30,7 @@ syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue Di " vimOptions are caught only when contained in a vimSet {{{2 syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapfile sxq tabstop tags tbs termguicolors textmode thesaurusfunc titlestring top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan -syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swapsync syn tag tagstack tc termwinkey textwidth tildeop titlestring option to hi "there" tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write +syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swapsync syn tag tagstack tc termwinkey textwidth tildeop titlestring option to hi tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeout tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua swf syntax tagcase tb tenc termwinsize tfu timeoutlen tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes switchbuf ta tagfunc tbi term termwintype tgc title to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
FWIW, this is how I get the option names:
vim9script def Option(): list<string> var helptags: list<string> readfile($VIMRUNTIME .. '/doc/options.txt') ->join() ->substitute('\*''[a-z]\{2,\}''\*', (m: list<string>): string => !!helptags->add(m[0]) ? '' : '', 'g') var deprecated: list<string> =<< trim END *'biosk'* *'bioskey'* *'consk'* *'conskey'* *'fe'* *'nobiosk'* *'nobioskey'* *'noconsk'* *'noconskey'* END for opt: string in deprecated var i: number = helptags->index(opt) if i == -1 continue endif helptags->remove(i) endfor return helptags ->map((_, v: string) => v->trim("*'")) enddef echo Option()
In legacy:
function Option() abort let helptags = [] eval readfile($VIMRUNTIME .. '/doc/options.txt') \->join() \ ->substitute('\*''[a-z]\{2,\}''\*', \ {m -> helptags->add(m[0])->get(0)[-1]}, 'g') let deprecated =<< trim END *'biosk'* *'bioskey'* *'consk'* *'conskey'* *'fe'* *'nobiosk'* *'nobioskey'* *'noconsk'* *'noconskey'* END for opt in deprecated let i = helptags->index(opt) if i == -1 continue endif eval helptags->remove(i) endfor return helptags \->map({_, v -> v->trim("*'")}) endfunction echo Option()
I wonder why the script from @cecamp does not pick up this option.
This is a shot in the dark, but I have a hunch that @cecamp's script is collecting the "there" from somewhere in lines 193-208 of "options.txt", where variants of "hi there" are used as examples.
I note that in the buggy line of vim.vim, the option name right before the incorrectly-included "there" is hi.
I've updated syntax/vim.vim and sent it along to Bram.
Closed #9180.