vim-patch:partial:938ae280c79b (#22356)

Update runtime files.

938ae280c7

Partially skip autocmd.txt: needs patch 8.2.5011.
Partially skip builtin.txt: needs patch 9.0.0411.
Partially skip eval.txt: needs patch 8.2.3783.
Cherry-pick :map-meta-keys from patch 9.0.1276.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2023-02-21 23:50:29 +08:00 committed by GitHub
parent d18f8d5c2d
commit ee26b227e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 533 additions and 142 deletions

View File

@ -380,6 +380,7 @@ CmdlineChanged After a change was made to the text inside
CmdlineEnter After entering the command-line (including CmdlineEnter After entering the command-line (including
non-interactive use of ":" in a mapping: use non-interactive use of ":" in a mapping: use
|<Cmd>| instead to avoid this). |<Cmd>| instead to avoid this).
The pattern is matched against |cmdline-char|.
<afile> expands to the |cmdline-char|. <afile> expands to the |cmdline-char|.
Sets these |v:event| keys: Sets these |v:event| keys:
cmdlevel cmdlevel

View File

@ -225,7 +225,7 @@ gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
gettagstack([{nr}]) Dict get the tag stack of window {nr} gettagstack([{nr}]) Dict get the tag stack of window {nr}
gettext({text}) String lookup translation of {text} gettext({text}) String lookup translation of {text}
getwininfo([{winid}]) List list of info about each window getwininfo([{winid}]) List list of info about each window
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window getwinpos([{timeout}]) List X and Y coord in pixels of Vim window
getwinposx() Number X coord in pixels of Vim window getwinposx() Number X coord in pixels of Vim window
getwinposy() Number Y coord in pixels of Vim window getwinposy() Number Y coord in pixels of Vim window
getwinvar({nr}, {varname} [, {def}]) getwinvar({nr}, {varname} [, {def}])
@ -326,7 +326,7 @@ max({expr}) Number maximum value of items in {expr}
menu_get({path} [, {modes}]) List description of |menus| matched by {path} menu_get({path} [, {modes}]) List description of |menus| matched by {path}
menu_info({name} [, {mode}]) Dict get menu item information menu_info({name} [, {mode}]) Dict get menu item information
min({expr}) Number minimum value of items in {expr} min({expr}) Number minimum value of items in {expr}
mkdir({name} [, {path} [, {prot}]]) mkdir({name} [, {flags} [, {prot}]])
Number create directory {name} Number create directory {name}
mode([expr]) String current editing mode mode([expr]) String current editing mode
msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack
@ -5432,11 +5432,14 @@ min({expr}) Return the minimum value of all items in {expr}. Example: >
mylist->min() mylist->min()
< *mkdir()* *E739* < *mkdir()* *E739*
mkdir({name} [, {path} [, {prot}]]) mkdir({name} [, {flags} [, {prot}]])
Create directory {name}. Create directory {name}.
If {path} is "p" then intermediate directories are created as When {flags} is present it must be a string. An empty string
necessary. Otherwise it must be "". has no effect.
If {flags} is "p" then intermediate directories are created as
necessary.
If {prot} is given it is used to set the protection bits of If {prot} is given it is used to set the protection bits of
the new directory. The default is 0o755 (rwxr-xr-x: r/w for the new directory. The default is 0o755 (rwxr-xr-x: r/w for
@ -5449,7 +5452,7 @@ mkdir({name} [, {path} [, {prot}]])
< This function is not available in the |sandbox|. < This function is not available in the |sandbox|.
If you try to create an existing directory with {path} set to If you try to create an existing directory with {flags} set to
"p" mkdir() will silently exit. "p" mkdir() will silently exit.
The function result is a Number, which is TRUE if the call was The function result is a Number, which is TRUE if the call was

View File

@ -584,6 +584,7 @@ followed by another Vim command:
:registers :registers
:read ! :read !
:sign :sign
:tabdo
:terminal :terminal
:vglobal :vglobal
:windo :windo

View File

@ -1445,7 +1445,7 @@ See below |functions|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
lambda expression *expr-lambda* *lambda* lambda expression *expr-lambda* *lambda*
{args -> expr1} lambda expression {args -> expr1} lambda expression *E451*
A lambda expression creates a new unnamed function which returns the result of A lambda expression creates a new unnamed function which returns the result of
evaluating |expr1|. Lambda expressions differ from |user-function|s in evaluating |expr1|. Lambda expressions differ from |user-function|s in

View File

@ -634,7 +634,10 @@ MARKDOWN *ft-markdown-plugin*
To enable folding use this: > To enable folding use this: >
let g:markdown_folding = 1 let g:markdown_folding = 1
<
'expandtab' will be set by default. If you do not want that use this: >
let g:markdown_recommended_style = 0
PDF *ft-pdf-plugin* PDF *ft-pdf-plugin*

View File

@ -838,6 +838,11 @@ in the original Vi, you would get back the text before the first undo).
1.10 MAPPING ALT-KEYS *:map-alt-keys* 1.10 MAPPING ALT-KEYS *:map-alt-keys*
For a readable mapping command the <A-k> form can be used. Note that <A-k>
and <A-K> are different, the latter will use an upper case letter. Actually,
<A-K> and <A-S-K> are the same. Instead of "A" you can use "M". If you have
an actual Meta modifier key, please see |:map-meta-keys|.
In the GUI Nvim handles the |ALT| key itself, thus mapping keys with ALT In the GUI Nvim handles the |ALT| key itself, thus mapping keys with ALT
should always work. But in a terminal Nvim gets a sequence of bytes and has should always work. But in a terminal Nvim gets a sequence of bytes and has
to figure out whether ALT was pressed. Terminals may use ESC to indicate that to figure out whether ALT was pressed. Terminals may use ESC to indicate that
@ -847,7 +852,21 @@ milliseconds, the ESC is interpreted as:
otherwise it is interpreted as two key presses: otherwise it is interpreted as two key presses:
<ESC> {key} <ESC> {key}
1.11 MAPPING AN OPERATOR *:map-operator* 1.11 MAPPING META-KEYS *:map-meta-keys*
Mapping keys with the Meta modifier works very similar to using the Alt key.
What key on your keyboard produces the Meta modifier depends on your keyboard
and configuration.
Note that mapping <M-a> actually is for using the Alt key. That can be
confusing! It cannot be changed, it would not be backwards compatible.
For the Meta modifier the "T" character is used. For example, to map Meta-b
in Insert mode: >
:imap <T-b> terrible
1.12 MAPPING AN OPERATOR *:map-operator*
An operator is used before a {motion} command. To define your own operator An operator is used before a {motion} command. To define your own operator
you must create a mapping that first sets the 'operatorfunc' option and then you must create a mapping that first sets the 'operatorfunc' option and then
@ -984,7 +1003,7 @@ non-id The "non-id" type ends in a non-keyword character, the other
Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r" Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r"
An abbreviation is only recognized when you type a non-keyword character. An abbreviation is only recognized when you type a non-keyword character.
This can also be the <Esc> that ends insert mode or the <CR> that ends a This can also be the <Esc> that ends Insert mode or the <CR> that ends a
command. The non-keyword character which ends the abbreviation is inserted command. The non-keyword character which ends the abbreviation is inserted
after the expanded abbreviation. An exception to this is the character <C-]>, after the expanded abbreviation. An exception to this is the character <C-]>,
which is used to expand an abbreviation without inserting any extra which is used to expand an abbreviation without inserting any extra

