Skip to content

Instantly share code, notes, and snippets.

@abaez
Created January 18, 2013 03:34
Show Gist options
  • Save abaez/4562148 to your computer and use it in GitHub Desktop.
Save abaez/4562148 to your computer and use it in GitHub Desktop.
Python: Sublime Snippets
<snippet>
<tabTrigger>for</tabTrigger>
<scope>source.python</scope>
<description>For Loop</description>
<content><![CDATA[
for ${1:x} in ${2:obj}:
${3:pass}
]]></content>
</snippet>
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
<tabTrigger>forr</tabTrigger>
<scope>source.python</scope>
<description>For Loop Range</description>
<content><![CDATA[
for ${1:x} in range(${2: 1,10}):
${3:pass}
]]></content>
</snippet>
<snippet>
<tabTrigger>forz</tabTrigger>
<scope>source.python</scope>
<description>For Loop Zip</description>
<content><![CDATA[
for ${1:x,y} in ${2:obj}:
${3:pass}
]]></content>
</snippet>
<snippet>
<content><![CDATA[
[${1:pass} for ${2:x} in ${3:seq}]
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>listc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.python</scope>
<description>List Comprehension</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment