Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
Last active July 30, 2018 15:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamjohnson/5397840 to your computer and use it in GitHub Desktop.
Save adamjohnson/5397840 to your computer and use it in GitHub Desktop.
Create a tab trigger / shortcut for Sublime Text to spit out @include when you type 'in' then hit tab. Go to Tools > New Snippet. Save this in Packages > User.
<snippet>
<content><![CDATA[
@include
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>in</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.scss</scope> -->
</snippet>
@robwierzbowski
Copy link

Is source.python on purpose?

Here's mine:

Include

<snippet>
  <content><![CDATA[
@include ${1}
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>inc</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.scss</scope>
</snippet>

Extend

<snippet>
  <content><![CDATA[
@extend %${1};${2}
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>ext</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.scss</scope>
</snippet>

@adamjohnson
Copy link
Author

Fixed. Good catch.

@jerome-toole
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment