52

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

informatik01
  • 16,038
  • 10
  • 74
  • 104
Mattias Alfborger
  • 848
  • 1
  • 7
  • 15
  • Maybe this question is better suited for Super User, especially considering a similar question already exists there. – alex Feb 06 '11 at 14:25
  • First time i heard someone mention Super User but I'm guessing you're right. Is that forum more application oriented? – Mattias Alfborger Feb 06 '11 at 14:33
  • 7
    yes, it's application oriented. However, this question is partly programmer related. It can go to either site. – alex Feb 06 '11 at 14:40

2 Answers2

62

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.

kapex
  • 28,903
  • 6
  • 107
  • 121
  • 1
    This answer addresses much more the original question than the one of alex. Thank you. – Martin Feb 19 '13 at 07:57
  • 3
    Not a huge savings in time, but you don't have to download the file. You can just paste the URL as if it were a file, when you get to the Import dialog. – Andrew Cheong Aug 07 '14 at 04:52
4

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

Fred K
  • 13,249
  • 14
  • 78
  • 103