{"repo":"pearofducks/ansible-vim","free":true,"listed":false,"github":"https://github.com/pearofducks/ansible-vim","clone":"git clone https://github.com/pearofducks/ansible-vim.git","description":"A vim plugin for syntax highlighting Ansible's common filetypes","language":"Vim Script","stars":822,"topics":["ansible","vim-plugin"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"introduction This is a vim syntax plugin for Ansible 2.x, it supports YAML playbooks, Jinja2 templates, and Ansible's hosts files. In Neovim, this plugin provides tree-sitter based highlighting with Jinja2 template expression support and semantic Ansible keyword highlighting — see the neovim section for setup instructions. - YAML playbooks are detected if: - they are in the group vars or host vars folder - they are in the tasks , roles , or handlers folder and have either a .yml or .yaml suffix - they are named playbook.y(a)ml , site.y(a)ml , or main.y(a)ml - Jinja2 templates are detected if they have a .j2 suffix - Files named hosts will be treated as Ansible hosts files You can also set the filetype to yaml.ansible , .jinja2 , or ansible hosts if auto-detection does not work (e.g. :set ft=yaml.ansible or :set ft=ruby.jinja2 ). Note : If you want to detect a custom pattern of your own, you can easily add this in your .vimrc using something like this: If you want to override the default file type detection you can easily do this in your .vimrc . For example if you use YAML syntax for hosts include something like this: This plugin should be quite reliable, as it sources the original formats and simply modifies the highlights as appropriate. This also enables a focus on simplicity and configurability instead of patching bad syntax detection. examples (with solarized colorscheme) Bright (and selective highlight) Dim :-----------------------------------: :------------------------","default_branch":null,"files":null,"tree":[],"storefront":"/r/pearofducks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pearofducks/ansible-vim/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}