mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
updated for version 7.0c11
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
" Language: Makefile
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/make.vim
|
||||
" Last Change: 2005 Apr 17
|
||||
" Last Change: 2006 Apr 5
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -13,15 +13,15 @@ elseif exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
" some special characters
|
||||
syn match makeSpecial "^\s*[@-]\+"
|
||||
syn match makeSpecial "^\s*[@+-]\+"
|
||||
syn match makeNextLine "\\\n\s*"
|
||||
|
||||
" some directives
|
||||
syn match makePreCondit "^\s*\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)"
|
||||
syn match makeInclude "^\s*[-s]\=include"
|
||||
syn match makeStatement "^\s*vpath"
|
||||
syn match makeExport "^\s*\(export\|unexport\)\>"
|
||||
syn match makeOverride "^\s*override"
|
||||
syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)"
|
||||
syn match makeInclude "^ *[-s]\=include"
|
||||
syn match makeStatement "^ *vpath"
|
||||
syn match makeExport "^ *\(export\|unexport\)\>"
|
||||
syn match makeOverride "^ *override"
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
@@ -30,8 +30,8 @@ syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStat
|
||||
|
||||
" Microsoft Makefile specials
|
||||
syn case ignore
|
||||
syn match makeInclude "^!\s*include"
|
||||
syn match makePreCondit "!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
|
||||
syn match makeInclude "^! *include"
|
||||
syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
|
||||
syn case match
|
||||
|
||||
" identifiers
|
||||
@@ -39,8 +39,8 @@ syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString
|
||||
syn match makeIdent "\$\$\w*"
|
||||
syn match makeIdent "\$[^({]"
|
||||
syn match makeIdent "^\s*\a\w*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^\s*\a\w*\s*="me=e-1
|
||||
syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *\a\w*\s*="me=e-1
|
||||
syn match makeIdent "%"
|
||||
|
||||
" Makefile.in variables
|
||||
@@ -54,8 +54,8 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSourc
|
||||
syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn match makeCommandError "^\s\+\S.*" contained
|
||||
syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError
|
||||
@@ -67,9 +67,9 @@ syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|cal
|
||||
|
||||
" Comment
|
||||
if exists("make_microsoft")
|
||||
syn match makeComment "#.*" contains=makeTodo,@Spell
|
||||
else
|
||||
syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo,@Spell
|
||||
syn match makeComment "#.*" contains=makeTodo
|
||||
elseif !exists("make_no_comments")
|
||||
syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo
|
||||
syn match makeComment "#$"
|
||||
endif
|
||||
syn keyword makeTodo TODO FIXME XXX contained
|
||||
|
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Mar 01, 2006
|
||||
" Version: 81
|
||||
" Last Change: Apr 06, 2006
|
||||
" Version: 82
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Using the following VIM variables: {{{1
|
||||
@@ -79,7 +79,7 @@ syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial,shExpr,shDblBrace,shDeref,shDerefSimple
|
||||
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial,shOperator,shFunctionStart
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial,shOperator,shFunctionStart
|
||||
syn cluster shHereBeginList contains=@shCommandSubList
|
||||
syn cluster shHereList contains=shBeginHere,shHerePayload
|
||||
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
|
||||
@@ -154,9 +154,15 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
|
||||
|
||||
" Loops: do, if, while, until {{{1
|
||||
" ======
|
||||
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen
|
||||
syn region shFor matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
if g:sh_fold_enabled
|
||||
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
|
||||
else
|
||||
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
|
||||
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")
|
||||
syn cluster shCaseList add=shRepeat
|
||||
syn region shRepeat matchgroup=shLoop start="\<while\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace
|
||||
@@ -174,7 +180,11 @@ syn match shComma contained ","
|
||||
syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e 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="[^#$()'"]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
|
||||
syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
|
||||
if g:sh_fold_enabled
|
||||
syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
|
||||
else
|
||||
syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
|
||||
endif
|
||||
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
|
||||
if exists("b:is_bash")
|
||||
syn region shCaseExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
@@ -319,7 +329,7 @@ endif
|
||||
|
||||
" Functions: {{{1
|
||||
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo
|
||||
syn match shFunctionStart "{" contained
|
||||
syn match shFunctionStart "^\s*{" contained
|
||||
if g:sh_fold_enabled
|
||||
syn region shFunctionOne transparent fold start="^\s*\h\w*\s*()\_s*\ze{" matchgroup=shFunctionStart end="}" contains=@shFunctionList
|
||||
syn region shFunctionTwo transparent fold start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}" contains=shFunctionKey,@shFunctionList contained
|
||||
|
Reference in New Issue
Block a user