Github syntax highlight style scheme for Gedit?
Asked Answered
S

3

9

I like the syntax highlight style scheme used for R scripts in github and I would like to get it to my gedit editor. Where could I get it?

Sue answered 2/12, 2010 at 8:34 Comment(0)
R
6

The easiest way to get R syntax highlighting in Gedit is the RGedit add-on: http://sourceforge.net/projects/rgedit/

RGedit also allows executing R code from within Gedit, which is very handy.

Here's a screenshot of how I have my RGedit set up. I use a custom color pallet but you could alter the color scheme to look more like Github:

alt text

The lower pane is the R session (black on white) and the upper pane is the text editor (color on black).

Rabblerouser answered 2/12, 2010 at 12:33 Comment(1)
@JD Long: thanks for the link. I had not hear of the RGedit add-on. It seems interesting. Regarding the gedit color scheme, maybe the best option will be to make my own theme.Gaughan
B
1

gedit doesn't seem to have much in "syntax highlighting plugins":

Both doesn't support easily any language definition.

Maybe another editor (like bluefish for instance) would be more appropriate.

Bookish answered 2/12, 2010 at 8:57 Comment(0)
B
0

It seems that both existing answers are outdated, although the RGedit plugin JD Long mentioned still works. It looks like the last update was from almost a year ago, and there might be some problems with the latest version of gedit; however, I installed the plugin and it seemed to work without following the instructions in the forum (I'm running on Xubuntu 14.04).

However, for syntax highlighting (like the OP requested) - you don't have to do anything special. Today Gedit comes with syntax highlighting for many languages out-of-the-box, and one of them is R. If it doesn't detect R automatically (based on mime type or extension) then you can manually set the syntax highlighting scheme by clicking on the file type on the bottom right of the screen, where it says plain text or by choosing View -> Highlight Mode from the menu.

enter image description here

Babe answered 16/8, 2014 at 6:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.