Ⅰ. 插件描述
unite-yaml is a unite.vim's source which provides candidates for yaml.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'monochromegane/unite-yaml'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'monochromegane/unite-yaml'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'monochromegane/unite-yaml'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/monochromegane/unite-yaml
Ⅳ. 文档说明
unite-yaml
unite-yaml is a unite.vim's source which provides candidates for yaml.
It supports to input long yaml key, like a Settings.db_const.table.column.key.
Install
add to .vimrc Bundle "monochromegane/unite-yaml"
and :BundleInstall in vim.
Usage
1. Find yaml file from current directory.
:Unite yaml-list in vim.
and choose a yaml file. (supports an ERB enabled YAML, too)
>
config/database.yml
config/locales/en.yml
config/settings/development.yml
config/settings/production.yml
config/settings/test.yml
config/settings.local.yml
config/settings.yml2. Choose a yaml key
choose a yaml key, and Enter in unite.
so, the key was inserted at cursor position.
>
github.client_id: 00000000000000000000
github.client_secret: 0000000000000000000000000000000000000000Keybind
add to .vimrc the following.
" yaml
let g:unite_yaml_prefix = "Settings."
nnoremap <silent> ,y :<C-u>Unite yaml-list<CR>
nnoremap <silent> ,Y :<C-u>UniteResume yaml-buffer<CR>Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request