Skip to content

Instantly share code, notes, and snippets.

@lukewhitehouse
Last active May 1, 2016 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukewhitehouse/3a4785c0cd3c4f4d2592 to your computer and use it in GitHub Desktop.
Save lukewhitehouse/3a4785c0cd3c4f4d2592 to your computer and use it in GitHub Desktop.
Sublime Text: Snippets

Sublime Text: Snippets

A collection of snippets that are pretty useful for Sublime Text.

Contents

dump.sublime-snippet

This allows you to quickly print out a vardump() wrapped between <pre> tags, which is ten times easier to read.

print.sublime-snippet

This allows you to quickly print out a print_r() wrapped between <pre> tags, which is ten times easier to read.

respond-min.sublime-snippet

Quickly create a respond-min mixin for media queries based on the work from Jake Archibald

Instructions

Put them within your Packages>User directory folder for Sublime. You can get to this by opening Sublime up, then going to Sublime Text > Preferences > Browse Packages

<snippet>
<content><![CDATA[
<?php
echo "<pre>";
var_dump(${1});
echo "</pre>";
?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>dump</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
<?php
echo "<pre>";
print_r(${1});
echo "</pre>";
?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>print</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
@include respond-min(${1}) {
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>resp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment