'Special' method highlighting

Gavin Sinclair gsinclair at soyabean.com.au
Tue Aug 19 01:30:59 EDT 2003

On Tuesday, August 19, 2003, 12:43:55 AM, Doug wrote:

> I've received some suggestions that certain 'special' methods should be
> highlighted.

> For example we currently highlight include but not extend, and others
> have suggested highlighting new, attr*, private, protected, public,
> puts, (s)printf, p, exit etc.

private, protected, and public get my vote.  attr* is not a bad
suggestion.  I'd leave all the others.

> I think this is the wrong way to go, and that since they're all simply
> methods of Kernel, Class, Module or Object, they shouldn't be treated
> any differently.

I think you can afford to be selective in the interest of readability.
It's great that all these things are just methods, but Not All Methods
Are Created Equal.  The elegance of the language shouldn't mean it has
to be viewed in black and white ;)

They should be treated on a case by case basis, because highlighting
*all* the "special" methods diminishes the value of highlighting *any*
of them.

> This would mean that we'd no longer highlight raise, fail, catch, throw,
> require, include, load, loop, proc, lambda ...

It would kinda suck if these weren't highlighted, in my blunt opinion.


More information about the vim-ruby-devel mailing list