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
Forums
jEdit Support
6 posts
• Page 1 of 1
Re: jEdit Support
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.
And it doesn't really matter where you start, only where you finish.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: jEdit Support
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.
- pchapin
- Posts: 46
- Location: Vermont, USA
Re: jEdit Support
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...
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...
- pchapin
- Posts: 46
- Location: Vermont, USA
Re: jEdit Support
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.
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.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: jEdit Support
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.
- pchapin
- Posts: 46
- Location: Vermont, USA
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 41 guests