Last Updated: February 25, 2016
·
1.753K
· lperrin

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.