Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ and embedded Perl - syntax highlighting inside specific tag

In order to make Notepad++ highlight embedded Perl templates as HTML I've added .ep file extension in style configurator. However, it is very common to have large chunks of pure Perl code in these .ep files, which are marked with <% perl code %> tags.

Are there any ways of making Notepad++ interpret everything between <% and %> as Perl code and highlight it as Perl, while everything outside these tags should be considered HTML?

like image 945
Ivan Avatar asked Nov 11 '22 06:11

Ivan


1 Answers

Templating Engines such as Template Toolkit have specific syntax that is used inside the delimiters <% perl code %> that is then converted to and executed as Perl during the template execution (just before rendering) so even if you could have perlish syntax highlighting in the template's directive blocks it would not be 100% correct.

There are a few editors that support TT style templating here, but if you want it in Notepad++ you will probably have to write the .xml for it (which I imagine a few people will be vary grateful for).

like image 51
MattSizzle Avatar answered Nov 15 '22 07:11

MattSizzle