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(...*?)$",
"windows":
{
"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"

Reference: http://stackoverflow.com/questions/27154136/build-haml-automatic-in-sublime-3-doesnt-work

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"
}

http://docs.sublimetext.info/en/latest/reference/build_systems/configuration.html

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