vim-ansible-yaml icon indicating copy to clipboard operation
vim-ansible-yaml copied to clipboard

YAML flow mappings are not highlighted correctly

Open oryband opened this issue 11 years ago • 1 comments

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.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4075943-yaml-flow-mappings-are-not-highlighted-correctly?utm_campaign=plugin&utm_content=tracker%2F509109&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F509109&utm_medium=issues&utm_source=github).

oryband avatar Aug 27 '14 12:08 oryband

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.

benjifisher avatar Nov 30 '14 20:11 benjifisher