Friday, July 6, 2012

Comfortable editing of OScript source code

Greg Griffiths published on his web site an interesting list of text editor extensions that enable more comfortable editing of OScript sources than inside the Livelink Builder IDE (see the original Greg's page for the most recent list):

EditorAdd On
TextPadAdd On    Instructions
Notepad++Add On
Edit PlusAdd On
ScintillaAdd On

The add-ons provide syntax highlighting and/or code block folding for OScript sources. Modern editing components offer more convenience than the Livelink Builder IDE and even though you'd have to paste the resulting code back to the Livelink Builder editor when finished, you might still feel more comfortable than when typing in the Livelink Builder editor all the time.

I got interested because I actually do this. I use SciTE (a programmer's notepad, originally a demonstration application for the Scintilla editing component) when working with OScript sources, mainly for three things:
  1. Write longer scripts. Autocompletion and calltip help improves the productivity.
  2. Review source code. Code structure emphasized by the font style is easier to go through.
  3. Default viewer for opening *.osx files from Perforce Visual Client. I find myself looking and comparing code from other branches pretty often; code block folding and calltip help are very useful to understand foreign code.
SciTE (actually Scintilla) offers advanced editing features, search/replace, block operations and other features you find in editors of modern IDEs like Microsoft Visual Studio. Specifically for OScript sources, there is syntax highlighing, code block folding and calltip help for the language itself and also for objects from the Livelink core API.

If you like the screenshots below and want the same viewing/editing experience you'll need to download at least the version 3.2.0 of SciTE that has OScript support built in. Linux users can simply install the latest SciTE from the package repository of their distribution. Additionally you'll grab and install the OScript API description from the SciTE customization page to get autocompletion and calltip help.

Enjoy!



2 comments:

Greg Griffiths said...

Thanks for the feedback on my Blog Post, I've posted it on my site at http://localhost/greggriffiths.org/livelink/development/oscript/texteditors/ as well so people outside of the KC can see it :)

Ferdinand Prantl said...

Thanks! I updated my post to point to your public page. I'm going to check out OScript support in other editors if there is some room for improvement in Scintilla :-)