📜 ⬆️ ⬇️

Enable syntax highlighting for less files in Notepad ++

A milestone project when using the less library in a Notepad ++ already familiar to me, for a long time I could not get used to the lack of adequate highlighting for less syntax. Once again, faced with this problem, I decided to put a cross to my torment and began to search the network for a way to add syntax highlighting for less files in Notepad ++.


I found a special thank you to the author. The treatment recipe translated into Russian.

1. Download this XML file .
')
2. Launch Notepad ++, go to the View menu, and then click on the Custom definition item. To the top of the window that appears, there will be a button - Import, click on it and select the XML file that you downloaded to your computer.

3. Restart the program Notepad ++. Open any your .less file.

4. Go to the Languages menu, the LESS item will appear at the bottom of the list. After clicking on it, the highlighting of the less file syntax will become more friendly.

Checked personally - everything works fine. The version of the program Notepad 5.9.6.2.

Attention! The author of the material notes that the symbol "~" is not included in the downloadable file (xml) of the language. Fortunately, this can be easily corrected by returning to the Custom Definition dialog box, selecting the Operators tab, ticking the box next to the "Include transition sign" and entering "~" in the adjacent text field. That's all!

However, there is a small BUT, normally syntax highlighting less works only with the standard color scheme of the program. In another theme chosen by the user, the backlight will be not entirely correct. Therefore, working with less files, do not forget to change the scheme to default.

Translation mr_temi4.

Source: https://habr.com/ru/post/144642/


All Articles