A Vim plugin providing syntax highlighting for Ansible playbooks, Jinja2 templates, and hosts files.
ansible-vim is a Vim plugin that provides specialized syntax highlighting for Ansible configuration files. It recognizes Ansible playbooks, Jinja2 templates, and inventory hosts files, applying context-aware highlighting to improve readability and reduce errors when editing infrastructure-as-code.
DevOps engineers, system administrators, and developers who use Ansible for automation and edit Ansible YAML playbooks or Jinja2 templates directly in Vim/Neovim.
It offers accurate, customizable highlighting tailored to Ansible's syntax, with optional Neovim tree-sitter support for superior Jinja2 expression parsing, without disrupting existing Vim syntax definitions.
A vim plugin for syntax highlighting Ansible's common filetypes
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides context-aware syntax highlighting for Ansible playbooks, Jinja2 templates, and hosts files, with detection rules for standard directories like tasks/ and roles/, as detailed in the introduction.
Optional tree-sitter parsing in Neovim offers superior Jinja2 and YAML highlighting with semantic keyword groups, requiring parsers like jinja and yaml for enhanced editing, as explained in the Neovim section.
Allows fine-tuning of highlights through global variables such as g:ansible_attribute_highlight and g:ansible_extra_keywords_highlight, enabling tailored syntax groups for different use cases.
Builds upon existing Vim syntax definitions rather than replacing them, ensuring compatibility and minimizing maintenance overhead, as stated in the philosophy section.
Omni-completion for Ansible builtin modules requires Vim version 9.0 or higher, excluding users on older versions, as noted in the completion section.
Enabling tree-sitter highlighting in Neovim necessitates installing additional parsers and calling setup(), which adds steps and potential warnings if parsers are missing, unlike the simpler Vim syntax.
The plugin explicitly does not support indenting entire documents with commands like gg=G, which might frustrate users expecting comprehensive YAML formatting, as mentioned in the bugs section.