Hi there,
I’m using Emacs for editing since a few months now and enjoy it
mostly. However, there’s one thing that continues to annoy me: The
default ruby-mode lacks some syntax highlighting and isn’t able to
cope with extended symbol literals (or however these are called, see
below). To demonstrate the problem, the following code doesn’t get the
highlighting I expect:
···
====================================================================
regex = %r<I am a Regular Expression> # Should be highlighted as
# regular expression, breaks
# indentation
symbol = %s|This is a symbol| # Should be highlighted as a
# symbol as well
str = %q{This is a string} # Should be highlighted as a
# string
str = %{This is a string} # Should be highlighted as a
# string
ary = %w[item1 item2 item3] # Could be highlighted as a
# string
symbol = :"this is a symbol" # Should be highlighted as a
# symbol (not string), sometimes
# breaks indentation
You see, I’m mainly talking about the percent % literals. Is there
anything one can do about this besides digging deep into the code for
ruby-mode?
Valete,
Marvin
PS: Please, don’t issue "vim is better" statements. This is just an
Emacs-related question and that’s it.