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 add a comment in your YAML to tell Vim special config for this file. For example:
# vim: set shiftwidth=2 tabstop=2 softtabstop=-1 expandtab:
foo:
bar:
- a
- b
Then everyone, who use this file with a default vim, can share the file creator's configuration. It works well especially when cooperating.