开发者

How to install rails plugin for vim?

开发者 https://www.devze.com 2023-01-19 14:55 出处:网络
I have dowloaded the rails.zip file from http://www.vim.org/scripts/script.php?script_id=1567. and have unzipped it to a folder rails.

I have dowloaded the rails.zip file from http://www.vim.org/scripts/script.php?script_id=1567. and have unzipped it to a folder rails. Now to install the plugin to 开发者_运维知识库vim.

Here's the vim version am using in my ubuntu 9.04 : version 7.2.79.


You need to place the files into your vim runtime (~/.vim in your case).

This can get messy over time. A better solution is to use Pathogen. Install Pathogen into ~/.vim/autoload. Then you can add the following to your .vimrc:

filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()

And use the ~/.vim/bundle directory to install the plugin, ~/.vim/bundle/rails would contain the contents of the zip file.


to make sure it's installed run:

:helptags ~/.vim/doc

then run:

:help Rails

& you should get Tim Pope's documentation for the plugin if it's installed correctly.

If it isn't, just check the plugin is in:

~/.vim/plugin

& the doc.txt is in:

~/.vim/doc


If you don't want to use pathogen, you can do the work it does by yourself:

  1. Run

    vim -c 'helptags /path/to/rails/doc' -c 'qa!'
    

    (note: /path/to/rails should be replaced with a path to rails plugin, relative path could also be used, but /doc part should be written literally)

  2. Put the following into ~/.vimrc:

    let &runtimepath="/path/to/rails,".&runtimepath
    


Unzip it in ~/.vim like the instructions say.

0

精彩评论

暂无评论...
验证码 换一张
取 消