Page 1 of 1
jEdit Support
Posted:
Tue Dec 16, 2008 7:21 pm
by pchapin
I see in the "Help Wanted" post that a call has gone out for people interested in adding Cobra support to their favorite text editor. It happens that I'm a jEdit user and my first move when I started playing with Cobra was to begin building an edit mode for it. Since I don't really know Cobra at this point, my edit mode is no where near fit for general consumption. However, perhaps once I get it into shape I can provide it to the community (and submit it to the jEdit team).
I started by copying the Python editing mode on the assumption that might be a good starting place for Cobra. If that seems like the wrong approach don't hesitate to let me know!
Peter
Re: jEdit Support
Posted:
Wed Dec 17, 2008 9:23 am
by Charles
Note that starting with Python is one of the suggestions at
EditorSupportTips. So I've done the same thing in the past with other editors.
And it doesn't really matter where you start, only where you finish.
Re: jEdit Support
Posted:
Wed Dec 17, 2008 12:46 pm
by pchapin
Actually today I was looking in the Cobra compiler source code at the KeywordSpecs.cobra file. You seem to have many (all?) of the reserved words nicely organized there into various categories. I brought them all into my jEdit editing mode so now I at least have it colorizing Cobra code in a reasonable way. There is still work to be done on the auto-indenting and I'm sure other things, but I feel like I have a good start.
Re: jEdit Support
Posted:
Thu Dec 25, 2008 7:20 pm
by pchapin
I created a first draft Cobra editing mode for jEdit. It colorizes Cobra code in a reasonable way and does a fairly reasonable job of auto-indentation. Although I started with jEdit's Python mode, I ended up rewriting/revising almost all of it.
The editing mode is still a work in progress in that there are still some things that it doesn't do that it probably should. However, even in its current state it makes editing Cobra code under jEdit a lot nicer than, for example, just treating the files as plain text. Although I don't think the editing mode is ripe enough to warrant submitting it to the jEdit developers just yet, it might be nice to put it into the hands of other Cobra people now. What's the best way to go about that? I see there is a jEdit place holder on Trac...
Re: jEdit Support
Posted:
Fri Dec 26, 2008 12:26 am
by Charles
You should feel free to create that page and then upload the config file as an attachment. Then post a link to the wiki page on the forums so they know about it.
Maybe the file name should be "stamped" with the date like "foo-2008-12-25-a.bar" to distinguish multiple attachments? Use your best judgment. It's a wiki and we can always edit some more and fix things up at any time.
Thanks for your help in this.
Re: jEdit Support
Posted:
Sun Dec 28, 2008 5:44 am
by pchapin
Chuck wrote:You should feel free to create that page and then upload the config file as an attachment. Then post a link to the wiki page on the forums so they know about it.
I posted the current version of the editing mode here:
http://cobra-language.com/trac/cobra/wiki/jEditSupport.