Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sublime build for HAML->HTML automatic conversion
"cmd": ["haml"],
"working_dir": "${file_path:${folder}}",
"selector": "source.haml",
"file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
"cmd": ["haml", "--trace", "$file", "${file_base_name}.html"],
"shell": "true"

This will not work with Automatic build system. You need to update that selector to text.haml
"selector": "text.haml"


vulehuan commented Mar 4, 2017

For Linux user:
$ cd ~/.config/sublime-text-3/Packages/User
create file "haml.sublime-build", paste the following code, save:
"cmd": ["haml", "-q", "$file", "${file_path}/${file_base_name}.html"],
"selector" : "text.haml"

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