Last active
February 9, 2018 05:03
-
-
Save joshuaiz/98a8bdbfaf185409981ab3b37871f68e to your computer and use it in GitHub Desktop.
Sublime liquid sass/scss interpolation. Use this to select elements in a scss.liquid file and use sass interpolation to escape them so you can use a preprocessor.
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
<!-- Save to ~/Library/Application Support/Sublime Text 3/Packages/User/ --> | |
<!-- Example: if you have some liquid like: {{ settings.site_bg_col }}; in your .scss.liquid file, | |
select that (except for the closing ; and use the keybinding set below. --> | |
<!-- Output: #{" {{ settings.site_bg_col }} "}; --> | |
<snippet> | |
<content><![CDATA[ | |
#{" $SELECTION "} | |
]]></content> | |
<!-- this tab trigger won't really work when using $SELECTION --> | |
<tabTrigger>sslq</tabTrigger> | |
<description>SCSS Liquid Interpolation</description> | |
</snippet> |
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
// Add this to Sublime Text > Preferences > Key Bindings | |
{ | |
"keys": ["shift+control+l"], // change this to whatever you want | |
"command": "insert_snippet", | |
"args": { "name": "Packages/User/liquidsass.sublime-snippet" } | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment