Highlighting SASS in Sublime Text
Sublime Text improperly highlights SASS files with a HAML syntax.
With OS X / Sublime Text 3:
- Quit Sublime Text.
- Open the Finder
- Type: ⌘⇧G (Command+Shift+G) and go to
/Applications/Sublime Text/Contents/MacOS/Packages
. - Copy
Rails.sublime-package
to a folder somewhere (you can create a new folder on your Desktop). - Rename it to
Rails.zip
(OS X will raise a warning about changing extensions, but you can ignore it). - (
Rails.zip
should now be the only file of the folder) - Expand the zip. It will create ~100 files.
- Open
Ruby Haml.tmLanguage
in Sublime Text. - Just remove the
<string>sass</string>
key and save. - Remove `Rails.zip, compress all the remaining files to a ZIP archive.
- Rename the new zip to
Rails.sublime-package
to replace the original file.
With OS X / Sublime Text 2:
- Open the Finder
- Type: ⌘⇧G (Command+Shift+G) and go to
~/Library/Application Support/Sublime Text 2/Packages/Rails
. - Open
Ruby Haml.tmLanguage
in Sublime Text. - Just remove the
<string>sass</string>
key and save.
You might also want to add .sass-cache
to folder_exclude_patterns
in the preferences.
Written by Laurent Perrin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sublime
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#