Looking for an Eclipse theme for GeSHI (syntax highlighting)
April 13, 2007 7:49 AM   Subscribe

I'm using GeSHi for syntax highlighting but I am looking for a GeSHi theme that does Eclipse syntax highlighting. With Eclipse being such a popular IDE I'm sure someone has created such a theme for GeSHi, but alas my attempts to find one have failed. Anyone have any tips/direction for me? Thanks!
posted by andytmp to Computers & Internet (2 answers total)
It should be noted that GeSHi will not able to exactly match Eclipse because it is simply matching against a predefined set of keywords and highlighting accordingly. For example if you use were using c# and included an assembly not in keywords array defined in csharp.php it will not be highlighted. Another example of this shortcoming is class definitions. Your class name is most likely not in the list of keywords GeSHi is attempting to highlight, nor classes it is extending and interfaces it is implementing, and as a result it will not be highlighted as it would be in the ide.

I am not trying to turn you off from fine tuning specific files to me more to your liking. I found both the csharp.php and sql.php defaults to be quite different than I wanted and was able to get marked improvements by changing only a couple of lines in each file. Open up the corresponding file for the language you would like to highlight and try changing the color: value. If you wanted GeSHi to highlight every language like Eclipse does and not just a specific language clearly this will be a lot more work.

'KEYWORDS' => array(
1 => 'color: #0000FF; font-weight: bold;'
posted by mailbox125 at 10:16 AM on April 13, 2007

Response by poster: Thanks for the response! My main goal is java syntax highlighting using GeSHi, but so that it looks like Eclipse. I poked around and saw that I could change the colors found in java.php and java5.php files to my liking.

But I saw it as a challenge to know what to change since there are so many classificastions of keywords in those files, and I thought, "I bet a java developer somewhere has already done this." Hence my post. :)

Sounds like you're saying that even if I did that, it would be an improvement towards what I want, but would never be quite an exact match to Eclipse.
posted by andytmp at 1:16 PM on April 13, 2007

« Older Help me have un-boozy evenings   |   Should I just crash a wedding, or is there... Newer »
This thread is closed to new comments.