SciTE Ruby Lexer

Discussion in 'Ruby' started by Kaspar Schiess, Apr 30, 2004.

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

    G'day fellow Rubyists,

    I am currently rewriting the Scintilla Ruby Lexer and Folder code from
    scratch. A code snapshot of today is available from
    http://www.tua.ch/ruby > Current (source code and windows binaries of
    SciTE with new lexer).

    I would like folding and highlighting to be as Ruby-like as possible.
    However, I need your help for this: Is there anything that bugs you
    SciTE users about your editor in connection to Ruby ? Flood me with
    suggestions; I am keeping a todo list here.

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

    iD8DBQFAkiaNFifl4CA0ImQRAv7TAJ9GJct1v0Q7aEWf7KQOWT48TYKVZgCghFhP
    rEtBEkdlU+RDBUhJj23rX+M=
    =kpBz
    -----END PGP SIGNATURE-----
     
    Kaspar Schiess, Apr 30, 2004
    #1
    1. Advertising

  2. Kaspar Schiess <> wrote:
    > I am currently rewriting the Scintilla Ruby Lexer and Folder code from
    > scratch. A code snapshot of today is available from
    > http://www.tua.ch/ruby > Current (source code and windows binaries of
    > SciTE with new lexer).
    >
    > I would like folding and highlighting to be as Ruby-like as possible.
    > However, I need your help for this: Is there anything that bugs you
    > SciTE users about your editor in connection to Ruby ? Flood me with
    > suggestions; I am keeping a todo list here.


    I don't know if this will help you. I took a brief look at your LexRuby.cxx
    but realized that I am not into Scintillas lexing system.

    You may find inspiration by looking at the syntax coloring code I have
    made (entirely in Ruby).
    http://neoneye.dk/syntax.html

    BTW: your tar.gz file didn't have a top dir, which may mess other peoples
    unpack directory up. I suggest you fix it.

    --
    Simon Strandgaard
     
    Simon Strandgaard, Apr 30, 2004
    #2
    1. Advertising

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

    | I don't know if this will help you. I took a brief look at your
    LexRuby.cxx
    | but realized that I am not into Scintillas lexing system.
    ..I wasn't either. ;)

    | You may find inspiration by looking at the syntax coloring code I have
    | made (entirely in Ruby).
    | http://neoneye.dk/syntax.html
    Thank you, I certainly will.

    | BTW: your tar.gz file didn't have a top dir, which may mess other peoples
    | unpack directory up. I suggest you fix it.
    I have changed that. Sorry for messing up your dl directory and probably
    others.


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

    iD8DBQFAki9nFifl4CA0ImQRAusMAJ44CyLaepFr/x+J4TC+LTICZTEVRwCglHx7
    OFmEAeN+jAfsCE1+k210ZPA=
    =cn0X
    -----END PGP SIGNATURE-----
     
    Kaspar Schiess, Apr 30, 2004
    #3
  4. Kaspar Schiess <> wrote:
    [snip]
    > | BTW: your tar.gz file didn't have a top dir, which may mess other peoples
    > | unpack directory up. I suggest you fix it.
    > I have changed that. Sorry for messing up your dl directory and probably
    > others.


    Don't worry, history has learned me to always make a dir for that tar.gz
    I wish to untar, so no accident here.

    IMHO its just good practice to make a top-dir :)

    --
    Simon Strandgaard
     
    Simon Strandgaard, Apr 30, 2004
    #4
  5. At 02:39 01/05/2004 +0900, you wrote:
    >"Kaspar Schiess" <> wrote in message
    > > I would like folding and highlighting to be as Ruby-like as possible.
    > > However, I need your help for this: Is there anything that bugs you
    > > SciTE users about your editor in connection to Ruby ? Flood me with
    > > suggestions; I am keeping a todo list here.

    >
    >A short wish list, some may be outside "folding/highlighting'
    >
    >(1)--------- Compact folds
    >
    >The following:
    >==================
    > #A's are for doing
    > # this kind of stuff
    >-class A
    >- def f
    > stuff
    > end
    > end
    >
    >
    >
    >-class B
    > def f;end
    > end
    >==================
    >
    >When folded at class A should show:
    >==================
    >+class A
    > -------------
    >
    >-class B
    > def f;end
    > end
    >==================
    >i.e. Fold should hide the corresponding 'end', excess whitespace/newlines
    >AFTER that end, and aligned comments and excess whitespace BEFORE before the
    >start. This should apply to all foldable constructs. The -/+ option that
    >appears today on "end" and serves to fold/unfold following whitespace and
    >comments is not useful, even counterintuitive.
    >
    >(2)--------- Multiple buffers/files
    >Probably ignorance on my part. I have only been able to view one file/butter
    >at a time in a Scite window; so I have to open multiple Scite windows
    >instead. I would really like to be able to split the window (horizontally or
    >vertically) and see more than one buffer.


    Try this:
    Edit SciTE.properties
    Add:
    tabbar.visible=1
    tabbar.multiline=1
    If that does not work I can send you my SciTE.properties file, I do use
    tabs and multiple buffers and I rarely open more than one Scite window.

    Yours,

    Jean-Hugues





    >(3)---------- Debugger?
    >Again, probably ignorance on my part. Any way to connect Scite to ruby
    >debugger?


    -------------------------------------------------------------------------
    Web: http://hdl.handle.net/1030.37/1.1
    Phone: +33 (0) 4 92 27 74 17
     
    Jean-Hugues ROBERT, Apr 30, 2004
    #5
  6. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Its Me wrote:

    | A short wish list, some may be outside "folding/highlighting'

    Your whishes were:
    a) Folding improovement:
    Actually the old Ruby lexer and folder was just a Python lexer. Hence
    the end does not fold. I will see to improoving that, but my first stage
    was lexer improvement (nested strings).

    b) Multiple Buffers:
    This is a FAQ on the SciTE list ;) There is a way to do it, as was
    posted elsewhere on this thread.

    c) Debugger:
    FreeRIDE includes one.. and will hopefully include my lexer, making it
    the perfect IDE.. might even adopt using it.

    Glad I can make it ;)


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

    iD4DBQFAksAPFifl4CA0ImQRAv/4AJdobbZEOSMeNSFP7SNtkLb+BKKvAKCBSYxs
    Kll1eoaBH5+nIHEF6s9Gdg==
    =NYSc
    -----END PGP SIGNATURE-----
     
    Kaspar Schiess, Apr 30, 2004
    #6
  7. Kaspar Schiess

    Neil Hodgson Guest

    Its Me:

    > (2)--------- Multiple buffers/files
    > Probably ignorance on my part. I have only been able to view one

    file/butter
    > at a time in a Scite window; so I have to open multiple Scite windows
    > instead. I would really like to be able to split the window (horizontally

    or
    > vertically) and see more than one buffer.


    This is a fairly core restriction: while SciTE can have multiple files
    loaded at once and can display tabs to switch between them, there is no way
    to see the contents of more than one file at at time. I am unlikely to agree
    to lifting this restriction as I want SciTE to remain simple. For more
    complex tasks, a more featureful application would be a better fit. If
    others wish to start a project that adds multiple views to an extended
    version of SciTE then I'll try to help out so that they can continue to
    benefit from enhancements to my version of SciTE.

    For Ruby development, I feel you are much better off with an application
    designed around the needs of Ruby including integration of debugging, use of
    Ruby-compatible regular expressions, and an understanding of the files that
    make up a Ruby project and the links between them. It would be a good idea
    to develop such an application in a sensible high level language like Python
    ;-) rather than C++. FreeRIDE seems to be on the right track.

    Neil
     
    Neil Hodgson, May 1, 2004
    #7
  8. The Art of Untarring (Was: SciTE Ruby Lexer)

    Hi!

    Simon Strandgaard wrote:
    > Kaspar Schiess <> wrote:
    > [snip]
    >
    >>| BTW: your tar.gz file didn't have a top dir, which may mess other peoples
    >>| unpack directory up. I suggest you fix it.
    >>I have changed that. Sorry for messing up your dl directory and probably
    >>others.

    >
    >
    > Don't worry, history has learned me to always make a dir for that tar.gz
    > I wish to untar, so no accident here.
    >
    > IMHO its just good practice to make a top-dir :)


    Using 'mc' hit F3 on any kind of supported archive to see if there
    is a top-dir. FreeBSD does not install mc per default but it's in the
    ports.

    For an uncompressed tar archive

    tar tf archive.tar|head -1

    is sufficient to see if there is a top-dir (use 'tjf' for '.tar.bz2'
    and 'txf' for '.tar.gz'). It should print something that ends in a
    slash and looks similar to the archive name :->

    Josef 'Jupp' Schugt
     
    Josef 'Jupp' Schugt, May 1, 2004
    #8
  9. Re: The Art of Untarring (Was: SciTE Ruby Lexer)

    Josef 'Jupp' Schugt <> wrote:
    > Simon Strandgaard wrote:
    > > Kaspar Schiess <> wrote:
    > >>| BTW: your tar.gz file didn't have a top dir, which may mess other peoples
    > >>| unpack directory up. I suggest you fix it.
    > >>I have changed that. Sorry for messing up your dl directory and probably
    > >>others.

    > >
    > >
    > > Don't worry, history has learned me to always make a dir for that tar.gz
    > > I wish to untar, so no accident here.
    > >
    > > IMHO its just good practice to make a top-dir :)

    >
    > Using 'mc' hit F3 on any kind of supported archive to see if there
    > is a top-dir. FreeBSD does not install mc per default but it's in the
    > ports.
    >
    > For an uncompressed tar archive
    >
    > tar tf archive.tar|head -1
    >
    > is sufficient to see if there is a top-dir (use 'tjf' for '.tar.bz2'
    > and 'txf' for '.tar.gz'). It should print something that ends in a
    > slash and looks similar to the archive name :->



    Its interesting to see how others deal with tar.gz files.

    It would be nice if we had an 'utopia untar' which per default
    ensured that the content got extracted into a top-dir. If the file
    didn't got one, a top-dir was created.

    Same senario with unzip.

    Maybe if untar+unzip+unrar were combined and named unpack.

    Does such tool exist?

    --
    Simon Strandgaard
     
    Simon Strandgaard, May 2, 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. Thorsten Claus

    scite variable for current lexer (markup)

    Thorsten Claus, Jul 24, 2004, in forum: Python
    Replies:
    1
    Views:
    280
    Neil Hodgson
    Jul 24, 2004
  2. egbert
    Replies:
    0
    Views:
    305
    egbert
    Nov 12, 2006
  3. Kaspar Schiess

    SciTE Ruby Lexer (Update)

    Kaspar Schiess, May 2, 2004, in forum: Ruby
    Replies:
    3
    Views:
    153
    Kaspar Schiess
    May 3, 2004
  4. Robert

    SciTE lexer

    Robert, Oct 27, 2004, in forum: Ruby
    Replies:
    3
    Views:
    134
    Kaspar Schiess
    Oct 28, 2004
  5. Peter Suk
    Replies:
    2
    Views:
    233
    Peter Suk
    Apr 18, 2005
Loading...

Share This Page