Vim does not seem to correctly react at a dash symbol in YAML files therefore breaking the format.
For example I have a block which should look like this:
You can disable reindent when you type :
key:
:set indentkeys-=<:>
Please edit ~/.vimrc
file, and add these lines:
filetype plugin indent on
autocmd FileType yaml setl indentkeys-=<:>
Note: autocmd
comes after filetype
.
You can trigger reindent by typing CTRL-F in INSERT mode, for example:
hello: world
foo: bar<C-F>