Ⅰ. 插件描述
A vim plugin to handle Yaml filesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'einenlum/yaml-revealer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'einenlum/yaml-revealer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'einenlum/yaml-revealer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/einenlum/yaml-revealer
Ⅳ. 文档说明
# Yaml Revealer
Yaml Revealer is a vim plugin which allows you to handle the full tree structure of a Yaml key.
If you often use Yaml files, you know they are very readable at the beginning, but also that they can become a bit harder to read when becoming longer and longer… Yaml Revealer is here to guide you when you're lost.

Features
Reveal the full tree structure of a key
myRoot:
firstChild:
myVar: "foo"
secondChild:
myVar:
foo: "foo"
myVar2:
foo: "foo"
bar: "bar"
> specialKey: "Hi"
Moving to the indicated line will automatically make vim echo
myRoot > secondChild > myVar2
Search for a specific key
Typing :call SearchYamlKey() will display a prompt to search a specific key.
Search for a Yaml key:
Searching for
myVar2>specialKey
will find the concerned line.
Installation
Vundle Installation
Add Plugin 'Einenlum/yaml-revealer' to your .vimrc, reload your config and run a Plugin:Install.
Credits
Thanks to @PedroTroller for his useful help :).
Thanks to @ezpuzz for improving performance.