Ⅰ. 插件描述
Vim ftplugin for enabling gf on include_recipe in ChefⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dougireton/vim-chef'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dougireton/vim-chef'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dougireton/vim-chef'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dougireton/vim-chef
Ⅳ. 文档说明
# vim-chef
vim-chef is a Vim plugin which detects Chef cookbook and Chef-Repo files and
sets the filetype to 'ruby.chef'. This enables other plugins like
Syntastic to
work with Chef files, e.g. running
Foodcritic automatically on file save.
vim-chef also appends to Vim's 'path' to make 'gf' work on include_recipe
lines in Chef recipe files. For example, if you have these lines in your
cookbook's recipes/default.rb file:
include_recipe 'git'
include_recipe 'git::source'
include_recipe 'current_cookbook::my_other_recipe''gf' with the cursor on the recipes above would jump to
'git/recipes/default.rb', 'git/recipes/source.rb', and
current_cookbook/recipes/my_other_recipe' respectively.
Installation
If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/dougireton/vim-chef.git