r1228 - in /trunk/packages/vim: debian/changelog patches/sh.vim_syntax.diff

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Mon Mar 3 04:22:40 UTC 2008


Author: jamessan
Date: Mon Mar  3 04:22:39 2008
New Revision: 1228

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1228
Log:
* Updated patches:
  - sh.vim_syntax.diff:
    + No longer mishighlight parenthetical expressions inside arithmetic
      expansions.  (Closes: #468366)

Modified:
    trunk/packages/vim/debian/changelog
    trunk/packages/vim/patches/sh.vim_syntax.diff

Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1228&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Mon Mar  3 04:22:39 2008
@@ -4,6 +4,10 @@
     - option.c-p_para.diff:
       + Recognize a few extra groff macros (TP, HP, Pp, Lp, and It) in the
         default 'paragraphs' option.  (Closes: #468924)
+  * Updated patches:
+    - sh.vim_syntax.diff:
+      + No longer mishighlight parenthetical expressions inside arithmetic
+        expansions.  (Closes: #468366)
 
  -- James Vega <jamessan at debian.org>  Wed, 27 Feb 2008 12:34:27 -0500
 

Modified: trunk/packages/vim/patches/sh.vim_syntax.diff
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/patches/sh.vim_syntax.diff?rev=1228&op=diff
==============================================================================
--- trunk/packages/vim/patches/sh.vim_syntax.diff (original)
+++ trunk/packages/vim/patches/sh.vim_syntax.diff Mon Mar  3 04:22:39 2008
@@ -2,23 +2,64 @@
 ===================================================================
 --- vim/runtime/syntax/sh.vim.orig
 +++ vim/runtime/syntax/sh.vim
-@@ -2,8 +2,8 @@
+@@ -2,22 +2,10 @@
  " Language:		shell (sh) Korn shell (ksh) bash (sh)
  " Maintainer:		Dr. Charles E. Campbell, Jr.  <NdrOchipS at PcampbellAfamily.Mbiz>
  " Previous Maintainer:	Lennart Schultz <Lennart.Schultz at ecmwf.int>
 -" Last Change:		Dec 12, 2006
 -" Version:		89
-+" Last Change:		Oct 22, 2007
-+" Version:		90 ASTRO-ONLY
++" Last Change:		Mar 02, 2008
++" Version:		96	ASTRO-ONLY
  " URL:		http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
- "
- " Using the following VIM variables: {{{1
-@@ -73,12 +73,12 @@
- syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq
+-"
+-" Using the following VIM variables: {{{1
+-" g:is_bash		if none of the previous three variables are
+-"		defined, then if g:is_bash is set enhance with
+-"		bash syntax highlighting
+-" g:is_kornshell	if neither b:is_kornshell or b:is_bash is
+-"		defined, then if g:is_kornshell is set
+-"		enhance with kornshell/POSIX syntax highlighting
+-" g:is_posix                    this variable is the same as g:is_kornshell
+-" g:sh_fold_enabled	if non-zero, syntax folding is enabled
+-" g:sh_minlines		sets up syn sync minlines (dflt: 200)
+-" g:sh_maxlines		sets up syn sync maxlines (dflt: 2x sh_minlines)
+-"
++" For options and settings, please use:      :help ft-sh-syntax
+ " This file includes many ideas from Éric Brunet (eric.brunet at ens.fr)
+ 
+ " For version 5.x: Clear all syntax items {{{1
+@@ -61,6 +49,15 @@
+  let g:sh_fold_enabled= 0
+  echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
+ endif
++if !exists("s:sh_fold_functions")
++ let s:sh_fold_functions = 1
++endif
++if !exists("s:sh_fold_heredoc")
++ let s:sh_fold_heredoc   = 2
++endif
++if !exists("s:sh_fold_ifdofor")
++ let s:sh_fold_ifdofor   = 4
++endif
+ if g:sh_fold_enabled && &fdm == "manual"
+  set fdm=syntax
+ endif
+@@ -70,26 +67,33 @@
+ 
+ " Clusters: contains=@... clusters {{{1
+ "==================================
+-syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq
++syn cluster shErrorList	contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError
++if exists("b:is_kornshell")
++ syn cluster ErrorList add=shDTestError
++endif
++syn cluster shArithParenList	contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen
++syn cluster shArithList	contains=@shArithParenList,shParenError
++syn cluster shCaseEsacList	contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq, at shErrorList,shStringSpecial
  syn cluster shCaseList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
  syn cluster shColonList	contains=@shCaseList
 -syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq
-+syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial
++syn cluster shCommandSubList	contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial
  syn cluster shCurlyList	contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
  syn cluster shDblQuoteList	contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shExSingleQuote,shCtrlSeq,shSpecial
  syn cluster shDerefList	contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
@@ -28,10 +69,28 @@
  syn cluster shExprList1	contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
  syn cluster shExprList2	contains=@shExprList1, at shCaseList,shTest
  syn cluster shFunctionList	contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shFunctionStart,shCtrlSeq
-@@ -99,8 +99,9 @@
+ if exists("b:is_kornshell") || exists("b:is_bash")
++ syn cluster shFunctionList	add=shRepeat
+  syn cluster shFunctionList	add=shDblBrace,shDblParen
+ endif
+ syn cluster shHereBeginList	contains=@shCommandSubList
+ syn cluster shHereList	contains=shBeginHere,shHerePayload
+ syn cluster shHereListDQ	contains=shBeginHere, at shDblQuoteList,shHerePayload
+-syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq
+-syn cluster shLoopList	contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest
++syn cluster shIdList	contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial
++syn cluster shLoopList	contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest, at shErrorList,shSet
+ syn cluster shSubShList	contains=@shCaseList,shOperator
+ syn cluster shTestList	contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
+ 
+@@ -97,10 +101,11 @@
+ " Echo: {{{1
+ " ====
  " This one is needed INSIDE a CommandSub, so that `echo bla` be correct
- syn region shEcho matchgroup=shStatement start="\<echo\>"  skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
- syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
+-syn region shEcho matchgroup=shStatement start="\<echo\>"  skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
+-syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList
++syn region shEcho matchgroup=shStatement start="\<echo\>"  skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
++syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
 +syn match  shEchoQuote contained	'\%(\\\\\)*\\["`']'
  
 -" This must be after the strings, so that bla \" be correct
@@ -39,7 +98,16 @@
  syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq
  
  " Alias: {{{1
-@@ -182,7 +183,8 @@
+@@ -172,7 +177,7 @@
+ 
+ " Loops: do, if, while, until {{{1
+ " ======
+-if g:sh_fold_enabled
++if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
+  syn region shDo	fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
+  syn region shIf	fold transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>"   contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
+  syn region shFor	fold matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
+@@ -182,7 +187,8 @@
   syn region shFor	matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
  endif
  if exists("b:is_kornshell") || exists("b:is_bash")
@@ -49,7 +117,7 @@
   syn region shRepeat   matchgroup=shLoop   start="\<while\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen,shDblBrace
   syn region shRepeat   matchgroup=shLoop   start="\<until\>" end="\<in\>" end="\<do\>"me=e-2	contains=@shLoopList,shDblParen,shDblBrace
   syn region shCaseEsac matchgroup=shConditional start="\<select\>" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList
-@@ -195,9 +197,9 @@
+@@ -195,10 +201,10 @@
  
  " Case: case...esac {{{1
  " ====
@@ -57,30 +125,87 @@
 +syn match   shCaseBar	contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|"		nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
  syn match   shCaseStart	contained skipwhite skipnl "("			nextgroup=shCase,shCaseBar
 -syn region  shCase	contained skipwhite skipnl matchgroup=shSnglCase start="\([^#$()'" \t]\|\\.\)\{-})"ms=s,hs=e  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
