Sass support for Sublime Text 2? [closed]
Is there an existing package for editing Sass in Sublime Text 2?
This seems to be popular: https://github.com/n00ge/sublime-text-haml-sass
However, after installation, it appears that it only provides syntax highlighting for scss
files.
Ideally, I'd like syntax highlighting, indentation and completions for the sass
syntax.
I'd recommend you go with this one: https://github.com/nathos/sass-textmate-bundle, if only for the amazing code completion - compatible with SASS/SCSS.
Whenever in doubt about packages, and assuming you use the amazing Sublime Package Control, just use the packages list, type something (the result will be sorted by the number of installs), and usually the most popular one is the best one.
The reason it is only working for your scss files is because the Ruby HAML highlighting settings overrides your sass highlighting.
Goto Preferences
> Browse Packages...
Find and open Ruby Haml.tmLanguage
inside the Rails
folder
change the fileTypes from:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>haml</string>
<string>sass</string> <!-- This line is causing the problem -->
</array>
<key>foldingStartMarker</key>
<string>^\s*([-%#\:\.\w\=].*)\s$</string>
<key>foldingStopMarker</key>
<string>^\s*$</string>
...
to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>haml</string>
</array>
<key>foldingStartMarker</key>
<string>^\s*([-%#\:\.\w\=].*)\s$</string>
<key>foldingStopMarker</key>
<string>^\s*$</string>
...
Now the SASS highlighting package you installed should be working properly.