ePerl syntax highlighting in Kate
Kate is a great editor. It has an extensible syntax highlighting facility built around XML files.
As ePerl is very similar to PHP in essence, I took the existing PHP highlighting scheme and adapted it to ePerl. I also had to modify the Perl syntax file to catch the :>
and !>
terminations. And that's it!
Installation
Copy the two following files in your ~/.kde/share/apps/katepart/syntax/
directory:
Restart Kate. All your .epl
, .eperl
, .phtml
and .phtm
files should be highlighted. If not, open the Tools
menu, and select Syntax highlighting
, Script
, ePerl (HTML)
.
Tested in Kate 3.3.2 (KDE 4.3.2 / Ubuntu 9.10 Karmic Koala).
Known bugs
- You can mix
<?
with:>
(for example) and all the other invalid combinations will be undetected. In fact, there should be separate highlighting for CGI and normal modes, but there is not. This should not be a big issue, though.
Xavier Robin
Published Sunday, June 20, 2010 10:53 CEST
Permalink: /blog/2010/06/20/eperl-syntax-highlighting-in-kate
Tags:
Programming
Comments: 0