summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-12 22:49:12 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-12 22:49:12 +0200
commit47e13953ffdbb9f163b901196dec8c2100b72edd (patch)
treecc2251dbffe417d931b2c234f686e58d5c61f9d8 /runtime/syntax
parent9e6ba8cbef2b2363f1d0a0e2c2a8d21c3b987416 (diff)
downloadvim-git-47e13953ffdbb9f163b901196dec8c2100b72edd.tar.gz
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/gnuplot.vim4
-rw-r--r--runtime/syntax/masm.vim4
-rw-r--r--runtime/syntax/pamenv.vim28
-rw-r--r--runtime/syntax/php.vim25
-rw-r--r--runtime/syntax/sh.vim21
5 files changed, 56 insertions, 26 deletions
diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim
index 7777cc9e4..9c98e67e5 100644
--- a/runtime/syntax/gnuplot.vim
+++ b/runtime/syntax/gnuplot.vim
@@ -3,7 +3,7 @@
" 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: 2015-08-25
+" Last Change: 2020 May 12
" 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
@@ -479,7 +479,7 @@ syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr
" ---- Macros ---- "
-syn region gnuplotMacro start="@" end=" "
+syn match gnuplotMacro "@[a-zA-Z0-9_]*"
" ---- Todos ---- "
diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim
index abee78b86..c3b2a9bd6 100644
--- a/runtime/syntax/masm.vim
+++ b/runtime/syntax/masm.vim
@@ -2,7 +2,7 @@
" Language: Microsoft Macro Assembler (80x86)
" Orig Author: Rob Brady <robb@datatone.com>
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
-" Last Change: 2020-05-07 17:04:10 +0800
+" Last Change: 2020-05-09 22:55:38 +0800
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -12,7 +12,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
+syn iskeyword @,48-57,_,36,60,62,63,@-@
syn case ignore
diff --git a/runtime/syntax/pamenv.vim b/runtime/syntax/pamenv.vim
new file mode 100644
index 000000000..90359daa6
--- /dev/null
+++ b/runtime/syntax/pamenv.vim
@@ -0,0 +1,28 @@
+" Vim syntax file
+" Language: pam_env.conf(5) configuration file
+" Latest Revision: 2020-05-10
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn keyword pamenvTodo contained TODO FIXME XXX NOTE
+syn region pamenvComment start='^#' end='$' display oneline contains=pamenvTodo,@Spells
+
+syn match pamenvVars '^[A-Z_][A-Z_0-9]*' nextgroup=pamenvKeywords skipwhite
+
+syn keyword pamenvKeywords contained DEFAULT OVERRIDE nextgroup=pamenvVarEq
+
+syn match pamenvVarEq contained '=' nextgroup=pamenvValue,pamenvValueWithQuote
+
+syn match pamenvValue contained '[^ \t]*' skipwhite nextgroup=pamenvKeywords
+syn region pamenvValueWithQuote contained start='"' end='"' skipwhite nextgroup=pamenvKeywords
+
+hi def link pamenvTodo Todo
+hi def link pamenvComment Comment
+hi def link pamenvKeywords Keyword
+hi def link pamenvVars Identifier
+hi def link pamenvValue String
+hi def link pamenvValueWithQuote String
+
+let b:current_syntax = "pamenv"
diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim
index 04036fdf3..720d71e64 100644
--- a/runtime/syntax/php.vim
+++ b/runtime/syntax/php.vim
@@ -1,9 +1,11 @@
" Vim syntax file
" Language: php PHP 3/4/5/7
-" Maintainer: Jason Woofenden <jason@jasonwoof.com>
-" Last Change: Oct 19, 2019
-" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
-" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
+" Maintainer: Tyson Andre <tysonandre775@hotmail.com>
+" Last Change: May 11, 2020
+" URL: https://github.com/TysonAndre/vim-syntax
+" Former Maintainers:
+" Jason Woofenden <jason@jasonwoof.com>
+" Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
"
" Note: If you are using a colour terminal with dark background, you will
@@ -91,7 +93,7 @@ if exists( "php_htmlInStrings")
syn cluster phpAddStrings add=@htmlTop
endif
-" make sure we can use \ at the begining of the line to do a continuation
+" make sure we can use \ at the beginning of the line to do a continuation
let s:cpo_save = &cpo
set cpo&vim
@@ -314,7 +316,7 @@ syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contain
" define a cluster to get all interpolation syntaxes for double-quoted strings
syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex
-" Methoden
+" Methods
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display
" Include
@@ -328,14 +330,14 @@ syn keyword phpBoolean true false contained
" Float
" Refer to: https://www.php.net/manual/en/language.types.float.php
-syn match phpFloat "\%(\w\|\.\)\@<!\%(\d\|\.\)*\d\%(\d\|\.\)*\%([eE][+-]\=\%(\d\|\.\)\+\)\=\%(\w\|\.\)\@!" contained contains=phpFloatError display
-syn match phpFloatError "[eE.].*\." contained display
+syn match phpFloat "\%(\w\|\.\)\@<!\%(\d_\?\|\.\)*\d\%(\d\|_\|\.\)*\%([eE][+-]\=\%(\d\|_\|\.\)\+\)\=\%(\w\|\.\)\@!" contained contains=phpFloatError display
+syn match phpFloatError "\%([eE.][0-9._+-]*\.\|__\|_\(\>\|[eE]\)\|\(\>\|[eE]\)_\)" contained display
" Number
-syn match phpNumber "\%(\.\)\@<!\<\%([1-9]\d*\|0\|0[xX]\x\+\)\>\%(\.\)\@!" contained display
+syn match phpNumber "\%(\.\)\@<!\<\%([1-9]\d*\|0\|0[xX]\(\x_\?\)*\x\)\>\%(\.\)\@!" contained display
syn match phpNumber "\%(\.\)\@<!\<0\d\+\>\%(\.\)\@!" contained contains=phpOctalError display
syn match phpBinaryError "[2-9]" contained display
-syn match phpNumber "\%(\.\)\@<!\<0[bB]\d\+\>\%(\.\)\@!" contained contains=phpBinaryError display
+syn match phpNumber "\%(\.\)\@<!\<0[bB]\(\d_\?\)*\d\>\%(\.\)\@!" contained contains=phpBinaryError display
" Backslash escapes
syn case match
@@ -442,6 +444,7 @@ if exists("php_folding") && php_folding==1
" match one line constructs here and skip them at folding
syn keyword phpSCKeyword abstract final private protected public static contained
syn keyword phpFCKeyword function contained
+ syn keyword phpDefine fn contained
syn keyword phpStorageClass global contained
syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword
syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*\(trait\|class\)\(\s\+.*}\)\@=" contained
@@ -459,7 +462,7 @@ if exists("php_folding") && php_folding==1
syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
else
- syn keyword phpDefine function contained
+ syn keyword phpDefine function fn contained
syn keyword phpStructure abstract class trait interface contained
syn keyword phpException catch throw try finally contained
syn keyword phpStorageClass final global private protected public static contained
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 0f4406d3e..3a2a6e7b0 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Oct 16, 2019
-" Version: 189
+" Last Change: Apr 14, 2020
+" Version: 190
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@@ -357,19 +357,18 @@ elseif !exists("g:sh_no_error")
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ
-syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
-syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
+syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
+syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
-syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList
syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList
syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNxt contained "\\[\\"'`$()#]"
-syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart
-syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
+"syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart
+"syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
" Comments: {{{1
"==========
@@ -454,13 +453,13 @@ if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
-syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
+syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList
syn match shDerefSimple "\$\$" nextgroup=@shNoZSList
-syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList
+syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
- syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
- syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
+ syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
+ syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
endif
" ksh: ${!var[*]} array index list syntax: {{{1