Ⅰ. 插件描述
rubygems.vim: Retrieving information from rubygems.orgⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'alexbel/vim-rubygems'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'alexbel/vim-rubygems'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'alexbel/vim-rubygems'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/alexbel/vim-rubygems
Ⅳ. 文档说明
# Vim Rubygems
The vim-rubygems plugin provides ability to work with rubygems.org inside Vim and adds some commands to keep Gemfile up to date.
Features
- general information for selected gem (version, authors, summary, built date, downloads, description)
- versions list for selected gem (version, built date)
- last version for selected gem (version, built date)
- append a version for a gem under cursor
- gems search
- bundler-audit integration. The plugin runs
bundle-auditcommand while saving Gemfile and let you know about outdated vulnerable gems.
Requirements
- Vim 7.3+
- webapi-vim
curlorwgetcommandsbundler-auditgem (optional)
Installation
The plugin is compatible with Vundle/Pathogen.
An example for Vundle:
Bundle 'alexbel/vim-rubygems'Then run :BundleInstall to install the plugin.
Usage
The plugin provides the following commands:
- :RubygemsGemInfo
- :RubygemsVersions
- :RubygemsRecentVersion
- :RubygemsAppendVersion
- :RubygemsSearch gem_name
- :RubygemsGemfileCheck
- :RubygemsBundleAudit
Mappings example (optional):
nnoremap <leader><leader>g :RubygemsRecentVersion<cr>TODO
- ✔ Syntax highlighting
- ✔ Show a list of versions for a gem
- ✔ Append gem version for a gem
- ✔ Active gems search
- ✔ Check Gemfile for outdated gems
- Tests