How to set scss syntax in Sublime 3?

I use the Sublime 3 editor. When I open a SCSS file, it shows a lot of red characters because it has incorrectly evaluated the syntax. When I press CTRL + Shift + P and type sass or scss , I get no option. I had to set CSS syntax.

Is there a way to set the SCSS syntax in Sublime 3?

+34
css sass sublimetext syntax-highlighting sublimetext3
source share
3 answers

press CTRL + Shift + P in the Submile text below the popup

enter image description here

Click on Package Management: Install the package . Which will open the SCSS popup.type below in the search field. The first sentence will be SCSS (Not shown in the image below) and click on it.

enter image description here

press CTRL + Shift + P again and search for SCSS and click Set Syntax: SCSS . that your scss files will be colored accordingly

enter image description here

+106
source share

There are two very popular packages: Sass and SCSS. I started with the SCSS package, given that codegeek 72+'s answer suggests this, but I found that most of my actual SCSS was just white.

The 'Sass' package contains both Sass and SCSS, and it is much more comprehensive for SCSS than a package called simply 'SCSS'.

Installation steps:

  1. CTRL + SHIFT + P (Mac: COMMAND + SHIFT + P )
  2. Type " Package Control: Install package " and press Enter . Wait a few seconds
  3. Type " Sass ", make sure the selected item is just " Sass ", and press Enter .
  4. You will see the installation status in the status bar at the bottom of the application. When finish the installation:
  5. CTRL + SHIFT + P again
  6. Type " Set syntax: SCSS " and press Enter
+18
source share

If you have the Sass extension installed (which supports both SASS and SCSS) and you want all .scss files .scss open with newer SCSS syntax highlighting, rather than with the older SASS, follow these steps:

  • Open view -> Syntax -> Open all with current extension as ...
  • Choose Sass → SCSS

Courtesy: http://joncaveman.com/2015/08/11/sublime-text-3-default-syntax-highlighting-for-file-types/.

0
source share

All Articles