Results 1 to 1 of 1

Thread: Tip to improve gedit syntax highlight

  1. #1
    Join Date
    Jun 2006
    Location
    Millau, France
    Beans
    1,492
    Distro
    Ubuntu 14.04 Trusty Tahr

    Tip to improve gedit syntax highlight

    i really like gedit and find it very powerful with plugins, but i was missing something in syntax highlight for php:correct highlight for heredoc strings like:
    Code:
    echo <<<HTML
       <p> big string bloc with non interpreted " or ' </p>
    HTML;
    i've just edited the xml language file for php located in /usr/share/gtksourceview-1.0/language-specs/php.lang where i add this:
    Code:
    	<!-- 'heredoc strings' -->
    	<string _name = "Heredoc String" style = "String" end-at-line-end = "FALSE">
    		<start-regex>&lt;&lt;&lt;</start-regex>
    		<end-regex>[A-Z]+[;]$</end-regex>
    	</string>
    edit: added a $ to specify that we are at end of line.

    hope the tip will help
    Last edited by ayoli; January 15th, 2007 at 03:09 PM. Reason: correction

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •