Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SASS Syntax Highlighting in Visual Studio

Tags:

Currently I use this plugin for syntax highlighting in Visual Studio http://www.mindscapehq.com/products/web-workbench

Personally I don't like it at all. It has limited features and poor formatting compared to other editors. In my freelance work I use Sublime Text 2 and Aptana which have excellent support for SASS. But at my job I have to use Visual Studio. Does anyone else know of a good plugin that has SASS support?

I don't care if it builds the files I do that through the command line anyway. I just want something that has good syntax support.

like image 725
ddilsaver Avatar asked Nov 30 '12 14:11

ddilsaver


People also ask

Does Visual Studio have syntax highlighting?

Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.

How do I create a Sass file in Visual Studio?

Step 1: Install Live Sass Compiler Extension In VS Code Select the Extensions tab from the sidebar. Click on the Extensions tab from the sidebar. Search for Live Sass Compiler in the search box. Search for “Live Sass Compiler” from the search box.

Does Visual Studio support Sass?

Visual Studio Code SASS CompilerThe Sass Compiler Web Extension for Visual Studio Code is one of the best ways to have your SASS files transpiled into CSS. To do so simply type in “Live Sass Compiler” into the extensions marketplace.


2 Answers

Try SassyStudio. It's free and works with VS 2012/13:

http://visualstudiogallery.msdn.microsoft.com/85fa99a6-e4c6-4a1c-9f00-e6a8129b6f4d?SRC=VSIDE

I also didn't want to pay $39 a year for Web Workbench. SassyStudio works perfectly for me.

Here are the settings I'm using (given to me by the developer):

  • Environment
    • Fonts and Colors
    • Scroll down
    • "Display items"
    • Click on an item, i.e. "SCSS CSS Property Name"
    • Change the "Item foreground" color (leave background alone)
  • Sassy
    • Studio Experimental Intellisense: True
  • Text Editor
    • File Extension
    • Ensure there are no css, scss or sass file extensions (delete any that exist)

Restart VS for these changes to take effect.

like image 126
Ryan Avatar answered Nov 18 '22 21:11

Ryan


Try this :

In VS 2012 open menu Tools > Options, on left side select menu Text Editor > File Extension and then add scss as extension and choose CSS Source Editor from dropdown as editor

like image 42
Welly Avatar answered Nov 18 '22 21:11

Welly