View File

@ -1186,7 +1186,7 @@ A jump table for the options with a short description can be found at |Q_op|.
case mapping, the current locale is not effective. case mapping, the current locale is not effective.
This probably only matters for Turkish. This probably only matters for Turkish.
*'cdhome'* *'cdh'* *'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'*
'cdhome' 'cdh' boolean (default: off) 'cdhome' 'cdh' boolean (default: off)
global global
When on, |:cd|, |:tcd| and |:lcd| without an argument changes the When on, |:cd|, |:tcd| and |:lcd| without an argument changes the
@ -4291,7 +4291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'mousemodel' option is set by the |:behave| command. The 'mousemodel' option is set by the |:behave| command.
*'mousemoveevent'* *'mousemev'* *'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'*
'mousemoveevent' 'mousemev' boolean (default off) 'mousemoveevent' 'mousemev' boolean (default off)
global global
When on, mouse move events are delivered to the input queue and are When on, mouse move events are delivered to the input queue and are

View File

@ -97,6 +97,8 @@ g# Like "#", but don't put "\<" and "\>" around the word.
*gd* *gd*
gd Goto local Declaration. When the cursor is on a local gd Goto local Declaration. When the cursor is on a local
variable, this command will jump to its declaration. variable, this command will jump to its declaration.
This was made to work for C code, in other languages
it may not work well.
First Vim searches for the start of the current First Vim searches for the start of the current
function, just like "[[". If it is not found the function, just like "[[". If it is not found the
search stops in line 1. If it is found, Vim goes back search stops in line 1. If it is found, Vim goes back

