How to set scss syntax in Sublime 3?
CssSassSublimetext3SublimetextSyntax HighlightingCss Problem Overview
I'm using Sublime 3 editor. When I open a SCSS file it shows many red characters because it misjudged the syntax. When I press CTRL + Shift + P and type sass
or scss
I get no option. I had to set syntax to CSS.
Is there any way to set syntax to SCSS in Sublime 3?
Css Solutions
Solution 1 - Css
press CTRL + Shift + P in Submile Text below popup opens
Click on the Package Control: Install Package.which will open the below popup. Type SCSS in the search box. Look for exactly: SCSS (it may not be the first thing that comes up) and click on it.
again press CTRL + Shift + P and search for SCSS and click on the Set Syntax: SCSS. that it your scss files will be colored accordingly
Solution 2 - Css
There are two very popular packages: 'Sass', and 'SCSS'. I started with the 'SCSS' package, given that codegeek's 72+ answer suggests it, but I found that a large amount of my valid SCSS was just white.
The 'Sass' package contains both Sass and SCSS, and is much more complete for SCSS than the package just called 'SCSS'.
Steps to install:
- CTRL+SHIFT+P (Mac: COMMAND+SHIFT+P)
- Type '
Package Control: Install package
' and press Enter. Wait several seconds - Type '
Sass
', ensure the selected item is just 'Sass
', and press Enter. - You'll see installation status in the status bar at the bottom of the app. When finished installing:
- CTRL+SHIFT+P again
- Type '
Set syntax: SCSS
' and press Enter
Solution 3 - Css
If you have the Sass extension installed (which supports both SASS and SCSS) and you want all .scss
files to open with the newer SCSS syntax highlighting rather than the older SASS, then do the following:
- Open View -> Syntax -> Open all with current extension as...
- Select Sass -> SCSS
Credit: http://joncaveman.com/2015/08/11/sublime-text-3-default-syntax-highlighting-for-file-types/