% Matching With Vim/Ruby

Doug Kearns dougkearns at gmail.com
Sat May 22 00:11:35 EDT 2010

On Sat, May 22, 2010 at 3:35 AM, Scott LaBounty <slabounty at nexatech.com> wrote:


> Doug, et al.,
> I just checked and there is a matchit.vim in my /usr/share/vim/addons/plugin and /usr/share/vim/vim72/macros. Do I need to copy these elsewhere to get them to work?

This should be sourced/loaded provided you don't have the 'compatible'
option set (it is by default) and /usr/share/vim/addons/ is in your
'runtimepath' which it presumably is although I'm not familiar with
that hierarchy.

You can test these with:

:set compatible?
:set rtp?

You can test that the matchit plugin was loaded by running

:let loaded_matchit

which should return "loaded_matchit #1" if it has been.

Now for the ruby specific b:match_words value to be set you'll need to
load the ruby ftplugin.  This is achieved with

:filetype plugin on

which turns on both filetype detection and the loading of ftplugins.

So at a minimum a vimrc containing the following should work.

set nocompatible
set rtp+=/usr/share/vim/addons
filetype plugin on

These are often provided by the system vimrc file anyway but YMMV.
What OS are you running?

> Sorry for all the questions, but I haven't done a lot of vim work lately.

No problem, ask away.


More information about the vim-ruby-devel mailing list