A better syntax highlighting color scheme for Ruby code on Vim?

J

Jacob Fugal

Thanks, that link is very nice. Not sure yet if it helps with my
stated specific problem - all the Ruby syntax elements that are
undifferentiated in my current scheme may also be so in the schemes on
that website.

I've been using the "desert" color scheme (I may be biases as my
brother wrote it, but I like it nonetheless) for many years. This
color scheme has been included in the install for many years, and at
least recently, a decent ruby.vim syntax file is also included in the
install. So now on a new machine I can just install vim and set
colorscheme=desert in my vimrc and be good to go. Since the new
ruby.vim syntax file has been included, I've never had a problem with
undifferentiated tokens. The colorscheme does suffer from the
dark-blue comments on black background when you're in CLI vim, but the
rest of it works out fine.

Mostly, my point was that since desert has good differentiation of
tokens using the default ruby.vim syntax file, most of the others
mentioned on that page should probably do pretty well also. If they're
not, there might be something weird (or old) about your vim setup.

FWIW,

Jacob Fugal
 
E

Eero Saynatkari

Alder said:
How do I get a nice color scheme that would do a better job of
visually differentiating the various Ruby-related syntactical
elements?

The wife was very enthused about the new http://www.ruby-lang.org
design and particularly the syntax highlighting here so it fell
upon me to create something as close to that as possible. I did
have to change the syntax file a bit to get better granularity
of elements. Anyway:

Syntax file:
http://journal.kittensoft.org/assets/2006/9/15/ruby.vim

Colours:
http://journal.kittensoft.org/assets/2006/9/15/rubylang.vim

It looks pretty nice. I am test-driving it myself.
 
A

Alder Green

Thanks Jacob, and anyone else who contributed to this thread.

After trying dozens of Vim color schemes, both popular and obscure, I
eventually picked zeburn[1], with oceandeep[2] a close second.

These two color schemes had the highest level of syntactical
differentiation out of the box (there are several other schemes on
that level, but I couldn't find any higher level). Still some place
for Ruby-specific improvements by customization, e.g. define a
different color for instance vs. class variables, which Vim actually
recognizes as two different syntactical elements: rubyInstanceVariable
vs rubyClassVarible. Vanilla zenburn and oceandeep link both highlight
groups to rubyIdentifier, thus failing to visually differentiate them.

I've spent quite a few hours coding in zenburn in the last few days,
and it is indeed easy on the eyes for long coding sessions. I've yet
to test oceandeep extensively.

-Alder

[1] http://www.vim.org/scripts/script.php?script_id=415
[2] http://www.vim.org/scripts/script.php?script_id=368
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top