vim-yaml-helper


Ⅰ. 插件描述

Helper methods for Yaml navigation in vim

Ⅱ. 基本信息

创建日期:  2012-04-01
使用用户:  49
Github星:  35
插件作者:  Lennaert Meijvogel

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'lmeijvogel/vim-yaml-helper'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'lmeijvogel/vim-yaml-helper'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'lmeijvogel/vim-yaml-helper'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/lmeijvogel/vim-yaml-helper

Ⅳ. 文档说明

# My Yaml helper

Introduction

This is a plugin that adds some methods for traversing Yaml files:

  • Moving to the parent node ( :YamlGoToParent ),
  • Getting the full path to the current element ( :YamlGetFullPath ),
  • Moving to an element, given the path ( :YamlGoToKey )

If you want to always display and copy root when using :YamlGetFullPath, put this in your .vimrc:

let g:vim_yaml_helper#always_get_root = 1

To enable auto display of path to node under cursor put this in your .vimrc:

let g:vim_yaml_helper#auto_display_path = 1

Testing

The plugin uses the vim-vspec plugin for testing. Add it to your vim bundle
(for Vundle, Plugin 'kana/vim-vspec').

Then install a recent Ruby (I use 2.3.3) and install the required gems:

$ gem install bundler
$ bundle install --path vendor/bundle

You should now be able to run

bundle exec rake

to run the tests.

添加新评论