+-if g:sh_fold_enabled
 +syn region  shCase	contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)"  end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
- if g:sh_fold_enabled
++if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
   syn region  shCaseEsac	fold matchgroup=shConditional start="\<case\>" end="\<esac\>"	contains=@shCaseEsacList
  else
-@@ -275,7 +277,7 @@
+  syn region  shCaseEsac	matchgroup=shConditional start="\<case\>" end="\<esac\>"	contains=@shCaseEsacList
+@@ -217,6 +223,7 @@
+ "======
+ syn match   shWrapLineOperator "\\$"
+ syn region  shCommandSub   start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
++syn match   shEscape	contained	'\\.'
+ 
+ " $() and $(()): {{{1
+ " $(..) is not supported by sh (Bourne shell).  However, apparently
+@@ -226,7 +233,7 @@
+ " an Error under /bin/sh.  By consensus of vimdev'ers!
+ if exists("b:is_kornshell") || exists("b:is_bash")
+  syn region shCommandSub matchgroup=shCmdSubRegion start="\$("  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList
+- syn region shArithmetic matchgroup=shArithRegion  start="\$((" skip='\\\\\|\\.' end="))" contains=@shCommandSubList
++ syn region shArithmetic matchgroup=shArithRegion  start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
+  syn match  shSkipInitWS contained	"^\s\+"
+ else
+  syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
+@@ -275,7 +282,8 @@
  syn cluster    shCommentGroup	contains=shTodo, at Spell
  syn keyword    shTodo	contained	COMBAK FIXME TODO XXX
  syn match      shComment	"^\s*\zs#.*$"	contains=@shCommentGroup
 -syn match      shComment	"#.*$"	contains=@shCommentGroup
