当前位置: 首页 > 工具软件 > rails.vim > 使用案例 >

Make rails.vim Work: Compile VIM From Sources

云星波
2023-12-01

Make rails.vim Work: Compile VIM From Sources

Ever heard about rails.vim project? “Accept no imitations: rails .vim is the one true Vim plugin for syntax highlighing, easy navigation, and script invocation for all your Ruby on Rails applications, transparently and unobtrusively” says creator Tim Pope.

The very good “rails.vim” guide can be found here or just by reading project’s vimdoc here .

PROBLEM:

There is however one gotcha for Ubuntu Hardy Heron lovers (or other modern Linux distros). Using rails.vim would result in VIM “segmentation fault”crashes similar to:

Error 写道
Vim: Caught deadly signal ABRT
Vim: Finished.
Aborted
 

REASON:

This is due to the fact that a packaged VIM that comes from some Linux distros repositories has old patches.

SOLUTION:

One of possible solutions would be to download most current VIM sources from http://www.vim.org/sources.php and compile/install it manually. Below is how it is done on Ubuntu (but should be pretty similar on any Linux distro):

1. Get vim sources:

wget ftp://ftp.vim.org/pub/vim/unix/vim-7.1.tar.bz2 

(where ‘7.1′ is the current VIM version at the moment of writing)

2. Unpack it

tar -xvjf vim-7.1.tar.bz2 

3. Install terminal libraries (vim needs them to compile correctly)

sudo apt-get install libncurses5-dev 

4. Configure / Compile / Install

./configure --with-features=huge
make
sudo make install 

5. Point your system to newly compiled VIM:

sudo rm /etc/alternatives/vi
sudo rm /etc/alternatives/vim
sudo rm /etc/alternatives/vimdiff
 
sudo ln -s /usr/local/bin/vim /etc/alternatives/vi
sudo ln -s /usr/local/bin/vim /etc/alternatives/vim
sudo ln -s /usr/local/bin/vimdiff /etc/alternatives/vimdiff 

DONE

 类似资料:

相关阅读

相关文章

相关问答