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

Peter-Henry Mander erlang@REDACTED
Fri May 23 13:58:39 CEST 2003


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.

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.

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.)

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!

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? The one possible 
advantage of SciTE is that it works on M$-Windows too, but why would I 
want to do that?

Pete.

Chris Pressey wrote:
> On Thu, 22 May 2003 07:11:42 +0100
> Peter-Henry Mander <erlang@REDACTED> wrote:
> 
> 
>>Since we're on the subject, has anyone come across SciTE from 
>>http://scintilla.org/SciTE.html ? It doesn't have an Erlang lexer 
>>out-of-the-box, but I've been working on two versions. Both have
>>syntax highlighting, one has folding based on indentation depth, the
>>other folds on (limited) syntax parsing. They're both a bit green, but
>>I use SciTE almost exclusively and it suits me. The source will
>>compile for M$-Windows as well as *NIX, and the editor has a pleasant
>>GUI and tool integration.
>>
>>I'm planning to feed back my work into the SciTE project so that
>>Erlang becomes one of the many languages it supports. But before I do,
>>is anyone interested in giving it a spin and offering some criticism?
> 
> 
> I found the port, built it, and tried it.
> 
> Overall, I like it.
> 
> I'm disappointed that it doesn't seem to have a way to simulate tabs -
> or if it does, it hides it unecessarily.  (Tabs are definately one of my
> pet peeves.  When I press left arrow, I want the cursor to move left one
> space.  Not three spaces, not eight spaces - just, one space, like
> always.  I like predictability in an editor.)
> 
> I also couldn't see anything about defining or applying macros. 
> Although complete-word is nice, as is folding, and block comments...
> Don't know yet if it's enough to break my unhealthy nedit addiction.
> But an Erlang mode might push it over the hump :)
> 
> -Chris
> 
> 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: .SciTEUser.properties
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20030523/9b5b4f1d/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SciTE-1.53-Erlang.tgz
Type: application/x-gtar
Size: 30300 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20030523/9b5b4f1d/attachment.gtar>


More information about the erlang-questions mailing list