Web Sources Framework: Syntax Highlighting for Notepad++

Mp3tag Web Sources syntax highlighting for Notepad++

If you develop a Web Sources Script for Mp3tag you may find it useful to highlight your commands and syntax in specific colours. In addition Notepad++ allows code folding. For example, with if , else , and endif , it will define fold regions so that you can fold from if to else , from else to endif , and (assuming there is no else clause) from if to endif.

Notepad++ provides a so called User Defined Language system. The UDL interface allows the user to define rules for formatting normal text, keywords, comments, numbers, folding...

Requirements

Notepad++
Mp3tag Language Definition Export.xml v1.00
compressed in this downloadable file:
Mp3tag Language Definition Export.zip (1,2 KB)

This UDL defintion file contains all the known commands from the Mp3tag Web Sources Framework as of 12.01.2022.

Instructions

  1. Extract the XML from the above ZIP file.
  2. Import the Mp3tag Language Definition Export.xml

I suggest to use the Notepad++ menu Language -> User Defined Language -> Define Your Language and there the Import… button. Navigate to the source XML file Mp3tag Language Definition Export.xml, click Open and this UDL for Mp3tag will be available after a Notepad++ restart and reload of already opened content.

If you load a *.src or *.inc text file, the colours and folding will be applied automatically. You can change the UDL Language at any time using the Notepad++ Language menu.

How does it look?

Can I adjust the colours?

Sure. Use the Notepad++ menu Language -> User Defined Language -> Define Your Language and there choose the User language: Mp3tag src inc from the drop down box.
image

Click on the Tab where you want to change the colour for your commands
image

and then on the Styler button

You can choose whatever colour you like.

Feedback

Please let me know if you find any error or inconsistency with this UDL definition.

3 Likes