New TADS3 mode for Emacs

I’ve been working on an Emacs major mode based on CC Mode (the great C/C++/etc programming mode for Emacs):

Since most of IF code is usually text (and TADS3 is usually configured to ignore whitespace in strings), the mode is designed to handle multiline strings as blocks of text, instead of treating them as regular strings. For example, it supports per paragraph auto-fill inside strings.

Being a WIP, it’s still a bit rough around the edges, but it’s already quite usable.

github.com/geokat/ctads-mode

Awesome, thanks!

You are my hero. Keep up the good work.

Do you have a way to format lists on multiple lines?
Something like

someList =
[
some really long item that would be cumbersome sharing one line item,
some really long item that would be cumbersome sharing one line item,
some really long item that would be cumbersome sharing one line item
]

Or is there a more preferred format in ‘C’ style TADS?

Hey, thanks!

How about this:

list = [list_item1,
        list_item2,
        list_item3];

It should also be possible to tweak this using CC Mode’s user variables.
You just format your code the way you want and run CC Mode’s heuristics to guess the values for its variables.
(M-x c-guess). For example, it picked up the following style without any problems:

list = [
    list_item1,
    list_item2,
    list_item3
];

That seemed to work but now when I make a multi-line text block as a list element, the lines after the initial are pulled back to the front.

obj : Class
{
        list = 
        [
             long item that spans a second line,
             should end up here,

             long item that spans a second line,
                 or should end up here,

             long item that spans a second line,
    but it ends up here
        ];
}