annotate runtime/syntax/htmldjango.vim @ 1277:4a0d055d5f03

updated for version 7.1
author vimboss
date Sat, 12 May 2007 15:12:15 +0000
parents 96cd8222a819
children 7090d7f160f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
798
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
1 " Vim syntax file
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
2 " Language: Django HTML template
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
3 " Maintainer: Dave Hodder <dmh@dmh.org.uk>
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
4 " Last Change: 2007 Jan 26
798
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
5
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
8 if version < 600
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
9 syntax clear
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
11 finish
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
12 endif
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
13
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
14 if !exists("main_syntax")
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
15 let main_syntax = 'html'
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
16 endif
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
17
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
18 if version < 600
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
19 so <sfile>:p:h/django.vim
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
20 so <sfile>:p:h/html.vim
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
21 else
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
22 runtime! syntax/django.vim
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
23 runtime! syntax/html.vim
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
24 unlet b:current_syntax
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
25 endif
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
26
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
27 syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
28
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
29 syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
30 syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
31 syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
96cd8222a819 updated for version 7.1a
vimboss
parents: 798
diff changeset
32 syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
798
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
33
95dac6af3b3a updated for version 7.0232
vimboss
parents:
diff changeset
34 let b:current_syntax = "htmldjango"