Wouter Beugelsdijk's techblog - tech.wiedo.nl

webdevelopment and other tech related stuff 
« Back to blog

Sass 3 Notepad++ User-Defined syntax highlighting

Scssimage
Couldn't find SCSS syntax highlighting in Notepad++ anywhere so made this myself. This is based on the LESS syntax highlighting of Mark Davies.
I know it isn't perfect (yet), so feel free to share, edit or extend this file. But it'll be nice if you keep me updated (in the comments)!

So to use this go in Notepad++ to view->user-defined dialog... then choose import and import this XML file, here your can also change the colors if you don't like mine.

Also if you like to have autocomplete, go to your Notepad++ folder then to /plugins/APIs/ and duplicate the css.xml. Rename this file to scss.xml.

Have fun! Download the file below.

Download SCSS syntax highlighting file

As a bonus i created a *.bat file to watch create a watch with a keyboard shortcut in Notepad++ (via the run menu). Just create a .bat file with something like this:



cd c:\xampp\htdocs\
sass --watch your/sass/folder:your/css/folder --style compressed


So first navigate to your root, in this case my htdocs folder, then create the watch: first folder is your sass folder, second folder is your css folder (seperated by the ':' sign). I also used a compression. The watch creates a .sass-cache folder in the root, so be sure to navigate to a folder where that's no problem (no version control).

Now save the .bat file and run it with Notepad++ (F5), if it's working, you could save the Run and create a keyboard shortcut (press save in the run screen).

(ps. I just started using Sass and i would recommend it to every frontend webdeveloper)

Comments (9)

May 06, 2011
leopyc said...
Looks really good, thanks a lot.
Jul 07, 2011
tomvonclef said...
Just FYI, but I installed this, but now .scss files crash Notepad++. (I am using v5.9.2 unicode).
Jul 11, 2011
@tomvonclef: never had any problems. If it's not too much work try reinstalling your Notepad++ with only this syntax highlighting and see if the problem still exists. It's wierd the editor crashes on only a little custom syntax highlighting.

@everybody: any other people with problems? And what are your solutions? I don't use Notepad++ myself anymore, but last time i checked it still worked.

Oct 31, 2011
fgaeg said...
It's nice! Thank you so much, been waiting for a long time.
Jan 18, 2012
MattCarr147 said...
Thanks for this, just what I was looking for.

Made a slight tweak you may be interested in though by adding basic Code Folding to the rules. Helps for hiding large amounts of nesting etc.

Thanks again!

Jan 18, 2012
Very useful. Thanks a lot.
Feb 13, 2012
mtness said...
Yeah, thanx man!
May 14, 2012
reggae_by said...
I am sorry but after importing nothing happens ( What am i doing wrong? Is it compatible with last notepad++ version?
May 14, 2012
reggae_by said...
Sorry it was my fault

Leave a comment...