A small collection of useful Sublime Text snippets to be used with Riot's wonderful app Hammer for Mac.
- Install Package Control
- Hit
⌘+⇧+Pto open the Command Palette - Look for Package Control: Install Package and hit
↵ - Search for
Hammer for Mac Snippetsand hit↵
Navigate to your Packages directory and clone this repository:
$ git clone https://github.com/DinoPaskvan/Hammer-Snippets.git
Just type one of the triggers and hit TAB inside the editor.
| Snippet | Trigger | Output |
|---|---|---|
| 404 Fix | h-404 | <base href="/"> |
| Automatic Reload | h-rel | <!-- @reload --> |
| HTML Include | h-inc | <!-- @include filename --> |
| Image Placeholder | h-img | <!-- @placeholder 300x400 Text --> |
| JavaScript Link (file) | h-js | <!-- @javascript filename --> |
| JavaScript Link (folder) | h-jsf | <!-- @javascript path/to/js/* --> |
| Smart Path | h-pa | <!-- @path filename --> |
| Stylesheet Link (file) | h-st | <!-- @stylesheet filename --> |
| Stylesheet Link (folder) | h-stf | <!-- @stylesheet path/to/css/* --> |
| To do | h-td | <!-- @todo To Do Text --> (1) |
| Variable | h-var | <!-- $name value --> |
| Variable (Default Value) | h-vard | <!-- $name [pipe] Default Value --> (2) |
(1) Output varies for each language (HTML, HAML, CSS, SCSS, CoffeeScript, JavaScript). Table shows HTML output.
(2) The | character breaks the table syntax and cannot be escaped. The actual output is: <!-- $name | Default Value -->
Feel free to fork this repository, fiddle with things and send pull requests.
This plugin is licensed under the MIT license.