gedit php highlighting [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
seelts

gedit php highlighting [SOLVED]

Post by seelts »

Hi

I'm using gedit to write php, html, js, css etc... But yesterday I've encountered the problem: gedit has stopped to highlight php code. I don't know what was the reason.
Can you help me please to fix that.
I've already tried to reinstall gedit, but it doesn't influence the php highlighting. Other languages have highlighting, but not php.

Thanks,
Ilya.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
fwc

Re: gedit php highlighting

Post by fwc »

It may not be built to highlight php. Its not that advanced for a text editor but Bluefish should work if you want to try.

http://bluefish.openoffice.nl/features.html
antonone

Re: gedit php highlighting

Post by antonone »

Try to reinstall gtksourceview. If it doesn't help, try to locate the file 'php.lang' (should be in /usr/share/gtksourceview-[...]/language-specs). If it's not there, try to post a note saying it's not there :)
DataMan

Re: gedit php highlighting

Post by DataMan »

Additionally, check the preferences. For me, Plugins -> modelines, Fonts & Colors -> Classic.

GEdit has limited syntax color coding in PHP (which is fine with me).

-DataMan
seelts

Re: gedit php highlighting

Post by seelts »

antonone wrote:Try to reinstall gtksourceview. If it doesn't help, try to locate the file 'php.lang' (should be in /usr/share/gtksourceview-[...]/language-specs). If it's not there, try to post a note saying it's not there :)
i can't see pure gtksourceview package.
Image
I've reinstalled libgtksourceview 1, 2. But nothing has changed....
php.lang is present in that places.
DataMan wrote:Additionally, check the preferences. For me, Plugins -> modelines, Fonts & Colors -> Classic.
turning modelines on or off and changing color theme has no effect on highlighting. ((
antonone

Re: gedit php highlighting

Post by antonone »

Highlighting works for me without problems, can you post a screenshot of your gedit with a php file in it?
Do you actually have 'PHP' entry in View/Highlight Mode/Sources/Scripts/PHP?
Are you saving the file with .php extension?
seelts

Re: gedit php highlighting

Post by seelts »

Everybody,
please excuse me, that was my fault - i've checked the file that had no opening "<?php" and closing "?>".


How can I mark this topic as SOLVED?
antonone

Re: gedit php highlighting

Post by antonone »

You can try to edit your first post and change its subject ;). Glad it worked out, sometimes I also do a mistake which is obvious when you know it, but when you don't it looks like an unsolvable problem ;).
Locked

Return to “Software & Applications”