View File

@ -1271,18 +1271,32 @@ When not set 4 is used.
DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax* DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax*
There is one option with highlighting DOS batch files. This covers new Select the set of Windows Command interpreter extensions that should be
extensions to the Command Interpreter introduced with Windows 2000 and supported with the variable dosbatch_cmdextversion. For versions of Windows
is controlled by the variable dosbatch_cmdextversion. For Windows NT NT (before Windows 2000) this should have the value of 1. For Windows 2000
this should have the value 1, and for Windows 2000 it should be 2. and later it should be 2.
Select the version you want with the following line: > Select the version you want with the following line: >
:let dosbatch_cmdextversion = 1 :let dosbatch_cmdextversion = 1
If this variable is not defined it defaults to a value of 2 to support If this variable is not defined it defaults to a value of 2 to support
Windows 2000. Windows 2000 and later.
A second option covers whether *.btm files should be detected as type The original MS-DOS supports an idiom of using a double colon (::) as an
alternative way to enter a comment line. This idiom can be used with the
current Windows Command Interpreter, but it can lead to problems when used
inside ( ... ) command blocks. You can find a discussion about this on
Stack Overflow -
https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files
To allow the use of the :: idiom for comments in the Windows Command
Interpreter or working with MS-DOS bat files, set the
dosbatch_colons_comment variable to anything: >
:let dosbatch_colons_comment = 1
There is an option that covers whether *.btm files should be detected as type
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter "dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
is used by default. You may select the former with the following line: > is used by default. You may select the former with the following line: >

View File

@ -234,9 +234,10 @@ Example: >
call Something('key', 20) "key: 20" call Something('key', 20) "key: 20"
The argument default expressions are evaluated at the time of the function The argument default expressions are evaluated at the time of the function
call, not definition. Thus it is possible to use an expression which is call, not when the function is defined. Thus it is possible to use an
invalid the moment the function is defined. The expressions are also only expression which is invalid the moment the function is defined. The
evaluated when arguments are not specified during a call. expressions are also only evaluated when arguments are not specified during a
call.
*E989* *E989*
Optional arguments with default expressions must occur after any mandatory Optional arguments with default expressions must occur after any mandatory

View File

@ -1,7 +1,10 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: MS-DOS .bat files " Language: MS-DOS/Windows .bat files
" Maintainer: Mike Williams <mrw@eandem.co.uk> " Maintainer: Mike Williams <mrmrdubya@gmail.com>
" Last Change: 7th May 2020 " Last Change: 12th February 2023
"
" Options Flags:
" dosbatch_colons_comment - any value to treat :: as comment line
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@ -15,8 +18,13 @@ let s:cpo_save = &cpo
set cpo&vim set cpo&vim
" BAT comment formatting " BAT comment formatting
setlocal comments=b:rem,b:@rem,b:REM,b:@REM,::: setlocal comments=b:rem,b:@rem,b:REM,b:@REM
setlocal commentstring=::\ %s if exists("dosbatch_colons_comment")
setlocal comments+=:::
setlocal commentstring=::\ %s
else
setlocal commentstring=REM\ %s
endif
setlocal formatoptions-=t formatoptions+=rol setlocal formatoptions-=t formatoptions+=rol
" Lookup DOS keywords using Windows command help. " Lookup DOS keywords using Windows command help.

15
runtime/ftplugin/fish.vim Normal file
View File

