aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-11-17 10:02:59 +0100
committerGitHub <noreply@github.com>2021-11-17 10:02:59 +0100
commitc0efe49e78eca3a17a5934cc283199122d081467 (patch)
tree8ef8f9fcfb55d3a3d515853e84294f60c6632306 /runtime/syntax
parenteba317d7a907a76e6e265c0fe0b97a87f17cf943 (diff)
downloadrneovim-c0efe49e78eca3a17a5934cc283199122d081467.tar.gz
rneovim-c0efe49e78eca3a17a5934cc283199122d081467.tar.bz2
rneovim-c0efe49e78eca3a17a5934cc283199122d081467.zip
vim-patch:519cc559b08b (#16340)
Update runtime files https://github.com/vim/vim/commit/519cc559b08b800edc429688aece7ad6a00d41eb
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/autoit.vim3
-rw-r--r--runtime/syntax/gdb.vim13
-rw-r--r--runtime/syntax/gnuplot.vim41
-rw-r--r--runtime/syntax/lisp.vim26
-rw-r--r--runtime/syntax/routeros.vim91
-rw-r--r--runtime/syntax/tcl.vim20
-rw-r--r--runtime/syntax/vim.vim9
7 files changed, 153 insertions, 50 deletions
diff --git a/runtime/syntax/autoit.vim b/runtime/syntax/autoit.vim
index 1b9ab7458e..6b6048aadc 100644
--- a/runtime/syntax/autoit.vim
+++ b/runtime/syntax/autoit.vim
@@ -5,6 +5,7 @@
" Authored By: Riccardo Casini <ric@libero.it>
" Script URL: http://www.vim.org/scripts/script.php?script_id=1239
" ChangeLog: Please visit the script URL for detailed change information
+" Included change from #970.
" Quit when a syntax file was already loaded.
if exists("b:current_syntax")
@@ -932,7 +933,7 @@ syn match autoitConst "\$SD_POWERDOWN"
" constants - string
syn match autoitConst "\$STR_NOCASESENSE"
syn match autoitConst "\$STR_CASESENSE"
-syn match autoitConst "\STR_STRIPLEADING"
+syn match autoitConst "\$STR_STRIPLEADING"
syn match autoitConst "\$STR_STRIPTRAILING"
syn match autoitConst "\$STR_STRIPSPACES"
syn match autoitConst "\$STR_STRIPALL"
diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim
index 25a21d184e..c820ba40a9 100644
--- a/runtime/syntax/gdb.vim
+++ b/runtime/syntax/gdb.vim
@@ -2,7 +2,8 @@
" Language: GDB command files
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/gdb.vim
-" Last Change: 2012 Oct 05
+" Last Change: 2021 Nov 15
+" Additional changes by Simon Sobisch
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -21,19 +22,19 @@ syn match gdbInfo contained "all-registers"
syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands
-syn keyword gdbStatement contained complete condition continue delete detach directory disable disassemble display down
+syn keyword gdbStatement contained complete condition continue delete detach directory disable disas[semble] disp[lay] down
syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore
syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay
-syn keyword gdbStatement contained passcount path print printf ptype pwd quit rbreak remote return run rwatch
-syn keyword gdbStatement contained search section set sharedlibrary shell show si signal source step stepi stepping
+syn keyword gdbStatement contained passcount path print printf ptype python pwd quit rbreak remote return run rwatch
+syn keyword gdbStatement contained search section set sharedlibrary shell show si signal skip source step stepi stepping
syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop
-syn keyword gdbStatement contained tty undisplay unset until up watch whatis where while ws x
+syn keyword gdbStatement contained tty und[isplay] unset until up watch whatis where while ws x
syn match gdbFuncDef "\<define\>.*"
syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef
syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty
" some commonly used abbreviations
-syn keyword gdbStatement c disp undisp disas p
+syn keyword gdbStatement c cont p py
syn region gdbDocument matchgroup=gdbFuncDef start="\<document\>.*$" matchgroup=gdbFuncDef end="^end\s*$"
diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim
index 9c98e67e58..b5092d7555 100644
--- a/runtime/syntax/gnuplot.vim
+++ b/runtime/syntax/gnuplot.vim
@@ -3,7 +3,8 @@
" Maintainer: Josh Wainwright <wainwright DOT ja AT gmail DOT com>
" Last Maintainer: Andrew Rasmussen andyras@users.sourceforge.net
" Original Maintainer: John Hoelzel johnh51@users.sourceforge.net
-" Last Change: 2020 May 12
+" Last Change: 2021 Nov 16
+" additional changes from PR #8949
" Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot
" URL: http://www.vim.org/scripts/script.php?script_id=4873
" Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
@@ -32,22 +33,22 @@ syn match gnuplotSpecial "\\." contained
" syn match gnuplotSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[a-z\\]" contained
" measurements in the units in, cm and pt are special
-syn match gnuplotUnit "[0-9]+in"
-syn match gnuplotUnit "[0-9]+cm"
-syn match gnuplotUnit "[0-9]+pt"
+syn match gnuplotUnit "\d+in"
+syn match gnuplotUnit "\d+cm"
+syn match gnuplotUnit "\d+pt"
" external (shell) commands are special
-syn region gnuplotExternal start="!" end="$"
+syn region gnuplotExternal start="^\s*!" end="$"
" ---- Comments ---- "
-syn region gnuplotComment start="#" end="$" contains=gnuplotTodo
+syn region gnuplotComment start="#" end="$" contains=gnuplotTodo,@Spell
" ---- Constants ---- "
" strings
-syn region gnuplotString start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial
-syn region gnuplotString start="'" end="'"
+syn region gnuplotString start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial,@Spell
+syn region gnuplotString start="'" end="'" contains=@Spell
" built-in variables
syn keyword gnuplotNumber GNUTERM GPVAL_TERM GPVAL_TERMOPTIONS GPVAL_SPLOT
@@ -76,7 +77,7 @@ syn keyword gnuplotNumber GPVAL_TERM_YSIZE GPVAL_VIEW_MAP GPVAL_VIEW_ROT_X
syn keyword gnuplotNumber GPVAL_VIEW_ROT_Z GPVAL_VIEW_SCALE
" function name variables
-syn match gnuplotNumber "GPFUN_[a-zA-Z_]*"
+syn match gnuplotNumber "GPFUN_\h*"
" stats variables
syn keyword gnuplotNumber STATS_records STATS_outofrange STATS_invalid
@@ -104,23 +105,23 @@ syn keyword gnuplotError FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT
" integer number, or floating point number without a dot and with "f".
syn case ignore
-syn match gnuplotNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
+syn match gnuplotNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
" floating point number, with dot, optional exponent
-syn match gnuplotFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
+syn match gnuplotFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
" floating point number, starting with a dot, optional exponent
-syn match gnuplotFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
+syn match gnuplotFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
" floating point number, without dot, with exponent
-syn match gnuplotFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>"
+syn match gnuplotFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
" hex number
-syn match gnuplotNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
+syn match gnuplotNumber "\<0x\x\+\(u\=l\=\|lu\)\>"
syn case match
" flag an octal number with wrong digits by not highlighting
-syn match gnuplotOctalError "\<0[0-7]*[89]"
+syn match gnuplotOctalError "\<0\o*[89]"
" ---- Identifiers: Functions ---- "
@@ -374,8 +375,8 @@ syn keyword gnuplotKeyword nohead nooutliers nowedge off opaque outliers
syn keyword gnuplotKeyword palette pattern pi pointinterval pointsize
syn keyword gnuplotKeyword pointtype ps pt radius range rectangle
syn keyword gnuplotKeyword rowstacked screen separation size solid sorted
-syn keyword gnuplotKeyword textbox transparent units unsorted userstyles
-syn keyword gnuplotKeyword wedge x x2 xx xy yy
+syn keyword gnuplotKeyword textbox units unsorted userstyles wedge
+syn keyword gnuplotKeyword x x2 xx xy yy
" set surface
syn keyword gnuplotKeyword surface implicit explicit
" set table
@@ -477,9 +478,13 @@ syn keyword gnuplotKeyword nooutput
" keywords for 'test' command
syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr
+" The transparent gnuplot keyword cannot use 'syn keyword' as transparent
+" has a special meaning in :syntax commands.
+syn match gnuplotKeyword "\<transparent\>"
+
" ---- Macros ---- "
-syn match gnuplotMacro "@[a-zA-Z0-9_]*"
+syn match gnuplotMacro "@\w*"
" ---- Todos ---- "
diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim
index 434150ab26..90513e3a00 100644
--- a/runtime/syntax/lisp.vim
+++ b/runtime/syntax/lisp.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Lisp
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
-" Last Change: Jul 11, 2019
-" Version: 30
+" Last Change: Nov 10, 2021
+" Version: 31
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
@@ -54,20 +54,20 @@ if exists("g:lisp_rainbow") && g:lisp_rainbow != 0
syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9
syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0
else
- syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster
- syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster
+ syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster
+ syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster
endif
" ---------------------------------------------------------------------
" Atoms: {{{1
-syn match lispAtomMark "'"
-syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList
-syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark
-syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark
-syn region lispAtom start=+'"+ skip=+\\"+ end=+"+
-syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial
-syn match lispAtomNmbr contained "\<\d\+"
-syn match lispLeadWhite contained "^\s\+"
+syn match lispAtomMark "'"
+syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList
+syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark
+syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark
+syn region lispAtom start=+'"+ skip=+\\"+ end=+"+
+syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial
+syn match lispAtomNmbr contained "\<\d\+"
+syn match lispLeadWhite contained "^\s\+"
" ---------------------------------------------------------------------
" Standard Lisp Functions and Macros: {{{1
@@ -553,6 +553,8 @@ syn match lispParenError ")"
syn cluster lispCommentGroup contains=lispTodo,@Spell
syn match lispComment ";.*$" contains=@lispCommentGroup
syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup
+syn region lispComment start="#+nil" end="\ze)" contains=@lispCommentGroup
+syn match lispComment '^\s*#+nil.*$' contains=@lispCommentGroup
syn keyword lispTodo contained combak combak: todo todo:
" ---------------------------------------------------------------------
diff --git a/runtime/syntax/routeros.vim b/runtime/syntax/routeros.vim
new file mode 100644
index 0000000000..b6effc9b62
--- /dev/null
+++ b/runtime/syntax/routeros.vim
@@ -0,0 +1,91 @@
+" Vim syntax file
+" Language: MikroTik RouterOS Script
+" Maintainer: zainin <z@wintr.dev>
+" Original Author: ndbjorne @ MikroTik forums
+" Last Change: 2021 Nov 14
+
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case ignore
+
+syn iskeyword @,48-57,-
+
+" comments
+syn match routerosComment /^\s*\zs#.*/
+
+" options submenus: /interface ether1 etc
+syn match routerosSubMenu "\([a-z]\)\@<!/[a-zA-Z0-9-]*"
+
+" variables are matched by looking at strings ending with "=", e.g. var=
+syn match routerosVariable "[a-zA-Z0-9-/]*\(=\)\@="
+syn match routerosVariable "$[a-zA-Z0-9-]*"
+
+" colored for clarity
+syn match routerosDelimiter "[,=]"
+" match slash in CIDR notation (1.2.3.4/24, 2001:db8::/48, ::1/128)
+syn match routerosDelimiter "\(\x\|:\)\@<=\/\(\d\)\@="
+" dash in IP ranges
+syn match routerosDelimiter "\(\x\|:\)\@<=-\(\x\|:\)\@="
+
+" match service names after "set", like in original routeros syntax
+syn match routerosService "\(set\)\@<=\s\(api-ssl\|api\|dns\|ftp\|http\|https\|pim\|ntp\|smb\|ssh\|telnet\|winbox\|www\|www-ssl\)"
+
+" colors various interfaces
+syn match routerosInterface "bridge\d\+\|ether\d\+\|wlan\d\+\|pppoe-\(out\|in\)\d\+"
+
+syn keyword routerosBoolean yes no true false
+
+syn keyword routerosConditional if
+
+" operators
+syn match routerosOperator " \zs[-+*<>=!~^&.,]\ze "
+syn match routerosOperator "[<>!]="
+syn match routerosOperator "<<\|>>"
+syn match routerosOperator "[+-]\d\@="
+
+syn keyword routerosOperator and or in
+
+" commands
+syn keyword routerosCommands beep delay put len typeof pick log time set find environment
+syn keyword routerosCommands terminal error parse resolve toarray tobool toid toip toip6
+syn keyword routerosCommands tonum tostr totime add remove enable disable where get print
+syn keyword routerosCommands export edit find append as-value brief detail count-only file
+syn keyword routerosCommands follow follow-only from interval terse value-list without-paging
+syn keyword routerosCommands return
+
+" variable types
+syn keyword routerosType global local
+
+" loop keywords
+syn keyword routerosRepeat do while for foreach
+
+syn match routerosSpecial "[():[\]{|}]"
+
+syn match routerosLineContinuation "\\$"
+
+syn match routerosEscape "\\["\\nrt$?_abfv]" contained display
+syn match routerosEscape "\\\x\x" contained display
+
+syn region routerosString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=routerosEscape,routerosLineContinuation
+
+hi link routerosComment Comment
+hi link routerosSubMenu Function
+hi link routerosVariable Identifier
+hi link routerosDelimiter Operator
+hi link routerosEscape Special
+hi link routerosService Type
+hi link routerosInterface Type
+hi link routerosBoolean Boolean
+hi link routerosConditional Conditional
+hi link routerosOperator Operator
+hi link routerosCommands Operator
+hi link routerosType Type
+hi link routerosRepeat Repeat
+hi link routerosSpecial Delimiter
+hi link routerosString String
+hi link routerosLineContinuation Special
+
+let b:current_syntax = "routeros"
diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim
index 73b2b3fa11..59cb04f70f 100644
--- a/runtime/syntax/tcl.vim
+++ b/runtime/syntax/tcl.vim
@@ -6,8 +6,8 @@
" (previously Matt Neumann <mattneu@purpleturtle.com>)
" (previously Allan Kelly <allan@fruitloaf.co.uk>)
" Original: Robin Becker <robin@jessikat.demon.co.uk>
-" Last Change: 2021 Oct 03
-" Version: 1.14
+" Last Change: 2021 Nov 16
+" Version: 1.14 plus improvements from PR #8948
" URL: (removed, no longer worked)
" quit when a syntax file was already loaded
@@ -192,18 +192,18 @@ syn region tcltkCommand matchgroup=tcltkCommandColor start="\<lsort\>" matchgrou
syn keyword tclTodo contained TODO
" Sequences which are backslash-escaped: http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M16
-" Octal, hexadecimal, unicode codepoints, and the classics.
+" Octal, hexadecimal, Unicode codepoints, and the classics.
" Tcl takes as many valid characters in a row as it can, so \xAZ in a string is newline followed by 'Z'.
-syn match tclSpecial contained '\\\([0-7]\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)'
+syn match tclSpecial contained '\\\(\o\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)'
syn match tclSpecial contained '\\[\[\]\{\}\"\$]'
" Command appearing inside another command or inside a string.
syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement
" A string needs the skip argument as it may legitimately contain \".
" Match at start of line
-syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+
+syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC,@Spell skip=+\\\\\|\\"+
"Match all other legal strings.
-syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+
+syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement,@Spell skip=+\\\\\|\\"+
" Line continuation is backslash immediately followed by newline.
syn match tclLineContinue '\\$'
@@ -222,12 +222,12 @@ syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent
syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>"
"hex number
-syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
-"syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>"
+syn match tclNumber "0x\x\+\(u\=l\=\|lu\)\>"
+"syn match tclIdentifier "\<\h\w*\>"
syn case match
-syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo
-syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo
+syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo,@Spell
+syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo,@Spell
"syn match tclComment /^\s*\#.*$/
"syn match tclComment /;\s*\#.*$/hs=s+1
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 67756fa320..f7b5ce0f63 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -161,10 +161,13 @@ syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
syn keyword vimCommand contained in
" Insertions And Appends: insert append {{{2
+" (buftype != nofile test avoids having append, change, insert show up in the command window)
" =======================
-syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$""
-syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$""
-syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$""
+if &buftype != 'nofile'
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$""
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$""
+ syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$""
+endif
" Behave! {{{2
" =======