« [TIP] Save searches with Servoy 3 | Main | [Tip] Quick tips with Web Client 3.0 »

September 12, 2006

[Tip] SubEthaEdit for Servoy

by David Workman
Data Mosaic

Picture_2_2 There is a text editor out there for just about everything these days and if you want to start a lively debate just ask a group of developers what their favorite text editor is. SubEthaEdit holds it's own in this crowded field and is especially well known for its collaborative abilities.

Have you ever wanted to show a servoy method on an html page with correct syntax coloring? I covered this topic in an earlier tip that accomplishes this task with a Servoy application that parses the text of a method and adds appropriate html tags as it goes along.

As it turns out I could have saved myself a whole lot of effort by utilizing SubEthaEdit's great support for syntax coloring and its powerful html export feature. The default installation comes with syntax coloring modes for all the usual flavors of coding. Each mode is dictated by a file contained in the SubEthaEdit application bundle and creating your own modes is relatively easy. For Servoy syntax coloring it was a simple matter of duplicating the included JavaScript mode file, adding in all the Servoy keywords, adjusting the color parameters and including the file in the application.

This allows me to use SubEthaEdit to easily view, edit, store, and export to html Servoy methods in their native syntax coloring. Especially useful for creating web based Servoy training programs. You can even go poke around under the hood of SubEthaEdit and change the html template file that is used in the export to suit your own needs.

Download the Servoy syntax coloring mode for SubEthaEdit here. To install the mode double-click the file and it will install automatically. Please send me any updates to the mode file if you find I missed any keywords and I'll make sure it stays up-to-date on the main website.

| Posted by David Workman on September 12, 2006 at 01:08 PM in Tips | Permalink

Comments

Well, "color" me conservative but I have used BBEdit since 1995 and proudly wear one of my favorite geek shirts bought somewhere around BBEdit 5: "BBEdit -- It (still) doesn't suck". However, you mention collaborative capability and the ability to add Servoy keywords for syntax coloring ... not sure if I can do this with BBEdit and maybe, just maybe, in the secret dark of night, I might find myself evaluating SubEthaEdit.

So, the one big remaining question in my mind is:
What the heck is a Sub Etha?

Not that I've ever figured out what BB is ...

kazar

Posted by: Ilyse Kazar | Sep 14, 2006 4:42:56 PM

Hi Ilyse,

BBedit is of course the holy grail of text editors but I didn't really say that out loud because I don't want to start a war with everyone who swears by pico.

It isn't all that hard to add syntax coloring for your favorite language in BBedit. But since the whole purpose of the text editor in our work is limited to outputting colorized html and possibly archiving Servoy methods BBedit is overkill for us. And SubEthaEdit does have that nifty collaborative mode that can be really freaking invaluable. When Troy and I get into the thick of things for hours at a time we'll pop open a SubEthaEdit file and use it to track our change log for a day. (And write derogatory comments to each other when we get bored.)

As for your last question about "Sub Etha"...having spent many a night listening to Louis Armstrong and reading Hitchhiker's Guide to the Galaxy (how much better can life get?) I can only highly suggest a sojourn into the brilliant mind of Douglas Adams for your answer. Of course it is still hard as hell to pronounce the name when you're drunk....

http://www.codingmonkeys.de/subethaedit/faq.html

:)

- David

Posted by: David Workman | Sep 14, 2006 11:01:38 PM

I wish Servoy had a better IDE, or would at least integrate with third-party editors (maybe there's no standard for doing this).

Posted by: Sean Mills | Sep 16, 2006 1:18:32 AM

A better IDE? First time I've ever heard anyone bring this up. Can you give some specifics? Would be interested to hear your perspective.

Posted by: David Workman | Sep 16, 2006 11:14:00 AM

Sean: 'I wish Servoy had a better IDE, or would at least integrate with third-party editors (maybe there's no standard for doing this).'

Like David said, never heard this either...

But what is it that you are missing. Maybe I can include it in the Analyzer that I will preview at Servoy World...

Posted by: Marcel Trapman | Sep 18, 2006 2:20:08 AM

I work(ed) a lot with TextWrangler (the free light edition of BBEdit), but I like my first impression of SubEthaEdit! Adding participants to coding! Great feature for support posibilities! (Was that also included in BBEdit?)
Also PHP-HTML and Javascript is nicely formatted. I migth buy a license after my trial period :-)

Posted by: Karel Broer | Sep 20, 2006 2:38:42 PM

I wish I could be notified when someone posts a comment, but anyway, here are a couple of gripes about the current IDE:

1) Servoy formats JavaScript reserved words in comments (like "for"), plus you can't type the word "function".

2) When you un-comment a statement, the formatting is mixed. Some letters look like they're still commented (green italics). You have to close the script and re-open it for the formatting to take effect.

3) You can't comment/un-comment a block of text easily.

4) You can't customize colors (background, keywords, comments, etc.)

Now, with some upcoming changes to Servoy (don' want to reveal too much), hese points may very be addressed.

Posted by: Sean Mills | Sep 30, 2006 12:50:06 PM

Post a comment