Kevin Lee
Kevin Lee

Reputation: 718

How do I set up my .vimrc file to conditionally check for +ruby support?

I recently added a script requiring vim-ruby,

The question I have is similar to: how do I detect OS X in my .vimrc file, so certain configurations will only apply to OS X?

but perhaps there is a clean way to check (as I want to propagate the same .vimrc file across all OSes: Win7-64, Linux(RHEL/Ubuntu), Mac, etc.)

Upvotes: 0

Views: 370

Answers (1)

Conner
Conner

Reputation: 31040

You can use has('ruby') in an if statement. Try :echo has('ruby') to see for yourself.

As an addendum, this works for all "+features" listed in :version.

Upvotes: 4

Related Questions