Php syntax highlighting in Gedit

On 17 May 2007, in applications, computing, by ayoli

Gedit is a good text editor with many plugins which make it become almost an IDE. In many cases, I prefer it to eclipse for example.
But for php it misses heredoc string highlighting. An heredoc string is for example :


echo <<<
here I can write a big string with some ' or some "
without need to escape them with \ but I can put some {$variables} or {$tableau['0']
HTML;

After a little search, I found the language specs for php here:
/usr/share/gtksourceview-1.0/language-specs/php.lang
So I edited this file (as root, with sudo in my case) and add this block :



<<<</start-regex>
<end-regex>[A-Z]+[;]</end-regex>
</string>

Tagged with:  

1 Response » to “Php syntax highlighting in Gedit”

  1. Gus Dwi says:

    Good Article bro…. Thanks

Leave a Reply

Premium WordPress Themes

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!