Vim syntax highlighting for Ansible YAML files

Continuing the discussion from vi editor for Ansible playbook:

There was a new release today for ansible-vim:

I use Ansible to install this plugin:

    - name: Ansible Vim
      ansible.builtin.git:
        repo: https://github.com/pearofducks/ansible-vim.git
        dest: ~/.vim/bundle/ansible-vim
        depth: 1
        version: "4.0"

And this is loaded via pathogen:

    - name: Vim pathogen Debian file copied
      ansible.builtin.copy:
        src: /usr/share/vim-pathogen/autoload/pathogen.vim
        dest: ~/.vim/autoload/pathogen.vim
        remote_src: true
        mode: "0600" 

And this requires the Debian vim-pathogen apt package to be installed.

1 Like