Request for ERuby, ERB or RHTML syntax coloring for Scite

J

Joao Pedrosa

Hi all,

I am an avid user of Scite for Ruby editing. One of the first editors
that called my attention was Kate, which has a good syntax
highlighting. Then I switched completely over to Scite, once Kaspar
Schiess provided an extended Ruby syntax highlighting for Scite (it
colors almost everything). Now that Rails has provided such a nice
environment for site development, I wish I had HTML + Ruby syntax
coloring for Scite.

I know there is VIM, Emacs, etc, but I like Scite the most.

I tried to add the support myself, but it's too complex for me. Maybe
someone else better at C can take a look at it:

Scite - http://www.scintilla.org/SciTE.html

Kaspar Schiess' extended syntax highlighting -
http://www.tua.ch/ruby/pastprojects.html

Rails - http://www.rubyonrails.org

How does Ruby look to me? -
http://sinsalabintrix.blogspot.com/2004/09/example-code-improved_29.html

Follows a little ERuby or ERB or RHTML script:
--------------------<-- cut ------------<-----------------
<html>
<body>
<h1>Friends#display</h1>
<p>This page will display one friend</p>
<p>
<%= @person.name %><br />
<%= @person.street1 %><br />
<%= @person.street2 %><br />
<%= @person.city %><br />
<%= @person.state %><br />
<%= @person.zip %><br />
</p>
<p>
<% for phone in @person.phones %>
<%= phone.phone %><br />
<% end %>
</p>

<a href="/friends/list">List</a>
<a href="/friends/destroy/<%[email protected]%>">Delete</a>

</body>
</html>
--------------------<-- cut ------------<-----------------

I hope someone can color "my life" a little bit, and I'm sure
there are more people that will be happy with it as well.

P.S. I am CCing this to the mailing list of Scite.

Thanks!

Cheers,
Joao
 
M

Martin DeMello

Martin DeMello said:
The gtk_rules project looks very interesting! Looking forward to
exploring it.

.... if I can find it, that is! The rubyforge page links to an empty
wiki. Has it not been publicly released yet?

martin
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| --------------------<-- cut ------------<-----------------
| <html>
| <body>
| <h1>Friends#display</h1>
| <p>This page will display one friend</p>
| <p>
| <%= @person.name %><br />
| <%= @person.street1 %><br />
| <%= @person.street2 %><br />
| <%= @person.city %><br />
| <%= @person.state %><br />
| <%= @person.zip %><br />
| </p>
| <p>
| <% for phone in @person.phones %>
| <%= phone.phone %><br />
| <% end %>
| </p>
|
| <a href="/friends/list">List</a>
| <a href="/friends/destroy/<%[email protected]%>">Delete</a>
|
| </body>
| </html>
| --------------------<-- cut ------------<-----------------

Hello Joao,

Great to hear that you use the Ruby extended SciTe. There are some bugs,
maybe I will get around to fixing them. In the meantime: Would you like
your HTML colored as Ruby or as HTML ? Or combined ?

SciTe lexers are rather complex, so I don't promise anything. But I just
might be tempted by your problem, next time I touch that code...

- --
kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBaGcvFifl4CA0ImQRAlbiAJ9+hnK/IVuQ0PwdxcPTeg1l/XSPXQCfZRlf
ejkNwGgXEz6/Ftdb+sMjnWQ=
=1Tgq
-----END PGP SIGNATURE-----
 
J

Joao Pedrosa

Hi,
Great to hear that you use the Ruby extended SciTe. There are some bugs,
maybe I will get around to fixing them. In the meantime: Would you like
your HTML colored as Ruby or as HTML ? Or combined ?

I thought about merging what SciTe has for HTML with what you have
provided for Ruby, just like PHP has it. But the codes for the HTML
and PHP are integrated. The HTML colors being separated from the Ruby
colors. I think it's good to have the same colors for all the HTML
files, they having Ruby code in or not.
SciTe lexers are rather complex, so I don't promise anything. But I just
might be tempted by your problem, next time I touch that code...

It would be awesome. Now that some of us are waking up for the
combination of Ruby and HTML, it's a must have.

Thanks for the interest!

Cheers,
Joao
 
J

Joao Pedrosa

Hi,
.... if I can find it, that is! The rubyforge page links to an empty
wiki. Has it not been publicly released yet?

I retracted temporarily from open sourcing it. The reason is that I
ran out of time and there is a lot of work for me to put into it,
still. Maybe I will separate it into modules, just like Rails does it.
This way I could keep the released code simple enough for the
necessary support. :)

Cheers,
Joao
 
M

Martin DeMello

Joao Pedrosa said:
Hi,


I retracted temporarily from open sourcing it. The reason is that I
ran out of time and there is a lot of work for me to put into it,
still. Maybe I will separate it into modules, just like Rails does it.
This way I could keep the released code simple enough for the
necessary support. :)

Okay :) Please do post an ANN to the list when you release it.

martin
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joao Pedrosa wrote:

| I hope someone can color "my life" a little bit, and I'm sure
| there are more people that will be happy with it as well.

Another reply to your mail, once I get to reconsider:

You are probably launching yourself into web application programming
with Ruby. Some advices if this is the case:
~ * Minimize the Ruby code mix with HTML. This not only for syntax
highlighting reasons.
~ * Think of using the frameworks (Rails, Borges, .. )
~ * Think of using database connection frameworks on the level above DBI
~ (This should be standard by now).

Sorry if any of these advices find you informed or even in opposite
opinion.

As to the modifications to the SciTE lexer you requested: I probably
won't make them before a long time, since there are still a number of
problems in the existing lexer. Ruby is such a complex language to parse ...

best regards,
kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBa7ReFifl4CA0ImQRAn6RAJwMXOkISz4hlOjBVJGBFIiHxzpA2wCdH3Za
ZSK0yEL2xydQK7qoHwNf5aE=
=zFZq
-----END PGP SIGNATURE-----
 
J

Joao Pedrosa

Hi,

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joao Pedrosa wrote:

| I hope someone can color "my life" a little bit, and I'm sure
| there are more people that will be happy with it as well.

Another reply to your mail, once I get to reconsider:

You are probably launching yourself into web application programming
with Ruby. Some advices if this is the case:
~ * Minimize the Ruby code mix with HTML. This not only for syntax
highlighting reasons.

I agree.
~ * Think of using the frameworks (Rails, Borges, .. )

I agree, but WEBrick is cool enough that I want to investigate it more. :)
~ * Think of using database connection frameworks on the level above DBI
~ (This should be standard by now).

I agree.
Sorry if any of these advices find you informed or even in opposite
opinion.

Thanks for them.
As to the modifications to the SciTE lexer you requested: I probably
won't make them before a long time, since there are still a number of
problems in the existing lexer. Ruby is such a complex language to parse ...

I can imagine. And Neil Hodgson (SciTE) said that Scintilla has some
limitation which would make it harder to support another language
similarly to PHP, for example. He is working on the next generation of
Scintilla, which has better support for mixing different "styles", but
I don't have idea of when it's going to be ready.

Thanks,
Joao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top