@ -0,0 +1,15 @@
" Vim filetype plugin file
" Language: fish
" Maintainer: Nicholas Boyle (github.com/nickeb96)
" Repository: https://github.com/nickeb96/fish.vim
" Last Change: February 1, 2023
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal iskeyword=@,48-57,_,192-255,-,.
setlocal comments=:#
setlocal commentstring=#%s
setlocal formatoptions+=crjq

View File

@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Vim " Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Nov 27 " Last Change: 2023 Feb 07
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@ -98,18 +98,23 @@ if exists("loaded_matchit")
" func name " func name
" require a parenthesis following, then there can be an "endfunc". " require a parenthesis following, then there can be an "endfunc".
let b:match_words = let b:match_words =
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' . \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' ..
\ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' . \ '\<\%(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\%(w\%[hile]\|fo\%[r]\)\>,' ..
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' . \ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' ..
\ '{:},' . \ '{:},' ..
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' . \ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' ..
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' ..
\ '\<class\>:\<endclass\>,' ..
\ '\<inte\%[rface]\>:\<endinterface\>,' ..
\ '\<enu\%[m]\>:\<endenum\>,'
" Ignore syntax region commands and settings, any 'en*' would clobber " Ignore syntax region commands and settings, any 'en*' would clobber
" if-endif. " if-endif.
" - set spl=de,en " - set spl=de,en
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ … " - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") " Also ignore here-doc and dictionary keys (vimVar).
\ =~? "comment\\|string\\|vimLetHereDoc\\|vimSynReg\\|vimSet"' let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
\ =~? "comment\\|string\\|vimSynReg\\|vimSet\\|vimLetHereDoc\\|vimVar"'
endif endif
let &cpo = s:cpo_save let &cpo = s:cpo_save

82
runtime/indent/fish.vim Normal file
View File

@ -0,0 +1,82 @@
" Vim indent file
" Language: fish
" Maintainer: Nicholas Boyle (github.com/nickeb96)
" Repository: https://github.com/nickeb96/fish.vim
" Last Change: February 4, 2023
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetFishIndent(v:lnum)
setlocal indentkeys+==end,=else,=case
function s:PrevCmdStart(linenum)
let l:linenum = a:linenum
" look for the first line that isn't a line continuation
while l:linenum > 1 && getline(l:linenum - 1) =~# '\\$'
let l:linenum = l:linenum - 1
endwhile
return l:linenum
endfunction
function GetFishIndent(lnum)
let l:shiftwidth = shiftwidth()
let l:prevlnum = prevnonblank(a:lnum - 1)
if l:prevlnum ==# 0
return 0
endif
" if the previous line ended with a line continuation
if getline(a:lnum - 1) =~# '\\$'
if a:lnum ==# 0 || getline(a:lnum - 2) !~# '\\$'
" this is the first line continuation in a chain, so indent it
return indent(a:lnum - 1) + l:shiftwidth
else
" use the same indentation as the previous continued line
return indent(a:lnum - 1)
endif
endif
let l:prevlnum = s:PrevCmdStart(l:prevlnum)
let l:prevline = getline(l:prevlnum)
if l:prevline =~# '^\s*\(begin\|if\|else\|while\|for\|function\|case\|switch\)\>'
let l:indent = l:shiftwidth
else
let l:indent = 0
endif
let l:line = getline(a:lnum)
if l:line =~# '^\s*end\>'
" find end's matching start
let l:depth = 1
let l:currentlnum = a:lnum
while l:depth > 0 && l:currentlnum > 0
let l:currentlnum = s:PrevCmdStart(prevnonblank(l:currentlnum - 1))
let l:currentline = getline(l:currentlnum)
if l:currentline =~# '^\s*end\>'
let l:depth = l:depth + 1
elseif l:currentline =~# '^\s*\(begin\|if\|while\|for\|function\|switch\)\>'
let l:depth = l:depth - 1
endif
endwhile
if l:currentline =~# '^\s*switch\>'
return indent(l:currentlnum)
else
return indent(l:prevlnum) + l:indent - l:shiftwidth
endif
elseif l:line =~# '^\s*else\>'
return indent(l:prevlnum) + l:indent - l:shiftwidth
elseif l:line =~# '^\s*case\>'
if getline(l:prevlnum) =~# '^\s*switch\>'
return indent(l:prevlnum) + l:indent
else
return indent(l:prevlnum) + l:indent - l:shiftwidth
endif
else
return indent(l:prevlnum) + l:indent
endif
endfunction

