Syntax highlighting of comments
sohooo opened this issue · comments
Hi,
when opening the following yaml
file, the ansible
syntax works but comments are not highlighted:
head pi.yaml
---
# vim: ft=ansible
# Pi Setup
#
# run this with:
# > ansible-playbook pi.yaml
- hosts: pi
...
I had to include the following line at the end of ansible-vim/syntax
to detect comments:
diff --git a/syntax/ansible.vim b/syntax/ansible.vim
index 6e91e28..b710701 100644
--- a/syntax/ansible.vim
+++ b/syntax/ansible.vim
@@ -108,4 +108,7 @@ else
highlight default link ansible_with_keywords Statement
endif
+# highlight comments
+syn match yamlComment "#.*"
+
let b:current_syntax = "ansible"
Can you clarify? Do you mean comments aren't formatted as comments? (If so, I'm unable to reproduce this)
Or you want highlighting inside of comments?
Sry @pearofducks , must have been an error on my side (which I expected anyway for this basic feature ;), maybe during :Plug
update. Everything is fine now after reinstall.