diff --git a/Commands/Help.tmCommand b/Commands/Help.tmCommand
index e119515..897078d 100644
--- a/Commands/Help.tmCommand
+++ b/Commands/Help.tmCommand
@@ -6,13 +6,13 @@
nop
command
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
-html_header "Jinja Help" "Jinja Templates"
+html_header "Jinja2 Help" "Jinja2"
Markdown.pl <<'EOF'
-This document describes the commands of the TextMate Jinja Templates bundle and how you can use it. For general Jinja help you should read the documentation on the [Jinja website](http:/jinja.pocoo.org/ "Jinja Webpage").
+This document describes the commands of the TextMate Jinja2 bundle and how you can use it. For general Jinja2 help you should read the documentation on the [Jinja2 Website](http:/jinja.pocoo.org/ "Jinja2 Website").
-This bundle supports Jinja1 and Jinja2.
+This bundle supports Jinja2.
EOF
@@ -24,7 +24,7 @@ html_footer
output
showAsHTML
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
uuid
44B1526F-5825-40A5-AB42-6433F1DD02D9
diff --git a/Commands/Validate Syntax.tmCommand b/Commands/Validate Syntax.tmCommand
index 804906f..5cf7fda 100644
--- a/Commands/Validate Syntax.tmCommand
+++ b/Commands/Validate Syntax.tmCommand
@@ -6,19 +6,19 @@
nop
command
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
-html_header "Jinja Syntax Validation" "Jinja Templates"
+html_header "Jinja2 Syntax Validation" "Jinja2"
export TMPFILE="$(mktemp -t tm_jinja_test__)"
cat /dev/stdin > $TMPFILE
python <<'END'
try:
- from jinja import Environment
- from jinja.exceptions import TemplateSyntaxError
- e = Environment()
+ from jinja2 import environment
+ from jinja2.exceptions import TemplateSyntaxError
+ e = environment.Environment()
except ImportError, e:
print "<h2>Error</h2>"
- print "<p>Jinja is not installed on this system, cannot perform syntax check.</p>"
+ print "<p>Jinja2 is not installed on this system, cannot perform syntax check.</p>"
else:
import sys, os
from cgi import escape
@@ -34,7 +34,7 @@ else:
print e.from_string('''
<h2>Syntax Error in Line {{ err.lineno or '?' }}</h2>
<p>{{ err.message|e }}</p>
- <p><a href="txmt://open/?url=file://{{ err.filename|urlencode }}&line={{ err.lineno }}">Go To Line</a></p>
+ <p><a href="txmt://open/?url=file://{{ err.filename|urlize }}&line={{ err.lineno }}">Go To Line</a></p>
''').render(err=err)
else:
print '<h2>Success</h2>'
@@ -52,7 +52,7 @@ rm $TMPFILE
output
showAsHTML
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
uuid
07198D95-F344-47EB-B1F2-69F2DC10BA1F
diff --git a/Commands/Wrap in Tag.tmCommand b/Commands/Wrap in Tag.tmCommand
index 6343d2e..e1ead8a 100644
--- a/Commands/Wrap in Tag.tmCommand
+++ b/Commands/Wrap in Tag.tmCommand
@@ -19,7 +19,7 @@ sys.stdout.write("{% ${1:%s}$2 %}$3" % sys.stdin.read().replace('}', '\\}'))output
insertAsSnippet
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
uuid
04309583-742D-4470-8FA7-A12EF5536215
diff --git a/Commands/Wrap in Variable Tag.tmCommand b/Commands/Wrap in Variable Tag.tmCommand
index c488ee9..99ceace 100644
--- a/Commands/Wrap in Variable Tag.tmCommand
+++ b/Commands/Wrap in Variable Tag.tmCommand
@@ -19,7 +19,7 @@ sys.stdout.write("{{ ${1:%s}$2 }}$3" % sys.stdin.read().replace('}', '\\}'))output
insertAsSnippet
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
uuid
BD126F84-B849-407F-BE62-EF984946EB82
diff --git a/Macros/No automatic Completion for {.tmMacro b/Macros/No automatic Completion for {.tmMacro
index 571bf38..0b5aac2 100644
--- a/Macros/No automatic Completion for {.tmMacro
+++ b/Macros/No automatic Completion for {.tmMacro
@@ -20,7 +20,7 @@
name
No automatic Completion for {
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
uuid
31E30D4A-5CA5-4E4A-9C13-AB8ED6C1EB94
diff --git a/Preferences/Symbol List: Blocks.tmPreferences b/Preferences/Symbol List: Blocks.tmPreferences
index 1ea7d49..4338a9f 100644
--- a/Preferences/Symbol List: Blocks.tmPreferences
+++ b/Preferences/Symbol List: Blocks.tmPreferences
@@ -5,7 +5,7 @@
name
Symbol List: Blocks
scope
- meta.scope.jinja.tag variable.other.jinja.block
+ meta.scope.jinja2.tag variable.other.jinja2.block
settings
showInSymbolList
diff --git a/Snippets/Block.tmSnippet b/Snippets/Block.tmSnippet
index c5943dd..6f84d75 100644
--- a/Snippets/Block.tmSnippet
+++ b/Snippets/Block.tmSnippet
@@ -9,7 +9,7 @@
name
Block
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
block
uuid
diff --git a/Snippets/Complete Block.tmSnippet b/Snippets/Complete Block.tmSnippet
index 5be9823..5365071 100644
--- a/Snippets/Complete Block.tmSnippet
+++ b/Snippets/Complete Block.tmSnippet
@@ -7,7 +7,7 @@
name
Complete Block
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
{%
uuid
diff --git a/Snippets/Complete Variable.tmSnippet b/Snippets/Complete Variable.tmSnippet
index 1ee6e27..d14e801 100644
--- a/Snippets/Complete Variable.tmSnippet
+++ b/Snippets/Complete Variable.tmSnippet
@@ -7,7 +7,7 @@
name
Complete Variable
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
{{
uuid
diff --git a/Snippets/Extends.tmSnippet b/Snippets/Extends.tmSnippet
index f3981f0..f1cfc37 100644
--- a/Snippets/Extends.tmSnippet
+++ b/Snippets/Extends.tmSnippet
@@ -7,7 +7,7 @@
name
Extends
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
extends
uuid
diff --git a/Snippets/Filter.tmSnippet b/Snippets/Filter.tmSnippet
index 6e9b3f7..68395e7 100644
--- a/Snippets/Filter.tmSnippet
+++ b/Snippets/Filter.tmSnippet
@@ -9,7 +9,7 @@
name
Filter
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
filter
uuid
diff --git a/Snippets/For.tmSnippet b/Snippets/For.tmSnippet
index 019d804..9be2f09 100644
--- a/Snippets/For.tmSnippet
+++ b/Snippets/For.tmSnippet
@@ -9,7 +9,7 @@
name
For
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
for
uuid
diff --git a/Snippets/If.tmSnippet b/Snippets/If.tmSnippet
index 620bb43..52c1f39 100644
--- a/Snippets/If.tmSnippet
+++ b/Snippets/If.tmSnippet
@@ -9,7 +9,7 @@
name
If
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
if
uuid
diff --git a/Snippets/Macro.tmSnippet b/Snippets/Macro.tmSnippet
index 311ffb2..7e1db6d 100644
--- a/Snippets/Macro.tmSnippet
+++ b/Snippets/Macro.tmSnippet
@@ -9,7 +9,7 @@
name
Macro
scope
- source.jinja, text.html.jinja
+ source.jinja2, text.html.jinja2
tabTrigger
macro
uuid
diff --git a/Syntaxes/HTML (Jinja Templates).tmLanguage b/Syntaxes/HTML (Jinja2).tmLanguage
similarity index 79%
rename from Syntaxes/HTML (Jinja Templates).tmLanguage
rename to Syntaxes/HTML (Jinja2).tmLanguage
index 8dc90c1..9e7ee3a 100644
--- a/Syntaxes/HTML (Jinja Templates).tmLanguage
+++ b/Syntaxes/HTML (Jinja2).tmLanguage
@@ -3,7 +3,12 @@
fileTypes
-
+
+ htm.j2
+ html.j2
+ xhtml.j2
+ xml.j2
+
firstLineMatch
^{% extends ["'][^"']+["'] %}
foldingStartMarker
@@ -11,12 +16,12 @@
foldingStopMarker
(</(?i:(head|table|tr|div|style|script|ul|ol|form|dl))\b.*?>|{%\s*(endblock|endfilter|endfor|endif|endmacro|endraw)\s*%})
name
- HTML (Jinja Templates)
+ HTML (Jinja2)
patterns
include
- source.jinja
+ source.jinja2
include
@@ -24,7 +29,7 @@
scopeName
- text.html.jinja
+ text.html.jinja2
uuid
488399C0-5D29-4704-BE85-E03A461C34E7
diff --git a/Syntaxes/Jinja Templates.tmLanguage b/Syntaxes/Jinja2.tmLanguage
similarity index 73%
rename from Syntaxes/Jinja Templates.tmLanguage
rename to Syntaxes/Jinja2.tmLanguage
index 7c81eab..eddf531 100644
--- a/Syntaxes/Jinja Templates.tmLanguage
+++ b/Syntaxes/Jinja2.tmLanguage
@@ -3,13 +3,15 @@
fileTypes
-
+
+ j2
+
foldingStartMarker
({%\s*(block|filter|for|if|macro|raw))
foldingStopMarker
({%\s*(endblock|endfilter|endfor|endif|endmacro|endraw)\s*%})
name
- Jinja Templates
+ Jinja2
patterns
@@ -20,23 +22,23 @@
1
name
- entity.other.jinja.delimiter.tag
+ entity.other.jinja2.delimiter.tag
2
name
- keyword.control.jinja
+ keyword.control.jinja2
3
name
- entity.other.jinja.delimiter.tag
+ entity.other.jinja2.delimiter.tag
end
({%)\s*(endraw)\s*(%})
name
- comment.block.jinja.raw
+ comment.block.jinja2.raw
begin
@@ -46,13 +48,13 @@
0
name
- entity.other.jinja.delimiter.comment
+ entity.other.jinja2.delimiter.comment
end
-?#}
name
- comment.block.jinja
+ comment.block.jinja2
begin
@@ -62,13 +64,13 @@
0
name
- entity.other.jinja.delimiter.variable
+ entity.other.jinja2.delimiter.variable
end
-?}}
name
- meta.scope.jinja.variable
+ meta.scope.jinja2.variable
patterns
@@ -85,13 +87,13 @@
0
name
- entity.other.jinja.delimiter.tag
+ entity.other.jinja2.delimiter.tag
end
-?%}
name
- meta.scope.jinja.tag
+ meta.scope.jinja2.tag
patterns
@@ -108,7 +110,7 @@
match
\\x[0-9A-F]{2}
name
- constant.character.escape.hex.jinja
+ constant.character.escape.hex.jinja2
escaped_unicode_char
@@ -117,17 +119,17 @@
1
name
- constant.character.escape.unicode.16-bit-hex.jinja
+ constant.character.escape.unicode.16-bit-hex.jinja2
2
name
- constant.character.escape.unicode.32-bit-hex.jinja
+ constant.character.escape.unicode.32-bit-hex.jinja2
3
name
- constant.character.escape.unicode.name.jinja
+ constant.character.escape.unicode.name.jinja2
match
@@ -143,12 +145,12 @@
1
name
- keyword.control.jinja
+ keyword.control.jinja2
2
name
- variable.other.jinja.block
+ variable.other.jinja2.block
match
@@ -160,12 +162,12 @@
1
name
- keyword.control.jinja
+ keyword.control.jinja2
2
name
- variable.other.jinja.filter
+ variable.other.jinja2.filter
match
@@ -177,12 +179,12 @@
1
name
- keyword.control.jinja
+ keyword.control.jinja2
2
name
- variable.other.jinja.test
+ variable.other.jinja2.test
match
@@ -194,7 +196,7 @@
1
name
- keyword.control.jinja
+ keyword.control.jinja2
match
@@ -204,31 +206,31 @@
match
\b(and|else|if|in|import|not|or|recursive|with(out)?\s+context)\b
name
- keyword.control.jinja
+ keyword.control.jinja2
match
\b(true|false|none)\b
name
- constant.language.jinja
+ constant.language.jinja2
match
\b(loop|super|self|varargs|kwargs)\b
name
- variable.language.jinja
+ variable.language.jinja2
match
[a-zA-Z_][a-zA-Z0-9_]*
name
- variable.other.jinja
+ variable.other.jinja2
match
(\+|\-|\*\*|\*|//|/|%)
name
- keyword.operator.arithmetic.jinja
+ keyword.operator.arithmetic.jinja2
captures
@@ -236,12 +238,12 @@
1
name
- punctuation.other.jinja
+ punctuation.other.jinja2
2
name
- variable.other.jinja.filter
+ variable.other.jinja2.filter
match
@@ -253,12 +255,12 @@
1
name
- punctuation.other.jinja
+ punctuation.other.jinja2
2
name
- variable.other.jinja.attribute
+ variable.other.jinja2.attribute
match
@@ -272,7 +274,7 @@
0
name
- punctuation.other.jinja
+ punctuation.other.jinja2
end
@@ -293,7 +295,7 @@
0
name
- punctuation.other.jinja
+ punctuation.other.jinja2
end
@@ -314,7 +316,7 @@
0
name
- punctuation.other.jinja
+ punctuation.other.jinja2
end
@@ -331,19 +333,19 @@
match
(\.|:|\||,)
name
- punctuation.other.jinja
+ punctuation.other.jinja2
match
(==|<=|=>|<|>|!=)
name
- keyword.operator.comparison.jinja
+ keyword.operator.comparison.jinja2
match
=
name
- keyword.operator.assignment.jinja
+ keyword.operator.assignment.jinja2
begin
@@ -353,7 +355,7 @@
0
name
- punctuation.definition.string.begin.jinja
+ punctuation.definition.string.begin.jinja2
end
@@ -363,11 +365,11 @@
0
name
- punctuation.definition.string.end.jinja
+ punctuation.definition.string.end.jinja2
name
- string.quoted.double.jinja
+ string.quoted.double.jinja2
patterns
@@ -384,7 +386,7 @@
0
name
- punctuation.definition.string.begin.jinja
+ punctuation.definition.string.begin.jinja2
end
@@ -394,11 +396,11 @@
0
name
- punctuation.definition.string.end.jinja
+ punctuation.definition.string.end.jinja2
name
- string.quoted.single.jinja
+ string.quoted.single.jinja2
patterns
@@ -415,7 +417,7 @@
0
name
- punctuation.definition.regexp.begin.jinja
+ punctuation.definition.regexp.begin.jinja2
end
@@ -425,11 +427,11 @@
0
name
- punctuation.definition.regexp.end.jinja
+ punctuation.definition.regexp.end.jinja2
name
- string.regexp.jinja
+ string.regexp.jinja2
patterns
@@ -447,57 +449,57 @@
1
name
- constant.character.escape.newline.jinja
+ constant.character.escape.newline.jinja2
10
name
- constant.character.escape.tab.jinja
+ constant.character.escape.tab.jinja2
11
name
- constant.character.escape.vertical-tab.jinja
+ constant.character.escape.vertical-tab.jinja2
2
name
- constant.character.escape.backlash.jinja
+ constant.character.escape.backlash.jinja2
3
name
- constant.character.escape.double-quote.jinja
+ constant.character.escape.double-quote.jinja2
4
name
- constant.character.escape.single-quote.jinja
+ constant.character.escape.single-quote.jinja2
5
name
- constant.character.escape.bell.jinja
+ constant.character.escape.bell.jinja2
6
name
- constant.character.escape.backspace.jinja
+ constant.character.escape.backspace.jinja2
7
name
- constant.character.escape.formfeed.jinja
+ constant.character.escape.formfeed.jinja2
8
name
- constant.character.escape.linefeed.jinja
+ constant.character.escape.linefeed.jinja2
9
name
- constant.character.escape.return.jinja
+ constant.character.escape.return.jinja2
match
@@ -523,7 +525,7 @@
scopeName
- source.jinja
+ source.jinja2
uuid
CB0F3F8E-6062-4610-85B3-8905C61AD85A
diff --git a/info.plist b/info.plist
index 2470078..ae68b75 100644
--- a/info.plist
+++ b/info.plist
@@ -7,10 +7,13 @@
items
85E26B4F-795C-4380-AA26-EF994D3F1220
- 8AC9FEED-B1BB-49A7-94FE-EAE734A90C79
- 44B1526F-5825-40A5-AB42-6433F1DD02D9
------------------------------------
07198D95-F344-47EB-B1F2-69F2DC10BA1F
+ BD126F84-B849-407F-BE62-EF984946EB82
+ 04309583-742D-4470-8FA7-A12EF5536215
+ 31E30D4A-5CA5-4E4A-9C13-AB8ED6C1EB94
+ ------------------------------------
+ 44B1526F-5825-40A5-AB42-6433F1DD02D9
submenus
@@ -18,89 +21,27 @@
items
- 5B95AA2C-B0E7-4886-9A55-90C1939D39C8
- 24C0F9CE-D3F1-4677-8A2E-EFFE776098F0
- D3BE8551-A17F-47A4-A47D-02F00124F984
- C0C77C85-3A4E-4DAE-AEE3-533FA0DEA0C0
- 85C07823-2B9D-4631-88E7-AEF4E1BE9482
- 73F00DE1-17B0-4C8C-B495-82A3689EB6F1
- CE75CB61-2FDA-4139-B21E-7DE143FAFA1B
+ 152FEFB6-EE41-47D1-B9AD-4E30AF64406C
+ 08A0C481-0E5A-425E-9486-EC7D681DA01D
+ 502E364B-D4D5-45F0-A996-5E71B3E5B7B6
+ 9BE0D536-28D2-4BAB-ACDA-2DEFD0CF291A
+ 1437E81D-2EB6-412E-8D6E-48B4D3B0685E
+ 2B7AD6C9-0811-43B9-8E12-BE30772C7453
+ 56CCF05B-99DA-4899-AFF2-438C61BFE6B7
+ 2ECE58B8-7AB7-43DA-B00F-51C2533284AD
name
Snippets
- 8AC9FEED-B1BB-49A7-94FE-EAE734A90C79
-
- items
-
- 7E9487F0-B012-4735-96DA-124EF3C87B15
- 13A0482A-4EA3-406C-A74B-90131C529E25
- 4CCD42F3-8E6E-4B96-9D5D-BFB81E714948
- 21EA80D9-967D-4681-BD17-765F1688EE5A
- 65CCCA35-3231-4B63-B67D-5FB596D833C7
- 3D708572-4CD6-40D6-9F3B-CC96784CC069
- 3416F5A3-C0A2-4B4B-ABBA-9EA40207E2B4
- 6721CF2A-9DA7-4A7E-85C2-FE609E100DE8
- FDE05A63-E81C-474C-A1A9-47FD862F39EE
- 9B7F35A9-3A98-4736-9AB3-21BD9BFB5069
- FDFF242A-F3FB-4A4C-BE1A-F1311158B32B
- 4BA654F6-F412-4AF9-9CEA-72BD1A709AF4
- 93EEDABE-BC52-4883-AF3D-DE4A44C3C246
- 307C3853-AA0B-441C-A3D4-DE5CAE2C1673
- 0A6ECEB6-410E-4CF5-823E-139E8769BA16
- FBD6F4B2-3206-4CA9-AE99-B2C78149A357
- 93E22AC4-B2B8-426D-89C9-FB416F24F975
- 6B7CA02D-D6CF-4F16-9A1E-7610DAEBB43F
- 7F5037F1-CCC2-4179-98CA-66D001144AC2
- 6F1D6BEF-3D53-4EC8-9C42-DF0D1D2E68C5
- 78EEA703-C74E-4D71-9DDA-5674E3AB50D7
- 1B45C5DE-21D2-4E2A-B7C6-794C9D7ECB99
- B964A222-F305-44C9-B23C-0D2A55112C43
- C2DF4AC6-C586-4F6C-9A97-916558C248D7
- 7DE5D7CF-81BB-4AB3-A9B8-938D47918237
- 95E641E1-CAA4-4984-B406-54FEC11D5F1B
- E0F620DA-1CDA-4913-AD04-CAC8C63089D8
- E527CC83-06C6-4B54-8FDC-61FB4554B251
- 27647146-46AC-4F2A-9069-178E359E55DF
- D64E1E71-A89E-4349-8178-97BC06A5B35F
- 866F74E0-D58C-4BCB-A256-3D94CFB612D9
- AE1A2C7A-2D10-466F-9EB0-E8B540E7BA6E
- 2EB9BB55-E38C-4FA9-81B7-73B1A73F65C7
- B99D5C37-BE6D-4397-9F32-90BD1A02E016
- A199B66F-5B1A-4210-9B22-1FC6738EAD76
- 3F749711-C818-41C2-8FB0-844CD2839617
- 823ABA67-7CA7-4F4F-ACC1-7D84AAC56469
- 1C0A622E-7F37-437F-95A3-5342DEA80B4E
- DEDD7EB3-FFD2-4BFD-8D59-5DA8ED0F567F
- 40423A4E-9ED4-402C-A5BB-193797A73101
- 6000AFC3-4398-4500-B055-296D17DDAB48
- CA8BCFEA-2BDB-4CB8-8E31-6388ECEF05BB
-
- name
- Filters
-
name
- Jinja Templates
+ Jinja2
ordering
CB0F3F8E-6062-4610-85B3-8905C61AD85A
488399C0-5D29-4704-BE85-E03A461C34E7
889E682B-196A-4424-8A87-EBFDC86BAAFC
- 44B1526F-5825-40A5-AB42-6433F1DD02D9
- 07198D95-F344-47EB-B1F2-69F2DC10BA1F
- BD126F84-B849-407F-BE62-EF984946EB82
- 04309583-742D-4470-8FA7-A12EF5536215
- 31E30D4A-5CA5-4E4A-9C13-AB8ED6C1EB94
- 08A0C481-0E5A-425E-9486-EC7D681DA01D
- 502E364B-D4D5-45F0-A996-5E71B3E5B7B6
- 2B7AD6C9-0811-43B9-8E12-BE30772C7453
- 56CCF05B-99DA-4899-AFF2-438C61BFE6B7
- 1437E81D-2EB6-412E-8D6E-48B4D3B0685E
- 152FEFB6-EE41-47D1-B9AD-4E30AF64406C
- 2ECE58B8-7AB7-43DA-B00F-51C2533284AD
- 9BE0D536-28D2-4BAB-ACDA-2DEFD0CF291A
uuid
B4E6C4DD-43DB-473D-8E0F-662C5E64C31D