View File

@ -2,7 +2,7 @@
" Language: Debian sources.list " Language: Debian sources.list
" Maintainer: Debian Vim Maintainers " Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2023 Jan 16 " Last Change: 2023 Feb 06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
" Standard syntax initialization " Standard syntax initialization
@ -14,7 +14,9 @@ endif
syn case match syn case match
" A bunch of useful keywords " A bunch of useful keywords
syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|non-free-firmware\|restricted\|universe\|multiverse\)/ syn match debsourcesType /\(deb-src\|deb\)/
syn match debsourcesFreeComponent /\(main\|universe\)/
syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/
" Match comments " Match comments
syn match debsourcesComment /#.*/ contains=@Spell syn match debsourcesComment /#.*/ contains=@Spell
@ -48,7 +50,9 @@ exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join
" Associate our matches and regions with pretty colours " Associate our matches and regions with pretty colours
hi def link debsourcesLine Error hi def link debsourcesLine Error
hi def link debsourcesKeyword Statement hi def link debsourcesType Statement
hi def link debsourcesFreeComponent Statement
hi def link debsourcesNonFreeComponent Statement
hi def link debsourcesDistrKeyword Type hi def link debsourcesDistrKeyword Type
hi def link debsourcesUnsupportedDistrKeyword WarningMsg hi def link debsourcesUnsupportedDistrKeyword WarningMsg
hi def link debsourcesComment Comment hi def link debsourcesComment Comment

View File

@ -1,12 +1,12 @@
" Vim syntax file " Vim syntax file
" Language: MS-DOS batch file (with NT command extensions) " Language: MS-DOS/Windows batch file (with NT command extensions)
" Maintainer: Mike Williams <mrw@eandem.co.uk> " Maintainer: Mike Williams <mrmrdubya@gmail.com>
" Filenames: *.bat " Filenames: *.bat
" Last Change: 6th September 2009 " Last Change: 12th February 2023
" Web Page: http://www.eandem.co.uk/mrw/vim
" "
" Options Flags: " Options Flags:
" dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default]
" dosbatch_colons_comment - any value to treat :: as comment line
" "
" quit when a syntax file was already loaded " quit when a syntax file was already loaded
@ -92,7 +92,11 @@ syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchS
syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell if exists("dosbatch_colons_comment")
syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
else
syn match dosbatchError "\s*:\s*:.*$"
endif
" Comments in ()'s - still to handle spaces before rem " Comments in ()'s - still to handle spaces before rem
syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
@ -111,6 +115,7 @@ syn keyword dosbatchImplicit vol xcopy
" Only when an item doesn't have highlighting yet " Only when an item doesn't have highlighting yet
hi def link dosbatchTodo Todo hi def link dosbatchTodo Todo
hi def link dosbatchError Error
hi def link dosbatchStatement Statement hi def link dosbatchStatement Statement
hi def link dosbatchCommands dosbatchStatement hi def link dosbatchCommands dosbatchStatement

225
runtime/syntax/fish.vim Normal file
View File

