pearofducks / ansible-vim

A vim plugin for syntax highlighting Ansible's common filetypes
MIT License
800 stars 98 forks source link

Syntax highlighting breaks when multiline string has hyphens #106

Closed stemid closed 4 years ago

stemid commented 4 years ago
task: >
  testing variable {{ like_this }}
  testing quoted variable '{{ like_this }}' \
  variable assignment='{{ this_is_ok }}' \
  testing variable-assignment='{{ oh_this_breaks }}'
  testing newline
args:
  wut: foobar

more_objects:
  - key: syntax_check
    value: "Verifying that Syntax highlighting works"
  - key: syntax_check02
    value: 'Verifying more quotes'

It only breaks when line 5 is used, must be a combination of hyphenated string values followed by quote marks without whitespace between.

pearofducks commented 4 years ago

If you set the filetype to YAML, does it still break?

stemid commented 4 years ago

@pearofducks Yes, I only recently started using ansible-vim to solve the issue of this syntax breaking in some Ansible files.

So before that I used the vim standard and it still breaks. Also breaks if I try to force set ft=yaml, not sure if that was the standard.

pearofducks commented 4 years ago

Yeah, we largely inherit from YAML syntax for this plugin - so this isn't a bug with this plugin, but rather with YAML highlighting.

This should be fixed in Vim's YAML syntax, not here.