Request for ERuby, ERB or RHTML syntax coloring for Scite

Discussion in 'Ruby' started by Joao Pedrosa, Oct 8, 2004.

  1. Joao Pedrosa

    Joao Pedrosa Guest

    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/<%=@person.id%>">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
     
    Joao Pedrosa, Oct 8, 2004
    #1
    1. Advertising

  2. Martin DeMello, Oct 8, 2004
    #2
    1. Advertising

  3. Martin DeMello <> wrote:
    > Joao Pedrosa <> wrote:
    > >
    > > How does Ruby look to me? -
    > > http://sinsalabintrix.blogspot.com/2004/09/example-code-improved_29.html

    >
    > 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
     
    Martin DeMello, Oct 8, 2004
    #3
  4. -----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/<%=@person.id%>">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-----
     
    Kaspar Schiess, Oct 9, 2004
    #4
  5. Joao Pedrosa

    Joao Pedrosa Guest

    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
     
    Joao Pedrosa, Oct 10, 2004
    #5
  6. Joao Pedrosa

    Joao Pedrosa Guest

    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
     
    Joao Pedrosa, Oct 10, 2004
    #6
  7. Joao Pedrosa <> wrote:
    > 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. :)


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

    martin
     
    Martin DeMello, Oct 11, 2004
    #7
  8. -----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-----
     
    Kaspar Schiess, Oct 12, 2004
    #8
  9. Joao Pedrosa

    Joao Pedrosa Guest

    Hi,

    On Tue, 12 Oct 2004 19:31:25 +0900, Kaspar Schiess <> wrote:
    > -----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
     
    Joao Pedrosa, Oct 12, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Belorion

    Webrick, erb, and .rhtml

    Belorion, Jan 12, 2005, in forum: Ruby
    Replies:
    13
    Views:
    479
    Nicholas Van Weerdenburg
    Jan 19, 2005
  2. Paul
    Replies:
    1
    Views:
    186
  3. Martin Nemzow
    Replies:
    0
    Views:
    124
    Martin Nemzow
    Jun 8, 2006
  4. Du De

    erb and rhtml templates?

    Du De, Jul 15, 2008, in forum: Ruby
    Replies:
    2
    Views:
    116
    Du De
    Jul 21, 2008
  5. Glenn
    Replies:
    1
    Views:
    153
    F. Senault
    Jan 10, 2009
Loading...

Share This Page