Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 941 Bytes

README.rst

File metadata and controls

58 lines (35 loc) · 941 Bytes

VIM YAML Formatter

Prerequisite

Python package pyyaml need to be installed.

pip install pyyaml

Installation

Using Vundle:

Plugin 'tarekbecker/vim-yaml-formatter'

Usage

Execute YAMLFormat to format the current buffer

:YAMLFormat

A range formatting is not supported.

Configuration

VIM's configuration tabstop determines the number of spaces used for indention.

Per default collection items have the same indention level as their parent:

name:
- item
- item

yaml_formatter_indent_collection=1 can be used to indent the items:

name:
     - item
     - item
let g:yaml_formatter_indent_collection=1