More syntax highlighting fun
Doug Kearns
dougkearns at gmail.com
Fri Feb 23 23:10:51 EST 2007
On Fri, Feb 23, 2007 at 12:10:53PM -0600, Tim Pope wrote:
> On Fri, Feb 23, 2007 at 07:56:03PM +1100, Doug Kearns wrote:
> > On Thu, Feb 22, 2007 at 11:32:36AM -0600, Tim Pope wrote:
> > > More important than a few cosmetic changes is the overhaul I gave to
> > > method, module, and class definitions.
> > From a quick inspection I noticed that the following are not being
> > highlighted properly:
> >
> > def foo ; end # whitespace after method name
> > def foo(x); end # with parameter list (also empty list)
> > def Foo::bar;end # specified with ::
>
> Fixed all 3. Turns out the difference between .\@<! and \.\@<! is
> quite large :).
Thanks.
> > def []; end # all redefinable operator methods
>
> You may not have intended it, but this is by far the best case I have
> heard for highlighting method names: indicating whether they are
> valid, including the appropriate operators.
I guess... It's probably the best to highlight them by default. It
certainly seems to be what all the other kids are doing.
> I've added matching for
> all operators that can be overloaded; the list is hopefully both
> exhaustive and exclusive.
You missed == and & which I've added.
<snip>
> > It's really just the "Vim Way" of doing things - at least as I
> > understand it. Generally the configuration options are there to allow
> > people to customize the highlighting without any need to understand
> > syntax files. I think you'd be surprised how many people use Vim with
> > absolutely no understanding of these details. ;-)
>
> True to an extent, but some of this strikes me as "giving a man a
> fish". Actually, I think in my example, the "hi link" is *easier* to
> understand. You don't have to know how "let" differs from "set", and
> why it sometimes but not always needs a "g:" in there to work. Plus,
> having such config variables in place sends the message, "the changes
> you can make are limited to these config variables".
That's a good point.
<snip>
Regards,
Doug
More information about the vim-ruby-devel
mailing list