Breaking comment lines is broken
kustodian opened this issue · 1 comments
kustodian commented
If I have the following long line in a file with set ft=yaml.ansible
:
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
and if I want to break the comment line into multiple lines I just move the cursor to that line and press gqq
which does this:
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
As you can see it doesn't break the comment line correctly, because it doesn't add #
before each line. If I set ft=yaml
it works correctly:
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
# tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
# quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
# consequat.
so I guess it's a bug in yaml.ansible
file type.
pearofducks commented
Thanks for reporting this, if I get some spare time I'll look into it. Otherwise I'm happy to take a PR fixing it!