Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sublime Text 2 Python format string syntax highlighting, Python.tmLanguage diff
--- Python.tmLanguage
+++ Python-formatstrings.tmLanguage
@@ -1171,7 +1171,7 @@
<key>constant_placeholder</key>
<dict>
<key>match</key>
- <string>(?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])</string>
+ <string>(?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])|(?&lt;=[({{)+]|[^{])({[0-9a-zA-Z]*(\.[0-9a-zA-Z]*)?(\[([^\])]*)\])?(![rsa])?(:)?})(?=(}})+|[^}])</string>
<key>name</key>
<string>constant.other.placeholder.python</string>
</dict>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.