Codea Progress

Hi everyone

Just wanted to give you all an update on how the next version of Codea is looking.

I’ve been spending a lot of time with the code editor. Redesigning it and rewriting it from scratch to be smarter and better.

The wrapped line issues are gone, it is much faster when editing very long documents, and it has much smarter auto indentation as well as an understanding of Lua scoping. (Edit: it also much more elegantly handles international characters, especially characters like Kanji.)

Here’s an example of how the bracket and scope matching looks while typing. The “end” keywords are inserted automatically if the current scope doesn’t balance.

Matching Scopes

Indentation is also much more sensible, pressing tab will indent to the correct scope or to the next appropriate tab location (rather than just inserting four spaces).

Improved Tabbing

There are many other editor improvements (and the potential for a lot more). I think it will be worth the time spent.

looking forward to it…

Looks brilliant, will be waiting for it!!

Looks very nice. Can’t wait to get my hands on it :

You guys never cease to impress!

omg now you make me want the update to be out even sooner… xD

You know, I’ve already found that there are features in the current editor that I really miss when I’m working on plain old text outside of Codea (for example, the nudge left, nudge right key).

I may find myself using Codea to write everything – it’s such a nice editor.

Thank you very much for these efforts! It is worthwile: i spend 98% of my codea time within the editor, so it is very important. Remember the ‘number spinner’ dicussion?!

Btw, since you talk about indentation… back-group-indentation please? It is still ( a bit) annoying not to have it…

@Jmv38 +1 for multiline un-indent. I like the auto indent though great job. As far as I was concerned the old editor was perfect apart from 1) Speed drop when selecting over 500 lines, end up having to wait a second before the selection updates then sometimes it thinks ive cancelled it after I have moved one of the selection indicators so I have to start again…
2) Multiline text problem, sometimes worked perfectly, other times not at all and most of the time placed the caret in the wrong place.

Im going to take a shot in the dark and say those (well at least one) will be fixed. If I had to bet on it I’d say the multiline support :slight_smile:

@Simeon the features you show above, will they be optional? People might not necessarily want an end added at the end of every new function/statement/loop…

mindblow This is the main reason I used Sublime Text with Xcode instead Codea for most of StackIt’s development. Just a quick suggestion - In the second GIF, it seems you have to go to the beginning of the line to indent a line. Can there be an option to be able to indent the line, no matter where your cursor is?
Thanks! =D>

@Luatee that will depend on the response from beta testers. If there is actually a situation where you don’t want to close the scope, then maybe. At the moment I can’t think of a reason to maintain an unbalanced scope in your file during editing — is there any advantage?

(Note that if you typed “end” first, then added the “function foo…” line above it Codea would recognise that and not add an additional “end”. It only gets added if the file is unbalanced after you open a scope.)

On the other issues:

  1. Speed for selections is dramatically improved. I can select thousands of lines on my iPad 3 in debug mode (slow) with no issues.

  2. Multiline text is fixed, caret placement is guaranteed to be accurate.

@Jmv38 I was thinking that I could add an auto-indent option for selected blocks of text. So you select your text, press auto-indent, and it gets put at the correct level for the code you are writing. Back-indent is likely to be included as well.

@Zoyt I’d like to add an option to the selection menu to allow for correctly formatting a selected block of code. This should handle indenting without having to be at the start of a line. Edit: Something like this:


@Simeon That’s brilliant, thanks!

@Simeon I like the formatting option. That will come in very handy when trying to correct newbie code and its posted all left justified. Will that also allow correcting code when they post it without the 3 tildes and it’s all packed together.

|Hi @Simeon,

Just a quick post to thank your for the work you’ve done up to date, and your recent endeavours. Just a quick suggestion - don’t try to build in too many features initially we will no doubt hammer your coding and find something to complain about. It looks so good now an early release may allow you to add extras and massage your existing code with less pressure. Course you’ve probably got betaa testers doing that now.

Thanks again.



@Simeon - Brilliant! =D>
Edit: Just read Codea Commits… Is this written in Lua, or does “extendable” mean through Objective C?

This one has been a long time coming, multi-line comments and strings:


@Zoyt extendable in terms of the editor framework (Objective-C), but the reason to make them extendable in this way was to hopefully add Codea editor plugins written in Lua (much) further down the line.

=D> (As usual)

Just a quick question - I assume by “Renamed”, the end of the codea commit was cut off, not that you renamed Codea…

Btw, @simeon, please make sure all these features work on ios5.1 and ipad1… Please.,.