【sublime】Compile SASS and CoffeeScript file when save. 6.Edit the CoffeeScript build file. 7. Let's test it
All these plugins you can install by package controller.
1.First install pluin "SASS"
It provide syntax highlighting and tab/code completion for Sass and SCSS files
2. Install pluin "SublimeOnSaveBuild"
It can trigger a build on each save. It just trigger the ".sublime-build" file to make it. So all we need to do is to edit the ".sublime-build" in SASS and coffee.
Add "coffee" and make sure "build_on_save" is "1" which means open.
3. Edit the SASS build file
Edit your ruby and sass path.
4. Let's test it.
Create a new file "test.scss" and write some code. It will compile the scss file into css file when save. Also you can press F7 or "ctrl + b"
5. Install plugin "CodeFormatter" to format
- PHP - By PEAR PHP_Beautifier
- JavaScript/JSON/JSONP - By JSBeautifier
- HTML - By JSBeautifier
- CSS - By JSBeautifier
-
Python - By PythonTidy (only ST2)
Default shotcut "Control+Shift+P"
Original
{
"path": "$HOME/bin:/usr/local/bin:$PATH",
"cmd": ["coffee","-c","$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.coffee"
}
For Mac
{
"cmd": ["coffee", "$file"],
"selector" : "source.coffee",
"path" : "/usr/local/bin"
}
For Windows
{
"cmd": ["coffee.cmd","-c","$file"],
"selector": "source.coffee"
}
7. Let's test it
Create a new file "test.coffee" and write some code. It will compile the coffee file into js file when save. Also you can press F7 or "ctrl + b"
≡≡≡≡≡≡≡≡≡≡★ From Laker's blog ★≡≡≡≡≡≡≡≡≡≡
¤ ╭⌒╮☀Coding and changing~☀ ╭╭ ⌒╮
✪Fighting and insisting~✪