-+syn match      shComment	"\s#.*$"ms=s+1	contains=@shCommentGroup
++syn match      shComment	"\s\zs#.*$"	contains=@shCommentGroup
++syn match      shQuickComment	contained	"#.*$"
  
  " Here Documents: {{{1
  " =========================================
-@@ -344,14 +346,12 @@
+@@ -287,7 +295,7 @@
+  syn region shHereDoc matchgroup=shRedir start="<<\s*\**\.\**"	matchgroup=shRedir	end="^\.$"	contains=@shDblQuoteList
+  syn region shHereDoc matchgroup=shRedir start="<<-\s*\**\.\**"	matchgroup=shRedir	end="^\s*\.$"	contains=@shDblQuoteList
+ 
+-elseif g:sh_fold_enabled
++elseif (g:sh_fold_enabled % (s:sh_fold_heredoc * 2))/s:sh_fold_heredoc
+  syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)"		matchgroup=shRedir end="^\z1\s*$"	contains=@shDblQuoteList
+  syn region shHereDoc matchgroup=shRedir fold start="<<\s*\"\z(\S*\)\""		matchgroup=shRedir end="^\z1\s*$"
+  syn region shHereDoc matchgroup=shRedir fold start="<<\s*'\z(\S*\)'"		matchgroup=shRedir end="^\z1\s*$"
+@@ -327,31 +335,30 @@
+ " Identifiers: {{{1
+ "=============
+ syn match  shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze="	nextgroup=shSetIdentifier
+-syn match  shIdWhiteSpace  contained	"\s"
++syn match  shIdWhiteSpace  contained	"\s\+"
+ syn match  shSetIdentifier contained	"="	nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote
+ if exists("b:is_bash")
+-  syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList
+-  syn region shSetList matchgroup=shSet start="\<set\>[^/]"me=e-1 end="$" end="\\ze[|)]"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
+-  syn match  shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)\>"
++ syn region shSetList oneline keepend matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$"	matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList
++ syn region shSetList oneline keepend matchgroup=shSet start="\<set\>\ze[^/]" end="$" end="\\ze[|)]"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
++ syn match  shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)\>"
+ elseif exists("b:is_kornshell")
+-  syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
+-  syn region shSetList matchgroup=shSet start="\<set\>\ze[^/]" end="$\|\ze[})]"			matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
+-  syn match  shSet "\<\(typeset\|set\|export\|unset\)\>"
++ syn region shSetList oneline keepend matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$"		matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
++ syn region shSetList oneline keepend matchgroup=shSet start="\<set\>\ze[^/]" end="$\|\ze[})]"			matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
++ syn match  shSet "\<\(typeset\|set\|export\|unset\)\>" skipwhite nextgroup=shOption
+ else
+-  syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]"	matchgroup=shOperator end="\ze[|);&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
+-  syn match  shStatement "\<\(set\|export\|unset\)\>"
++ syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]"	matchgroup=shOperator end="\ze[|);&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList
++ syn match  shStatement "\<\(set\|export\|unset\)\>"
+ endif
  
  " Functions: {{{1
  syn keyword shFunctionKey function	skipwhite skipnl nextgroup=shFunctionTwo
 -" COMBAK -- look at bash09.  function foo() (line#35) is folding 38 lines.  Not being terminated properly
 -"syn match   shFunctionStart	"{"	contained
- if g:sh_fold_enabled
+-if g:sh_fold_enabled
 - syn region shFunctionOne transparent fold	start="^\s*\h\w*\s*()\_s*\ze{"    matchgroup=shFunctionStart end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart
 - syn region shFunctionTwo transparent fold	start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}"	contains=shFunctionKey, at shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart
