Background
A while back I was trying to get the vim textile plugin installed and ran into a problem. Apparently the vim that’s included with Fedora 10, 11, and CentOS 5 doesn’t include ruby support. This bug report explains what’s wrong with vim and how it’s missing ruby support. The problem is visible with this command:
1 2 3 4 | % vim --version | grep ruby +printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind ... ... |
The –ruby tells us that ruby support isn’t enabled. The only solution I’ve seen thus far is to rebuild vim. Not really a huge deal but it’s work non the less 8-).
Rebuilding vim with ruby support
Here’s how I fixed it.
download vim Source RPM (SRPM)
1 | % wget http://mirrors.xmission.com/fedora/updates/10/SRPMS/vim-7.2.148-1.fc10.src.rpm |
confirm that ruby is installed
1 2 3 4 5 6 | % yum list installed ruby*|column -t|grep ruby ruby.i386 1.8.6.287-2.fc10 installed ruby-devel.i386 1.8.6.287-2.fc10 installed ruby-irb.i386 1.8.6.287-2.fc10 installed ruby-libs.i386 1.8.6.287-2.fc10 installed ruby-rdoc.i386 1.8.6.287-2.fc10 installed |
make sure you have your own rpmbuild directory
1 2 3 4 | % mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} # caution with this second command if you already have your own .rpmmacros, this will overwrite! % echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros |
rebuild vim / re-install vim
1 2 | rpmbuild --rebuild vim-7.2.148-1.fc10.src.rpm rpm --force -Uvh /root/rpmbuild/RPMS/i386/vim-{c,e,m,X}* |
check that vim now has ruby support
1 2 3 4 | % vim --version | grep ruby +printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind ... ... |
Ahh. a +ruby means it worked.
Textile Plugin for vim
Now onto installing the vim textile plugin.
First things first, we need to install rubygems
1 | % yum install rubygems |
Next we need to install the RedCloth gem, it’s required by the textile plugin
1 2 3 4 5 6 | % gem install RedCloth Building native extensions. This could take a while... Successfully installed RedCloth-4.2.2 1 gem installed Installing ri documentation for RedCloth-4.2.2... Installing RDoc documentation for RedCloth-4.2.2... |
Finally, install the textile plugin
Downloading the textile plugin from here,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # unpack the zip % unzip textile-0.3.zip creating: textile/ creating: textile/doc/ inflating: textile/doc/textile.txt creating: textile/ftplugin/ inflating: textile/ftplugin/textile.vim creating: textile/plugin/ inflating: textile/plugin/textile.vim creating: textile/syntax/ inflating: textile/syntax/textile.vim # cd into the textile dir % cd textile % tree . . |-- doc | `-- textile.txt |-- ftplugin | `-- textile.vim |-- plugin | `-- textile.vim `-- syntax `-- textile.vim 4 directories, 4 files # install the plugin % cp -r * ~/.vim/ |
screenshot of textile plugin in action

