rvm.vim


Ⅰ. 插件描述

rvm.vim: Switch Ruby versions from inside Vim

Ⅱ. 基本信息

创建日期:  2011-08-31
使用用户:  310
Github星:  117
插件作者:  Tim Pope

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tpope/rvm-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tpope/rvm-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tpope/rvm-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/tpope/vim-rvm

Ⅳ. 文档说明

# rvm.vim

Want to use RVM with Vim? You don't
need a plugin to do that: Just start Vim from your RVM enabled shell
and it will work. But say you started MacVim from Launchpad, or you
started Vim with one version of Ruby and now you want another. That's
where rvm.vim comes in.

:Rvm 1.9.2

If you want to see the version that was chosen, use use:

:Rvm use default

If you leave off the version, it goes .rvmrc hunting relative to the
current buffer.

:Rvm
:Rvm use

If you really want to get crazy, you can make this happen automatically
as you switch from buffer to buffer.

:autocmd BufEnter * Rvm

You can also invoke any old rvm command.

:Rvm install 1.9.3

Add %{rvm#statusline()} to 'statusline' (or 'titlestring') to see
the current Ruby version at all times.

Last but not least, rvm.vim tells recent versions of [vim-ruby][] where your
Ruby installs are located, so that it can set 'path' in your Ruby buffers to
reflect the nearest .ruby-version file.

FAQ

RVM doesn't work in my Vim.

You're using zsh on OS X Yosemite or earlier, aren't you? Move that stupid
/etc/zshenv to /etc/zprofile, which is where it correctly lives on El
Capitan.

Self-Promotion

Like rvm.vim? Follow the repository on
GitHub and vote for it on
vim.org. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See :help license.

添加新评论