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

CssNotepad++HighlightLess

Css Problem Overview


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

Css Solutions


Solution 1 - Css

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

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.

Solution 2 - Css

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMattias AlfborgerView Question on Stackoverflow
Solution 1 - CsskapexView Answer on Stackoverflow
Solution 2 - CssFred KView Answer on Stackoverflow