前段时间,我开始接触用Vim来写一些Ansibleplaybook。然后一直遇到了缩进问题。如下:

The error appears to be in '/home/zhang/Ansible/test.yml': line 2, column 16, but maybe elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- hosts: nj
    remote_user: root
               ^ here

现在问题解决了,其实仅要把默认的缩进是8改成4就可以了。在Vim里面set tabstop=4就可以解决问题了。


zhang12c
6 声望1 粉丝

渺小普通人运维转游戏前端开发