aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
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/sh.vim21
4 files changed, 42 insertions, 15 deletions
diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim
index 7777cc9e46..9c98e67e58 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 abee78b86d..c3b2a9bd63 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 0000000000..90359daa61
--- /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/sh.vim b/runtime/syntax/sh.vim
index 0f4406d3e1..3a2a6e7b0e 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