[ANN] "language-livecode" 0.6.0 for Atom Editor
Peter TB Brett
peter.brett at livecode.com
Fri Oct 23 11:13:59 EDT 2015
On 22/10/2015 22:15, Monte Goulding wrote:
>
>> On 23 Oct 2015, at 3:17 am, Peter Haworth <pete at lcsql.com> wrote:
>>
>> The script editor ( and TextMate) automatically indent after
>> if/repeat/switch statements, Atom doesn't. I know it has snippets that
>> will insert a complete if block with indentation but if I simply type an if
>> statement followed by return, no indentation.
>
> This should be possible.
Atom isn't the IDE script editor, and it isn't TextMate. If possible,
we should match the "usual" behaviour of Atom. This probably includes
properly indenting block templates. ;-)
>> The other one is if I press the tab key in the IDE Script Editor, all my
>> code is properly indented and aligned. I would guess that's too specific
>> for Atom to be able to handle, but I miss that feature.
>
> One problem here is tab is used to jump to fields in auto-completed snippets. It should be feasible to have some other key combo trigger a re-indent of the file. It may be that atom already has a standard key combo for this… In most IDEs this is a contextual menu option rather than a standard behavior. I image if you were in a team and using different editors that had slight differences in the re-ident behavior then it would make a real mess of you git history…
>
In LCB files, Edit->Lines->Auto Indent will properly indent and align
the selection (or the whole file if nothing is selected). This doesn't
currently work for LiveCode Script files, probably because the
indentation rules aren't quite right. I've filed an issue:
https://github.com/peter-b/atom-language-livecode/issues/16
You can edit your Atom keymap to add a keybinding for Auto Indent, if
you want.
https://atom.io/docs/latest/using-atom-basic-customization#customizing-key-bindings
I find the IDE editor's auto-indentation behaviour pretty obnoxious (it
regularly screws up the formatting in my comments), so I'll be happy to
*not* have it in the Atom package.
Peter
--
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Open Source Team
LiveCode on reddit: https://reddit.com/r/livecode
More information about the use-livecode
mailing list