Ⅰ. 插件描述
Vim plugin to run rubocopⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'lad/vim-rubocop-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'lad/vim-rubocop-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'lad/vim-rubocop-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/lad/vim-rubocop
Ⅳ. 文档说明
A Vim Plugin for Rubocop
Runs the rubocop style checker on the current file or files in the current
directory on down. Rubocop config can specify which files to analyse.
Installation
- Install pathogen if you're not using it already.
Clone this repository into your bundle directory:
cd ~/.vim/bundle/ git clone https://github.com/lad/vim-rubocop.git ./vim-rubocopIf you want to use a specific config file set g:rubocop_config
let g:rubocop_config = "~/git/dev/roux/etc/rubocop.yml"Setup whatever shortcuts you want to invoke RubocopThis (current file) or RubocopAll.
nnoremap <leader>R :RubocopThis<CR> nnoremap <leader>T :RubocopAll<CR>