SciTE (was: Re: not a question, just a fun thing with syntax_tools)

Chris Pressey cpressey@REDACTED
Fri May 23 21:08:56 CEST 2003


On Fri, 23 May 2003 12:58:39 +0100
Peter-Henry Mander <erlang@REDACTED> wrote:

> Hi Chris,
> 
> If you're willing to recompile the source, here's the source for
> Erlang support. The files are for v1.53, but do a diff just to be sure
> my files don't walk all over things. Hopefully I haven't missed
> anything.

OK, thanks!  I'll try it out.

> The lexer colours the source file, but the folding algorithm is a bit 
> primitive. It folds "case", "fun", "if" and "receive" statements, but
> I would also like it to fold function clauses too, which will require
> a better lexer and syntax analyser. I wish to use 
> http://spirit.sourceforge.net which is recursive descent, easy to 
> understand, and thanks to C++ templates I can practically copy the 
> Erlang EBNF spec straight into C++ code. Nice.
> 
> There's also user-defined folds which are marked thus:
> 
> %{ fold start
> %} fold end
> 
> ...and I find that's quite neat already.

If I may make a suggestion - I'd like to see folds on lists and maybe
tuples, too.  Especially in file:consult/1 format files.  Often when
you're coding in a 'data driven' style, lists can get kind of hairy,
spanning multiple lines and so forth...

Um... also, is there a way to, say, fold all funs, but just the funs? 
That would be handy (sometimes I've got one function with a dozen funs
inside it (being the easiest way to use bound variables from the main
function) and they really clutter the main logic.)

> I've also enclosed the .SciteUser.properties file I use which uses 
> spaces instead of tabs. (You'll notice I was using the Matlab lexer 
> until I got tired of it and rolled my own.)

OK, thanks again - thanks to yvan as well for pointing this out.

> The spaces-for-tabs option is not available in any of the menus, but 
> there are _so_many_ options that I think the menus would become 
> impractical if they were all included!

Yeah, I didn't notice the "Edit [Local/User/Global] Options..." menu
item; this approach makes more sense now.

> Let's see if this weans you off the nedit addiction (-: Nedit doesn't 
> look all that bad really, so why is it so unhealthy?

It's not actually that bad - I was exaggerating.  It is rather
heavyweight, though (Motif-based.)  I'd like to be able to jettison
OpenMotif if I can... almost everything else I use regularly (sylpheed,
dillo, gimp, &c) is GTK-based.

> The one possible 
> advantage of SciTE is that it works on M$-Windows too, but why would I
> want to do that?
> 
> Pete.

It's not as much a matter of 'want' as 'have to', sometimes :)

-Chris



More information about the erlang-questions mailing list