Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
Created December 29, 2014 22:26
Show Gist options
  • Save tomoconnor/d9ba41052952bfb23614 to your computer and use it in GitHub Desktop.
Save tomoconnor/d9ba41052952bfb23614 to your computer and use it in GitHub Desktop.
Django i18n snippets and bindings
<snippet>
<content><![CDATA[
_($SELECTION$1)
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>i18n</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.python</scope>
<description>Wraps the selection in _(...) </description>
</snippet>
{ "keys": ["super+shift+i"],
"command": "insert_snippet",
"args": { "name": "Packages/Python/i18n.sublime-snippet" } },
{ "keys": ["super+shift+i"],
"command": "insert_snippet",
"args": { "name": "Packages/HTML/trans_i18n.sublime-snippet" } }
<snippet>
<content><![CDATA[
{% trans "$SELECTION$1" %}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>tmi18n</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment