Configuring vim editor for Ansible Playbook

Ansible is getting very popular for every department of IT operations. There are multiple ways to edit the plaoybook, but one of my favorite is the vim editor. Indentation is very important while working with Ansible Playbook, myself ran around while editing the playbook, so i though would need to document it around for people who are looking for the vim setting to be used for the Ansible Playbook.

Have the following setting in the ~/.vimrc  file.

autocmd FileType yaml setlocal ai ts=2 sw=2 et



You must be logged in to post a comment.

Proudly powered by WordPress   Premium Style Theme by