SciTE

Discussion in 'Ruby' started by Jonas Galvez, Jun 28, 2005.

  1. Jonas Galvez

    Jonas Galvez Guest

    Can anyone share or point me to a decent syntax highlighting file for
    Ruby? The one I have is a bit old and doesn't work well with a number
    of things, such as regexes. Can't seem to find an updated version...

    Thanks in advance.

    --Jonas Galvez
     
    Jonas Galvez, Jun 28, 2005
    #1
    1. Advertising

  2. Jonas Galvez

    Dema Guest

    Hi Jonas, the one that ships with the One-Click Windows Installer does
    a pretty good job. Here it is:

    # Define SciTE settings for Ruby files.

    filter.ruby=Ruby (.rb,.rbw)|*.rb;*.rbw|

    lexer.*.rb;*.rbw=ruby

    file.patterns.rb=*.rb;*.rbw

    keywordclass.ruby=__FILE__ and def end in or self unless __LINE__ begin
    \
    defined? ensure module redo super until BEGIN break do false next
    rescue \
    then when END case else for nil retry true while alias class elsif if \
    not return undef yield
    keywords.$(file.patterns.rb)=$(keywordclass.ruby)

    statement.indent.*.rb=
    statement.end*.rb=
    statement.lookback.*.rb=1
    block.start.*.rb=10

    comment.block.ruby=#~

    # ruby styles
    # White space
    style.ruby.0=fore:#808080
    # Comment
    style.ruby.1=fore:#007F00,$(font.comment)
    # Number
    style.ruby.2=fore:#007F7F
    # String
    style.ruby.3=fore:#7F007F,$(font.monospace)
    # Single quoted string
    style.ruby.4=fore:#7F007F,$(font.monospace)
    # Keyword
    style.ruby.5=fore:#00007F,bold
    # Triple quotes
    # style.ruby.6=fore:#7F0000
    # Triple double quotes
    style.ruby.7=fore:#7F0000
    # Class name definition
    style.ruby.8=fore:#0000FF,bold
    # Function or method name definition
    style.ruby.9=fore:#007F7F,bold
    # Operators
    style.ruby.10=bold
    # Identifiers
    style.ruby.11=fore:#7F7F7F
    # Comment-blocks
    style.ruby.12=fore:#7F7F7F
    # End of line where string is not closed
    style.ruby.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
    # Matched Operators
    style.ruby.34=fore:#0000FF,bold
    style.ruby.35=fore:#FF0000,bold
    # Braces are only matched in operator style
    braces.ruby.style=10

    if PLAT_WIN
    command.go.*.rb=ruby $(FileNameExt)
    command.go.subsystem.*.rb=1
    command.go.*.rbw=rubyw $(FileNameExt)
    command.go.subsystem.*.rbw=1
    command.help.*.rb=$(CurrentWord)!c:\Ruby\ProgrammingRuby.chm
    command.help.subsystem.*.rb=4
    command.help.*.rbw=$(CurrentWord)!c:\Ruby\ProgrammingRuby.chm
    command.help.subsystem.*.rbw=4

    command.name.1.*.rb=Check Syntax
    command.1.*.rb=ruby -cw $(FileNameExt)
    command.name.1.*.rbw=Check Syntax
    command.1.*.rbw=rubyw -cw $(FileNameExt)

    command.name.2.*.rb=Code Profiler
    command.2.*.rb=ruby -r profile $(FileNameExt)
    command.name.2.*.rbw=Code Profiler
    command.2.*.rbw=rubyw -r profile $(FileNameExt)

    command.name.3.*.rb=Run irb
    command.3.*.rb=irb.bat
    command.3.subsystem.*.rb=1
    command.name.3.*.rbw=Run irb
    command.3.*.rbw=irb.bat
    command.3.subsystem.*.rbw=1

    if PLAT_GTK
    command.go.*.rb=ruby $(FileNameExt)

    command.name.1.*.rb=Check Syntax
    command.1.*.rb=ruby -cw $(FileNameExt)

    command.name.2.*.rb=Code Profiler
    command.2.*.rb=ruby -r profile $(FileNameExt)
     
    Dema, Jun 28, 2005
    #2
    1. Advertising

  3. Jonas Galvez

    Jonas Galvez Guest

    Dema wrote:
    > Hi Jonas, the one that ships with the One-Click Windows Installer=20
    > does a pretty good job. Here it is:


    Yeah, I use that file on my custom SciTE build. It's got this annoying
    bug with #{} inside regexes:

    expression =3D 'x.z'
    puts /#{expression}/ =3D~ 'xyz'

    It will consider the text following '#' to be a comment :/

    --Jonas Galvez
     
    Jonas Galvez, Jun 29, 2005
    #3
  4. If you're on windows, I would sugest this version, I felt it was a bit
    more polished than the one-click installer's verison:
    http://gisdeveloper.tripod.com/scite.html

    Furthermore, has anyone seen one that handles the block string
    functions correctly?
    Such as triple quotes, and heredocs(?)

    .adam
     
    Adam Sanderson, Jun 29, 2005
    #4
    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. SciTE

    , Sep 18, 2003, in forum: Python
    Replies:
    3
    Views:
    503
    Richie Hindle
    Sep 19, 2003
  2. rt lange

    Jython and SciTE

    rt lange, Jan 21, 2004, in forum: Python
    Replies:
    1
    Views:
    390
    Neil Hodgson
    Jan 21, 2004
  3. rt lange

    Jython and SciTE

    rt lange, Jan 21, 2004, in forum: Python
    Replies:
    0
    Views:
    277
    rt lange
    Jan 21, 2004
  4. rt lange

    Jython and SciTE

    rt lange, Jan 21, 2004, in forum: Python
    Replies:
    1
    Views:
    300
    Martin Franklin
    Jan 22, 2004
  5. Nuff Said

    Scintilla/SciTE - Python folding

    Nuff Said, Apr 28, 2004, in forum: Python
    Replies:
    1
    Views:
    1,346
    Neil Hodgson
    Apr 29, 2004
Loading...

Share This Page