From 3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed Mon Sep 17 00:00:00 2001 From: Dan Reif Date: Mon, 30 Apr 2018 12:00:42 -0700 Subject: Update (periodic rebuild) I originally meant to run this before adding haproxy, but accidentally pushed that into my branch. If you'd like to see that content, it's at https://github.com/CH-DanReif/vim-polyglot/commit/414ad25c3ad1ab9c4b6a99fe4f08d6c30b7e0f57. --- syntax/jinja2.vim | 58 ++++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) (limited to 'syntax/jinja2.vim') diff --git a/syntax/jinja2.vim b/syntax/jinja2.vim index 3ddea85c..55d9fbfd 100644 --- a/syntax/jinja2.vim +++ b/syntax/jinja2.vim @@ -1,44 +1,17 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 " Vim syntax file -" Language: Jinja template -" Maintainer: Armin Ronacher -" Last Change: 2008 May 9 -" Version: 1.1 -" -" Known Bugs: -" because of odd limitations dicts and the modulo operator -" appear wrong in the template. -" -" Changes: -" -" 2008 May 9: Added support for Jinja2 changes (new keyword rules) - -" .vimrc variable to disable html highlighting -if !exists('g:jinja_syntax_html') - let g:jinja_syntax_html=1 -endif +" Language: Jinja2 - with special modifications for compound-filetype +" compatibility +" Maintainer: Dave Honneffer +" Last Change: 2018.02.11 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif - let main_syntax = 'jinja' + let main_syntax = 'jinja2' endif -" Pull in the HTML syntax. -if g:jinja_syntax_html - if version < 600 - so :p:h/html.vim - else - runtime! syntax/html.vim - unlet b:current_syntax - endif -endif +let b:current_syntax = '' +unlet b:current_syntax syntax case match @@ -95,15 +68,8 @@ syn match jinjaStatement containedin=jinjaTagBlock contained /\= 508 || !exists("did_jinja_syn_inits") - if version < 508 - let did_jinja_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif +if !exists("did_jinja_syn_inits") + command -nargs=+ HiLink hi def link HiLink jinjaPunctuation jinjaOperator HiLink jinjaAttribute jinjaVariable @@ -130,10 +96,6 @@ if version >= 508 || !exists("did_jinja_syn_inits") delcommand HiLink endif -let b:current_syntax = "jinja" - -if main_syntax == 'jinja' - unlet main_syntax -endif +let b:current_syntax = "jinja2" endif -- cgit v1.2.3