vim-ansible-yaml
vim-ansible-yaml copied to clipboard
YAML flow mappings are not highlighted correctly
Create a new ansible .yml file and put this in:
- name: install python packages
pip: name={{item.name}} version={{item.version}}
with_items:
- { name: 'Jinja2', version: '2.7.1' } # The "version .." string will be colored wrong.
- { name: 'MySQL-python', version: '1.2.5' } # Same here.
I think that the pattern changes in 8050b3f help; in fact, maybe they help a lot to recognize flow mappings correctly. But adding @yamlTypes to the contains= options is redundant, since we already have it in the nextgroup= option for yamlKey.
At least, I assumed that the point was to recognize key: value properly when value is a Number, Date, Float, etc. If you want to highlight these when they are embedded in a longer yamlScalar, then we should remove the \s*$ that I added in 5a31633 and keep @yamlTypes in the contains= option for yamlScalar; but it will still be redundant in yamlMapping.