diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-08-13 00:10:32 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-08-13 00:10:32 +0200 |
commit | 4935f02217e81d1ee674645517d30947fc750e3f (patch) | |
tree | c282db4fd3cff8e10af59bc162ecb2a65838d085 /syntax | |
parent | 438d222b953ec3f46eb534153243acc1f30b7694 (diff) | |
download | vim-polyglot-4935f02217e81d1ee674645517d30947fc750e3f.tar.gz vim-polyglot-4935f02217e81d1ee674645517d30947fc750e3f.zip |
Add blade support, closes #34
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/blade.vim | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/syntax/blade.vim b/syntax/blade.vim new file mode 100644 index 00000000..a02b88ae --- /dev/null +++ b/syntax/blade.vim @@ -0,0 +1,35 @@ +" Language: Blade (Laravel) +" Maintainer: xsbeats <jwalton512@gmail.com> +" URL: http://github.com/xsbeats/vim-blade +" License: WTFPL + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/html.vim +unlet b:current_syntax + +runtime! syntax/php.vim +unlet b:current_syntax + +syn match bladeConditional /@\(choice\|each\|elseif\|extends\|for\|foreach\|if\|include\|lang\|section\|unless\|while\|yield\)\>\s*/ nextgroup=bladeParenBlock containedin=ALLBUT,bladeComment + +syn match bladeKeyword /@\(else\|endfor\|endforeach\|endif\|endsection\|endunless\|endwhile\|overwrite\|parent\|show\|stop\)\>/ containedin=ALL,bladeComment + +syn region bladeCommentBlock start="{{--" end="--}}" contains=bladeComment keepend containedin=TOP +syn match bladeComment /.*/ contained containedin=bladeCommentBlock + +syn region bladeEchoUnescaped matchgroup=bladeEchoDelim start="\([@|{]\)\@<!{{\(--\)\@!" end="}}" contains=@phpClInside containedin=ALLBUT,bladeComment +syn region bladeEchoEscaped matchgroup=bladeEchoDelim start="\(@\)\@<!{{{" end="}}}" contains=@phpClInside containedin=ALLBUT,bladeComment + +syn cluster bladeStatement contains=bladeConditional,bladeKeyword + +syn region bladeParenBlock start="(" end=")" contained oneline contains=bladeParenBlock,@phpClInside,@bladeStatement extend keepend + +hi def link bladeComment Comment +hi def link bladeConditional Conditional +hi def link bladeKeyword Keyword +hi def link bladeEchoDelim Delimiter + +let b:current_syntax = 'blade' |