From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/syntax/htmldjango.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 runtime/syntax/htmldjango.vim (limited to 'runtime/syntax/htmldjango.vim') diff --git a/runtime/syntax/htmldjango.vim b/runtime/syntax/htmldjango.vim new file mode 100644 index 0000000..07b1c37 --- /dev/null +++ b/runtime/syntax/htmldjango.vim @@ -0,0 +1,26 @@ +" Vim syntax file +" Language: Django HTML template +" Maintainer: Dave Hodder +" Last Change: 2014 Jul 13 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'html' +endif + +runtime! syntax/django.vim +runtime! syntax/html.vim +unlet b:current_syntax + +syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock + +syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks +syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks +syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks +syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks + +let b:current_syntax = "htmldjango" -- cgit v1.2.3