Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add syntax highlighting for Less in Notepad++?

I want Notepad++ to treat my .less files just as my .css files and thereby get syntax highlighting for any .less files I open.

like image 466
Mattias Alfborger Avatar asked Feb 06 '11 14:02

Mattias Alfborger


People also ask

Does Notepad have syntax highlighting?

Like other text editors, Notepad++ (which is recommended by the basic tutorial) uses a system called Syntax Highlighting which helps in coding by visually identifying different parts of code with color.


2 Answers

To get LESS syntax highlighting, you have to download and import a user defined language file. Here are some links to language files:

  • LESS language file, as listed in the Notepad++ User Defined Language List
  • LESS language file on GitHub

Installation instructions from the GitHub repository:

  • Download the less.xml file
  • Open Notepad++
  • Go to Language -> Define your language..., click on Import... and select the less.xml file you've downloaded
  • Close and restart Notepad++
  • Done

Another way to install language files is to copy them into a file in the Notepad++ installation directory.

like image 109
kapex Avatar answered Sep 22 '22 01:09

kapex


Download from this page the XML file of the language to add (such as Less)

In Notepad++ open Language menu > Define your language... and Import the file

like image 39
Fred K Avatar answered Sep 24 '22 01:09

Fred K