From 70b0f6b8c99616030401ee32b1093b48509cac40 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 7 Apr 2010 00:11:50 +0200 Subject: Add support for the <%ns:function ...> syntax in mako. --- .vim/syntax/mako.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.vim') diff --git a/.vim/syntax/mako.vim b/.vim/syntax/mako.vim index afc31c8..3843666 100644 --- a/.vim/syntax/mako.vim +++ b/.vim/syntax/mako.vim @@ -34,12 +34,12 @@ syn include @pythonTop syntax/python.vim syn keyword makoEnd contained endfor endwhile endif endtry enddef " Block rules -syn region makoLine matchgroup=makoDelim start=#^\s*%# end=#$# keepend contains=@pythonTop,makoEnd -syn region makoBlock matchgroup=makoDelim start=#<%!\?# end=#%># keepend contains=@pythonTop,makoEnd +syn region makoLine matchgroup=makoDelim start="^\s*%" end="$" keepend contains=@pythonTop,makoEnd +syn region makoBlock matchgroup=makoDelim start="<%!\?" end="%>" keepend contains=@pythonTop,makoEnd " Variables syn region makoNested start="{" end="}" transparent display contained contains=makoNested,@pythonTop -syn region makoVariable matchgroup=makoDelim start=#\${# end=#}# contains=makoNested,@pythonTop +syn region makoVariable matchgroup=makoDelim start="\${" end="}" contains=makoNested,@pythonTop " Comments syn region makoComment start="^\s*##" end="$" @@ -54,11 +54,11 @@ syn region makoAttributeValue containedin=makoTag contained start=/"/ skip=/\\"/ syn region makoAttributeValue containedin=MakoTag contained start=/'/ skip=/\\'/ end=/'/ " Tags -syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\)\>" end="/\?>" -syn match makoDelim "" +syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\|\([a-zA-Z_]\+:[a-zA-Z_]\+\)\)\>" end="/\?>" +syn match makoDelim "" " Newline Escapes -syn match makoEscape /\\$/ +syn match makoEscape "\\$" " Default highlighting links if version >= 508 || !exists("did_mako_syn_inits") -- cgit v1.2.3-70-g09d2