Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: MagmaMcFry on October 09, 2013, 11:43:59 AM

Title: CRPL Syntax Highlighter for gedit
Post by: MagmaMcFry on October 09, 2013, 11:43:59 AM
For those of you who use Linux (like me) and use gedit or similar instead of Notepad++, I wrote a CRPL syntax highlighter for GTKSourceView (it's the syntax highlighter used in gedit, pluma, et al.).

Install instructions:

1) Download the attached file
2) Rename it to crpl.lang
3) Place it in ~/.local/share/gtksourceview-2.0/language-specs/ (if that directory doesn't exist, create it)
4) Restart your GTKSourceView editor.

Here's a sample

Straight from the wiki code examples, "Moving creeper wall" by J:

[close]

If you are wondering why I spend my time writing syntax highlighters instead of playing CW3 forever like any sensible person, it's because I don't actually have CW3 yet. I've spent the last three days registering a PayPal account so I can actually buy the game (I now hate PayPal forever), and I've played the entire demo around 10 times now (with increasingly difficult self-imposed challenges), so that's slowly starting to get dull too. Very slowly, mind you. Anyway, have fun using the syntax highlighter.
Title: Re: CRPL Syntax Highlighter for gedit
Post by: Grauniad on October 09, 2013, 11:45:36 AM
Thanks. I'll sticky this until *someone* makes the time to transfer it to the wiki.
Title: Re: CRPL Syntax Highlighter for gedit
Post by: asmussen on October 09, 2013, 01:20:18 PM
Cool. I don't suppose you happen to have a version of that for vim laying around? :P
Title: Re: CRPL Syntax Highlighter for gedit
Post by: MagmaMcFry on October 09, 2013, 02:09:37 PM
No, I don't. Notepad++, GTKSourceView and vim have insanely different file formats.
Title: Re: CRPL Syntax Highlighter for gedit
Post by: planetfall on July 27, 2014, 09:53:28 AM
So... now that I'm on Linux, what is my first priority?

Transfer files from my old computer? No.

Beat all the CS maps I couldn't previously, for lack of system power? No.

Obviously, it's to update this...
Title: Re: CRPL Syntax Highlighter for gedit
Post by: tornado on July 26, 2015, 07:52:46 AM
forgive me but i am having issues locating the local/share directory. if anyone has any advice on where i can find it do tell.

edit one: correction. found the directory and inserted the file. its not showing up as an optional language. am i doing something wrong?

Edit Two: Ok. did a bt of googling and messing around. If you cant install this properly and you are following the instructions here is a word of advice:Try changing the version number of the gtksourceview-2.0 directory.
I kid you not. Changing it from 2.0 to 3.0 fixed the issue.
I'm using Gedit v3.10.4 so this might not always work. if so try changing it to 1.0 or updating.