Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 980
user1419762 Avatar asked Jul 03 '12 10:07

user1419762


People also ask

Does Sublime Text support sass?

Compiling Sass into CSS in Sublime Text is possible with a plugin called SassBuilder, which you can install through Package Control (see screenshot).

How do I use SCSS in Sublime Text 3?

Steps to install: CTRL + SHIFT + P (Mac: COMMAND + SHIFT + P ) Type ' Package Control: Install package ' and press Enter . Wait several seconds.

How do I run sass in Sublime Text?

INSTALLING WITH SUBLIME PACKAGE CONTROL When the list of available packages appears, type SASS into the input box to narrow the selection and then select SASS – SASS Support for TextMate & Sublime Text (2 & 3). The package will now install automatically.


2 Answers

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.

like image 133
Maxime Fabre Avatar answered Sep 22 '22 19:09

Maxime Fabre


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.

like image 31
Alexander Ekdahl Avatar answered Sep 24 '22 19:09

Alexander Ekdahl