Created
February 3, 2012 10:13
-
-
Save xxxObiWan/1729497 to your computer and use it in GitHub Desktop.
Latte syntax definition for Sublime Text 2 [#nettefw #latte #php]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!-- | |
- @author Michal Mikoláš <[email protected]> | |
- @license CC BY <http://creativecommons.org/licenses/by/3.0/cz/> | |
--> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>phtml</string> | |
<string>latte</string> | |
</array> | |
<key>name</key> | |
<string>Latte</string> | |
<key>scopeName</key> | |
<string>source.latte</string> | |
<key>patterns</key> | |
<array> | |
<dict> <!-- Whatever between { and } --> | |
<key>begin</key> | |
<string>\{\{?(?!\s)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.tag.begin.latte</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\}?\}</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.tag.end.latte</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>source.latte</string> | |
<key>patterns</key> | |
<array> | |
<dict> <!-- Pair latte macros --> | |
<key>match</key> | |
<string>/?(block|foreach|form|if|else|snippet)\s*</string> | |
<key>name</key> | |
<string>keyword.control.latte</string> | |
</dict> | |
<dict> <!-- Single latte macros --> | |
<key>match</key> | |
<string>(var|link|plink|control|\!|label|input)\s*</string> | |
<key>name</key> | |
<string>keyword.operator.latte</string> | |
</dict> | |
<dict> <!-- Latte variables --> | |
<key>match</key> | |
<string>\$\$?[a-zA-Z_0-9]+\s*</string> | |
<key>name</key> | |
<string>variable.other.global.latte</string> | |
</dict> | |
<dict> <!-- Deprecated keywords --> | |
<key>match</key> | |
<string>widget</string> | |
<key>name</key> | |
<string>invalid.deprecated</string> | |
</dict> | |
<dict> <!-- Whatever else between { and } --> | |
<key>match</key> | |
<string>([^}$]|\s)*</string> | |
<key>name</key> | |
<string>source.latte</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> <!-- Include HTML highlight --> | |
<key>include</key> | |
<string>text.html.basic</string> | |
</dict> | |
</array> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Chybí ti tam ifset makro.