Updated syntax file by Timo Schmiade

This commit is contained in:
Holger Rapp 2011-02-19 20:00:24 +01:00
parent c8fe2f4b02
commit b371f0c8c4

View File

@ -5,17 +5,23 @@ syn match snipComment "^#.*"
syn match snipString '"[^"]*"'
syn match snipTabsOnly "^\t\+$"
syn match snipKeyword "\<\(end\)\?\(snippet\|global\)\>" contained
syn match snipKeyword "\(\<\(end\)\?\(snippet\|global\)\>\)\|extends" contained
" extends definitions
syn match snipExtends "^extends.*" contains=snipKeyword
" snippet definitions
syn match snipStart "^snippet.*" contained contains=snipKeyword,snipString
syn match snipEnd "^endsnippet" contained contains=snipKeyword
syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snipStart,snipEnd,snipTabsOnly
syn region snipCommand contained keepend start="`" end="`"
syn match snipVar "\$\d" contained
syn region snipVarExpansion matchgroup=Define start="\${\d" end="}" contained contains=snipVar,snipVarExpansion,snipCommand
syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snipStart,snipEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar
" global definitions
syn match snipGlobalStart "^global.*" contained contains=snipKeyword,snipString
syn match snipGlobalEnd "^endglobal" contained contains=snipKeyword
syn region snipGlobal fold keepend start="^global" end="^endglobal" contains=snipGlobalStart,snipGlobalEnd,snipTabsOnly
syn region snipGlobal fold keepend start="^global" end="^endglobal" contains=snipGlobalStart,snipGlobalEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar
" highlighting rules
@ -25,8 +31,13 @@ hi link snipTabsOnly Error
hi link snipKeyword Keyword
hi link snipExtends Statement
hi link snipStart Statement
hi link snipEnd Statement
hi link snipCommand Special
hi link snipVar Define
hi link snipVarExpansion Normal
hi link snippet Normal
hi link snipGlobalStart Statement