-+ syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart
-+ syn region shFunctionTwo fold	matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey, at shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart
++
++if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions
++ syn region shFunctionOne fold	matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}"	contains=@shFunctionList			skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
++ syn region shFunctionTwo fold	matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{"	end="}"	contains=shFunctionKey, at shFunctionList contained	skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
  else
 - syn region shFunctionOne transparent	start="^\s*\h\w*\s*()\_s*\ze{"    matchgroup=shFunctionStart end="}"	contains=@shFunctionList
 - syn region shFunctionTwo transparent	start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}"	contains=shFunctionKey, at shFunctionList contained
@@ -89,7 +214,15 @@
  endif
  
  " Parameter Dereferencing: {{{1
-@@ -399,9 +399,9 @@
+@@ -363,6 +370,7 @@
+ syn match  shDerefSimple	"\$\$"
+ if exists("b:is_bash") || exists("b:is_kornshell")
+  syn region shDeref	matchgroup=PreProc start="\${##\=" end="}"	contains=@shDerefList
++ syn region shDeref	matchgroup=PreProc start="\${\$\$" end="}"	contains=@shDerefList
+ endif
+ 
+ " bash: ${!prefix*} and ${#parameter}: {{{1
+@@ -399,9 +407,9 @@
   syn region shDerefPattern	contained	start="{" end="}"	contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
   syn match  shDerefEscape	contained	'\%(\\\\\)*\\.'
  endif
@@ -98,27 +231,38 @@
 -syn match  shDerefString	contained	"\\["']"
 +syn region shDerefString	contained	matchgroup=shOperator start=+\%(\\\)\@<!'+ end=+'+		contains=shStringSpecial
 +syn region shDerefString	contained	matchgroup=shOperator start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+	contains=@shDblQuoteList,shStringSpecial
-+syn match  shDerefString	contained	"\\["']" nextgroup=shDerefPattern
++syn match  shDerefString	contained	"\\["']"	nextgroup=shDerefPattern
  
  if exists("b:is_bash")
   " bash : ${parameter:offset}
-@@ -478,9 +478,10 @@
+@@ -416,6 +424,9 @@
+  syn region shDerefPPSright	contained	start='.'	end='\ze}'	contains=@shCommandSubList
+ endif
+ 
++" Arithmetic Parenthesized Expressions: {{{1
++syn region shParen matchgroup=shArithRegion start='(\ze[^(]' end=')' contains=@shArithParenList
++
+ " Useful sh Keywords: {{{1
+ " ===================
+ syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
+@@ -478,15 +489,19 @@
  hi def link shDerefVar	shDeref
  hi def link shDoubleQuote	shString
  hi def link shEcho	shString
 +hi def link shEchoQuote	shString
  hi def link shEmbeddedEcho	shString
++hi def link shEscape	shCommandSub
  hi def link shExSingleQuote	shSingleQuote
 -hi def link shFunctionStart	Delimiter
 +hi def link shFunction	Function
  hi def link shHereDoc	shString
  hi def link shHerePayload	shHereDoc
  hi def link shLoop	shStatement
-@@ -541,7 +542,6 @@
- hi def link shFunctionName		Function
- hi def link shNumber		Number
- hi def link shOperator		Operator
--hi def link shRepeat		Repeat
- hi def link shSet		Statement
- hi def link shSetList		Identifier
- hi def link shShellVariables		PreProc
+ hi def link shOption	shCommandSub
+ hi def link shPattern	shString
++hi def link shParen	shArithmetic
+ hi def link shPosnParm	shShellVariables
++hi def link shQuickComment	shComment
+ hi def link shRange	shOperator
+ hi def link shRedir	shOperator
+ hi def link shSingleQuote	shString




More information about the pkg-vim-maintainers mailing list