Wrong indentation when editing Yaml in Vim

前端 未结 7 1102
一整个雨季
一整个雨季 2021-01-30 03:50

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:



        
7条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 04:20

    Install this plugin:

    https://github.com/chase/vim-ansible-yaml

    It is made with Ansible in mind, but in theory it will work with all kinds of YAML files. You will have to :set filetype=ansible unfortunately, if you are not working with ansible related files.

提交回复
热议问题