intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Apr 17, 2014 1:36 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: TADS 3.1 released!
PostPosted: Fri Feb 24, 2012 6:23 pm 
Offline
User avatar

Joined: Mon Feb 13, 2012 6:21 pm
Posts: 14
Location: UK
bcressey wrote:
OS X and Linux development is essentially just FrobTADS + a text editor + a terminal.

I'm quite happy with my setup now but I remember looking for a long time for an editor with decent syntax highlighting for TADS. Eventually I settled on gVim / MacVim. That's not a choice that will work for everyone and it's somewhat cruel as a recommendation for beginners, but it works really well as a T3 dev environment.


I'm a heavy vim user and am planning to use that for my TADS editing.

I don't suppose you've done any work on a syntax highlighting/indenting plugin for vim that you could share?

I plan to create one, matching the colour highlighting and indenting rules provided by Workbench, but it'd be awesome if you've got something already.


Top
 Profile Send private message  
 
 Post subject: Re: TADS 3.1 released!
PostPosted: Fri Feb 24, 2012 7:01 pm 
Offline

Joined: Tue Apr 27, 2010 1:02 pm
Posts: 800
vim supports syntax highlighting for TADS 3 out of the box. The coloring for anonymous functions is a bit off, but it's never bothered me enough to try to fix it.

It handles indenting pretty well; the only hitch is if you use the normal object syntax...

Code:
foo: object
    bar = 1
;


... then it won't auto-indent the first and last lines. You can use the alternate syntax instead:

Code:
foo: object {
    bar = 1
}


I find those extra braces kind of ugly so I just use the normal syntax and tab / backspace as needed.

Code:
noremap <F5> :up<CR>:!t3make<CR>


That's the extent of my .vimrc customization for TADS 3. It lets me press F5 to save and build a project.


Top
 Profile Send private message  
 
 Post subject: Re: TADS 3.1 released!
PostPosted: Fri Feb 24, 2012 7:10 pm 
Offline
User avatar

Joined: Mon Feb 13, 2012 6:21 pm
Posts: 14
Location: UK
bcressey wrote:
vim supports syntax highlighting for TADS 3 out of the box. The coloring for anonymous functions is a bit off, but it's never bothered me enough to try to fix it.

It handles indenting pretty well; the only hitch is if you use the normal object syntax...


Oh yeah I should have just tried it!

Seems a little basic maybe, I'm wondering if it's just a copy of the C syntax highlighting. e.g. something: Topic is both in same colour, whereas I'd expect class name to be different to object name.

But it's definitely a start - I'll work on some improvements.

Quote:
That's the extent of my .vimrc customization for TADS 3. It lets me press F5 to save and build a project.


I'll let you know if I add anything else


Top
 Profile Send private message  
 
 Post subject: Re: TADS 3.1 released!
PostPosted: Fri Feb 24, 2012 7:24 pm 
Offline

Joined: Tue Apr 27, 2010 1:02 pm
Posts: 800
TheBloke wrote:
Seems a little basic maybe, I'm wondering if it's just a copy of the C syntax highlighting. e.g. something: Topic is both in same colour, whereas I'd expect class name to be different to object name.


Classes in T3 are just objects that start (by convention) with an uppercase letter, so I don't think it makes sense to distinguish them.

For example, these are all legal object declarations.

Code:
something: Topic;
somethingElse: something;
class Nothing: something;


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group