@ -0,0 +1,225 @@
" Vim syntax file
" Language: fish
" Maintainer: Nicholas Boyle (github.com/nickeb96)
" Repository: https://github.com/nickeb96/fish.vim
" Last Change: February 1, 2023
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Statements
syn cluster fishStatement contains=fishKeywordAndOr,fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand,fishVariable
syn keyword fishKeywordAndOr and or nextgroup=fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
hi def link fishKeywordAndOr fishOperator
syn keyword fishNot not skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
syn match fishNot /!/ skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
hi def link fishNot fishOperator
syn keyword fishSelectStatement command builtin skipwhite nextgroup=fishKeyword,fishKeywordIf,fishCommand,fishOption
hi def link fishSelectStatement fishKeyword
syn keyword fishKeyword end skipwhite nextgroup=@fishTerminator
syn keyword fishKeywordIf if skipwhite nextgroup=@fishStatement
syn keyword fishKeyword else skipwhite nextgroup=fishKeywordIf,fishSemicolon
hi def link fishKeywordIf fishKeyword
syn keyword fishKeyword switch skipwhite nextgroup=@fishArgument
syn keyword fishKeyword case skipwhite nextgroup=@fishArgument
syn keyword fishKeyword while skipwhite nextgroup=@fishStatement
syn keyword fishKeyword for skipwhite nextgroup=fishForVariable
syn match fishForVariable /[[:alnum:]_]\+/ contained skipwhite nextgroup=fishKeywordIn
syn keyword fishKeywordIn in contained skipwhite nextgroup=@fishArgument
hi def link fishForVariable fishParameter
hi def link fishKeywordIn fishKeyword
syn keyword fishKeyword _ abbr argparse begin bg bind block break breakpoint cd commandline
\ complete continue count disown echo emit eval exec exit false fg function functions
\ history jobs math printf pwd random read realpath return set set_color source status
\ string test time true type ulimit wait
\ skipwhite nextgroup=@fishNext
syn match fishKeyword /\<contains\>/ skipwhite nextgroup=@fishNext
syn match fishCommand /[[:alnum:]_\/[][[:alnum:]+._-]*/ skipwhite nextgroup=@fishNext
" Internally Nested Arguments
syn cluster fishSubscriptArgs contains=fishInnerVariable,fishIndexNum,fishIndexRange,fishInnerCommandSub
syn match fishInnerVariable /\$\+[[:alnum:]_]\+/ contained
syn match fishInnerVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 contained nextgroup=fishInnerSubscript
hi def link fishInnerVariable fishVariable
syn region fishInnerSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
\ keepend contains=@fishSubscriptArgs
hi def link fishInnerSubscript fishSubscript
syn match fishIndexNum /[+-]?[[:digit:]]\+/ contained
hi def link fishIndexNum fishParameter
syn match fishIndexRange /\.\./ contained
hi def link fishIndexRange fishParameter
syn region fishInnerCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
\ contains=@fishStatement
hi def link fishInnerCommandSub fishCommandSub
syn region fishQuotedCommandSub matchgroup=fishOperator start=/\$(/ end=/)/ contained
\ contains=@fishStatement
hi def link fishQuotedCommandSub fishCommandSub
syn match fishBraceExpansionComma /,/ contained
hi def link fishBraceExpansionComma fishOperator
syn match fishBracedParameter '[[:alnum:]\u5b\u5d@:=+.%/!_-]\+' contained contains=fishInnerPathGlob
hi def link fishBracedParameter fishParameter
syn region fishBracedQuote start=/'/ skip=/\\'/ end=/'/ contained
\ contains=fishEscapedEscape,fishEscapedSQuote
syn region fishBracedQuote start=/"/ skip=/\\"/ end=/"/ contained
\ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishInnerCommandSub
hi def link fishBracedQuote fishQuote
" Arguments
syn cluster fishArgument contains=fishParameter,fishOption,fishVariable,fishPathGlob,fishBraceExpansion,fishQuote,fishCharacter,fishCommandSub,fishRedirection,fishSelfPid
syn match fishParameter '[[:alnum:]\u5b\u5d@:=+.,%/!_-]\+' contained skipwhite nextgroup=@fishNext
syn match fishOption /-[[:alnum:]=_-]*/ contained skipwhite nextgroup=@fishNext
syn match fishPathGlob /\(\~\|*\|?\)/ contained skipwhite nextgroup=@fishNext
syn region fishBraceExpansion matchgroup=fishOperator start=/{/ end=/}/ contained
\ contains=fishBraceExpansionComma,fishInnerVariable,fishInnerCommandSub,fishBracedParameter,fishBracedQuote
\ skipwhite nextgroup=@fishNext
syn match fishVariable /\$\+[[:alnum:]_]\+/ skipwhite nextgroup=@fishNext
syn match fishVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 nextgroup=fishSubscript
syn region fishSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
\ keepend contains=@fishSubscriptArgs
\ skipwhite nextgroup=@fishNext
syn region fishCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
\ contains=@fishStatement
\ skipwhite nextgroup=@fishNext
syn region fishQuote start=/'/ skip=/\\'/ end=/'/ contained
\ contains=fishEscapedEscape,fishEscapedSQuote
\ skipwhite nextgroup=@fishNext
syn region fishQuote start=/"/ skip=/\\"/ end=/"/ contained
\ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishQuotedCommandSub
\ skipwhite nextgroup=@fishNext
syn match fishEscapedEscape /\\\\/ contained
syn match fishEscapedSQuote /\\'/ contained
syn match fishEscapedDQuote /\\"/ contained
syn match fishEscapedDollar /\\\$/ contained
hi def link fishEscapedEscape fishCharacter
hi def link fishEscapedSQuote fishCharacter
hi def link fishEscapedDQuote fishCharacter
hi def link fishEscapedDollar fishCharacter
syn match fishCharacter /\\[0-7]\{1,3}/ contained skipwhite nextgroup=@fishNext
syn match fishCharacter /\\u[0-9a-fA-F]\{4}/ contained skipwhite nextgroup=@fishNext
syn match fishCharacter /\\U[0-9a-fA-F]\{8}/ contained skipwhite nextgroup=@fishNext
syn match fishCharacter /\\x[0-7][0-9a-fA-F]\|\\x[0-9a-fA-F]/ contained skipwhite nextgroup=@fishNext
syn match fishCharacter /\\X[0-9a-fA-F]\{1,2}/ contained skipwhite nextgroup=@fishNext
syn match fishCharacter /\\[abcefnrtv[\](){}<>\\*?~%#$|&;'" ]/ contained skipwhite nextgroup=@fishNext
syn match fishRedirection /</ contained skipwhite nextgroup=fishRedirectionTarget
syn match fishRedirection /[0-9&]\?>[>?]\?/ contained skipwhite nextgroup=fishRedirectionTarget
syn match fishRedirection /[0-9&]\?>&[0-9-]/ contained skipwhite nextgroup=@fishNext
syn match fishRedirectionTarget /[[:alnum:]$~*?{,}"'\/._-]\+/ contained contains=fishInnerVariable skipwhite nextgroup=@fishNext
hi def link fishRedirectionTarget fishRedirection
syn match fishSelfPid /%self\>/ contained nextgroup=@fishNext
hi def link fishSelfPid fishOperator
" Terminators
syn cluster fishTerminator contains=fishPipe,fishBackgroundJob,fishSemicolon,fishSymbolicAndOr
syn match fishPipe /\(1>\|2>\|&\)\?|/ contained skipwhite nextgroup=@fishStatement
hi def link fishPipe fishEnd
syn match fishBackgroundJob /&$/ contained skipwhite nextgroup=@fishStatement
syn match fishBackgroundJob /&[^<>&|]/me=s+1,he=s+1 contained skipwhite nextgroup=@fishStatement
hi def link fishBackgroundJob fishEnd
syn match fishSemicolon /;/ skipwhite nextgroup=@fishStatement
hi def link fishSemicolon fishEnd
syn match fishSymbolicAndOr /\(&&\|||\)/ contained skipwhite skipempty nextgroup=@fishStatement
hi def link fishSymbolicAndOr fishOperator
" Other
syn cluster fishNext contains=fishEscapedNl,@fishArgument,@fishTerminator
syn match fishEscapedNl /\\$/ skipnl skipwhite contained nextgroup=@fishNext
syn match fishComment /#.*/ contains=fishTodo,@Spell
syn keyword fishTodo TODO contained
syn sync minlines=200
syn sync maxlines=300
" Intermediate highlight groups matching $fish_color_* variables
hi def link fishCommand fish_color_command
hi def link fishComment fish_color_comment
hi def link fishEnd fish_color_end
hi def link fishCharacter fish_color_escape
hi def link fishKeyword fish_color_keyword
hi def link fishEscapedNl fish_color_normal
hi def link fishOperator fish_color_operator
hi def link fishVariable fish_color_operator
hi def link fishInnerVariable fish_color_operator
hi def link fishPathGlob fish_color_operator
hi def link fishOption fish_color_option
hi def link fishParameter fish_color_param
hi def link fishQuote fish_color_quote
hi def link fishRedirection fish_color_redirection
" Default highlight groups
hi def link fish_color_param Normal
hi def link fish_color_normal Normal
hi def link fish_color_option Normal
hi def link fish_color_command Function
hi def link fish_color_keyword Keyword
hi def link fish_color_end Delimiter
hi def link fish_color_operator Operator
hi def link fish_color_redirection Type
hi def link fish_color_quote String
hi def link fish_color_escape Character
hi def link fish_color_comment Comment
hi def link fishTodo Todo
let b:current_syntax = 'fish'
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -2,8 +2,8 @@
" Language: fstab file " Language: fstab file
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com> " Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim " URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
" Last Change: 2022 Dec 11 " Last Change: 2023 Feb 19
" Version: 1.6.2 " Version: 1.6.3
" "
" Credits: " Credits:
" David Necas (Yeti) <yeti@physics.muni.cz> " David Necas (Yeti) <yeti@physics.muni.cz>
@ -389,7 +389,7 @@ syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained
syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster
syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained
syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained
syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained syn match fsOptions /\s\+.\{-}\%(\s\|$\)/ nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained
syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained
" Whole line comments " Whole line comments
@ -491,4 +491,4 @@ let b:current_syntax = "fstab"
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save
" vim: ts=8 ft=vim " vim: ts=8 noet ft=vim

View File

@ -5,7 +5,7 @@
" go.vim: Vim syntax file for Go. " go.vim: Vim syntax file for Go.
" Language: Go " Language: Go
" Maintainer: Billie Cleek <bhcleek@gmail.com> " Maintainer: Billie Cleek <bhcleek@gmail.com>
" Latest Revision: 2022-11-17 " Latest Revision: 2023-02-19
" License: BSD-style. See LICENSE file in source repository. " License: BSD-style. See LICENSE file in source repository.
" Repository: https://github.com/fatih/vim-go " Repository: https://github.com/fatih/vim-go
@ -136,8 +136,11 @@ syn keyword goBoolean true false
syn keyword goPredefinedIdentifiers nil iota syn keyword goPredefinedIdentifiers nil iota
hi def link goBuiltins Identifier hi def link goBuiltins Identifier
hi def link goPredefinedIdentifiers Constant
" Boolean links to Constant by default by vim: goBoolean and goPredefinedIdentifiers
" will be highlighted the same, but having the separate groups allows users to
" have separate highlighting for them if they desire.
hi def link goBoolean Boolean hi def link goBoolean Boolean
hi def link goPredefinedIdentifiers goBoolean
" Comments; their contents " Comments; their contents
syn keyword goTodo contained TODO FIXME XXX BUG syn keyword goTodo contained TODO FIXME XXX BUG

View File

@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net> " Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Claudio Fleiner <claudio@fleiner.com> " Claudio Fleiner <claudio@fleiner.com>
" Last Change: 2022 Nov 18 " Last Change: 2023 Feb 20
" Please check :help html.vim for some comments and a description of the options " Please check :help html.vim for some comments and a description of the options
@ -221,7 +221,7 @@ if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT " JAVA SCRIPT
syn include @htmlJavaScript syntax/javascript.vim syn include @htmlJavaScript syntax/javascript.vim
unlet b:current_syntax unlet b:current_syntax
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc syn region javaScript start=+<script\>\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
hi def link htmlScriptTag htmlTag hi def link htmlScriptTag htmlTag

View File

@ -2,7 +2,7 @@
" Language: PoE item filter " Language: PoE item filter
" Maintainer: ObserverOfTime <chronobserver@disroot.org> " Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Filenames: *.filter " Filenames: *.filter
" Last Change: 2022 Oct 07 " Last Change: 2023 Feb 10
if exists('b:current_syntax') if exists('b:current_syntax')
finish finish
@ -17,7 +17,7 @@ syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained
syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell
" Blocks " Blocks
syn keyword poefilterBlock Show Hide syn keyword poefilterBlock Show Hide Minimal
" Conditions " Conditions
syn keyword poefilterCondition syn keyword poefilterCondition