[OT] Atom Text Editor for Script Editiing - First Impressions

Kay C Lan lan.kc.macmail at gmail.com
Mon Aug 31 23:44:42 EDT 2015


Well finally got around to downloading Atom and giving it quick check out.
Here are my quick observations compared to my favourite Text Editor and the
Script Editor.

Basically if you've never used a fully fledged Text Editor to write LC
scripts I recommend you give Atom a try. You can get it here;

https://atom.io/

Things I like: (OS X 10.9.5 - it is available on Win and Linux)

1) Once downloaded, when you start it up you are immediately presented with
the Welcome Guide (which you can return to any time later simply by
selecting 'Welcome Guide' at the bottom of the Help menu) Where you
initially want to 'Install a Package'. Enter 'Livecode' into the search box
and when you see 'language-livecode' pop up, click install - much easier
than my favourite TE. Back at the Welcome Guide 'Choose a Theme' and in the
search box type 'revignite' and install 'revigniter-syntax'. Again very
easy.

Open a new document and copy and past in a large script from LC. As syntax
colouring is based on file suffix and your new file has no suffix you'll
need to manual select the LiveCode Builder language at bottom right corner
where it probably says 'Plain text'. Everything should be nicely coloured.

2) The colour syntax option in Atom is different to my TE, some things I
like, others I don't, it's 50/50. One of the things I do like is in Atom
variables are coloured, something that doesn't happen in my TE.

3) Code folding. In my TE I can only fold whole handlers. In Atom it is
more granular, you can fold on if, repeat and switch statements. Excellent!!

4) Autocomplete. Just like my TE when I start to type out a variable it
offers up autocompletions so there is little chance of incorrectly spelling
them - I don't have to use Strict Compilation mode.

5) Dictionary. Actually I don't think this has been implemented as a
dictionary but Atom seems to know all the LC keywords, so backbroundColor
is spelt 'or' not 'our'. Can't spell keywords incorrectly. This was already
done for me with Atom, for my TE I had to manually add a bunch of stuff.

6) Boilerplates. If you type 'if' or 'repeat' you are offered up an
autocomplete. For some reason 'switch' is not included but then again in my
TE I had to manually add the if and repeat boilerplates, Atom comes with
these pre-installed. So all I have to do is add a couple of switch
'snippets' - the term Atom uses for boilerplates.

7) Bracket Pairing. In my TE it highlights when a bracket is unpaired to
remind you you need to type the closing pair. In Atom if you type an open
bracket it automatically types the closing bracket. I imagine in 99.99% of
occasions this will be a time saver and ensure you never leave off a
balanced bracket. Not only that the same applies for single and double
quote. A very nice touch. I'll have to see if I can add that to my TE.

8) Difference comparison is available, obviously, but I haven't played with
it so can't compare.

9) Not sure on Mac if it plays nicely with Versions.

What I don't like:

1) It's 10 times the size of my TE, which partly explains why it is slower
than my TE. The real reason, my TE is written in C++ whilst Atom is written
in HTML, CSS and Javascript. So it is more comparable with LiveCode and in
this regard it is much faster than the Script Editor. I can live with that.

2) Whenever I bring Atom to the front the process Atom Helper takes up 102%
of one of my CPUs and the cooling fan goes into overdrive. OK it probably
realises I need a LOT of help ;-) I won't be using Atom unless I can plug
my laptop in.

3) I can't get rid of the navigation pane down the left side of the window.
If it contained handlers I'd sort of be OK with that, but it is just a File
tree which is a complete waste of space, if I put the mouse over the
document title it tells me exactly where it is located on my HD, I don't
need and entire pane with half a dozen lines at the top used and the rest
empty. My TE allows me to have wall to wall text, just a bit at the top and
bottom is taken up with tools, navigation niceties and important
information. In this regard Atom is worse than the SE because at least with
the SE the left pane is filled with useful info - handler list.

Something must be wrong:

Which brings me to the only real show stopper for me, which I assume I
haven't set something up correctly, but I can't navigate the document based
on handlers. In my TE, just like the SE, there is a button that lists all
the handlers within the script so I just click on one and I'm immediately
taken to it. I can't see that anywhere in Atom, currently I have to scroll
to get any where or open a Search and type in the handler I'm after. At
least the SE, which also has a space hogging left pane fills it with useful
data. I must be missing something.

If someone can point out how to set up Atom to hot link all the handlers
I'll continue to give it ago, otherwise it will only be used for relatively
small script; which is a pity because it does have some very nice features.



More information about the use-livecode mailing list