Added improvements to the syntax file by Anthony Jackson
This commit is contained in:
parent
20742d3a6c
commit
3563b7a57f
@ -704,6 +704,7 @@ Contributers are listed in chronological order:
|
|||||||
rupa - Rupa Deadwyler
|
rupa - Rupa Deadwyler
|
||||||
Timo Schmiade
|
Timo Schmiade
|
||||||
blueyed - Daniel Hahler
|
blueyed - Daniel Hahler
|
||||||
|
Anthony Jackson
|
||||||
|
|
||||||
7.2 Snippets *UltiSnips-contrisnippets*
|
7.2 Snippets *UltiSnips-contrisnippets*
|
||||||
------------
|
------------
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
" Syntax highlighting for snippet files (used for UltiSnips.vim)
|
" Syntax highlighting for snippet files (used for UltiSnips.vim)
|
||||||
|
" Revision: 26/03/11 19:53:33
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syntax include @Python syntax/python.vim
|
||||||
|
|
||||||
" global matches
|
" global matches
|
||||||
syn match snipComment "^#.*"
|
syn match snipComment "^#.*" contains=snipTODO
|
||||||
|
syn keyword snipTODO FIXME NOTE NOTES TODO XXX contained
|
||||||
|
|
||||||
syn match snipString '"[^"]*"'
|
syn match snipString '"[^"]*"'
|
||||||
syn match snipTabsOnly "^\t\+$"
|
syn match snipTabsOnly "^\t\+$"
|
||||||
|
|
||||||
@ -13,7 +22,8 @@ syn match snipExtends "^extends.*" contains=snipKeyword
|
|||||||
" snippet definitions
|
" snippet definitions
|
||||||
syn match snipStart "^snippet.*" contained contains=snipKeyword,snipString
|
syn match snipStart "^snippet.*" contained contains=snipKeyword,snipString
|
||||||
syn match snipEnd "^endsnippet" contained contains=snipKeyword
|
syn match snipEnd "^endsnippet" contained contains=snipKeyword
|
||||||
syn region snipCommand contained keepend start="`" end="`"
|
syn region snipCommand contained keepend start="`" end="`" contains=snipPythonCommand
|
||||||
|
syn region snipPythonCommand contained keepend start="`!p" end="`" contained contains=@Python
|
||||||
syn match snipVar "\$\d" contained
|
syn match snipVar "\$\d" contained
|
||||||
syn region snipVarExpansion matchgroup=Define start="\${\d" end="}" contained contains=snipVar,snipVarExpansion,snipCommand
|
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
|
syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snipStart,snipEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar
|
||||||
@ -21,7 +31,7 @@ syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snip
|
|||||||
" global definitions
|
" global definitions
|
||||||
syn match snipGlobalStart "^global.*" contained contains=snipKeyword,snipString
|
syn match snipGlobalStart "^global.*" contained contains=snipKeyword,snipString
|
||||||
syn match snipGlobalEnd "^endglobal" contained contains=snipKeyword
|
syn match snipGlobalEnd "^endglobal" contained contains=snipKeyword
|
||||||
syn region snipGlobal fold keepend start="^global" end="^endglobal" contains=snipGlobalStart,snipGlobalEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar
|
syn region snipGlobal fold keepend start="^global" end="^endglobal" contains=snipGlobalStart,snipGlobalEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar,@Python
|
||||||
|
|
||||||
" highlighting rules
|
" highlighting rules
|
||||||
|
|
||||||
@ -36,10 +46,12 @@ hi link snipExtends Statement
|
|||||||
hi link snipStart Statement
|
hi link snipStart Statement
|
||||||
hi link snipEnd Statement
|
hi link snipEnd Statement
|
||||||
hi link snipCommand Special
|
hi link snipCommand Special
|
||||||
hi link snipVar Define
|
hi link snipVar StorageClass
|
||||||
hi link snipVarExpansion Normal
|
hi link snipVarExpansion Normal
|
||||||
hi link snippet Normal
|
hi link snippet Normal
|
||||||
|
|
||||||
hi link snipGlobalStart Statement
|
hi link snipGlobalStart Statement
|
||||||
hi link snipGlobalEnd Statement
|
hi link snipGlobalEnd Statement
|
||||||
hi link snipGlobal Normal
|
hi link snipGlobal Normal
|
||||||
|
|
||||||
|
let b:current_syntax = "snippet"
|
||||||
|
Loading…
Reference in New Issue
Block a user