Open Herz3h opened 3 years ago
It looks like you can use vim-commentary's setting to change the comment behavior: https://github.com/tpope/vim-commentary#faq
I have tried that but it prefixes the line with # giving:
# .... comment here ....
Which is not valid commentary :/
I think you need to change that line to include the correct comment, so include {# #} in your vin configuration
On Wed, Jul 15, 2020 at 03:20 Ahmed El Moden notifications@github.com wrote:
I have tried that but it prefixes the line with # giving:
.... comment here ....
Which is not valid commentary :/
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/Glench/Vim-Jinja2-Syntax/issues/28#issuecomment-658593250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADOHBOCOEGJ2VUISZRZPRLR3VKC3ANCNFSM4OWMCEAA .
@Herz3h This is what you want:
autocmd FileType jinja setlocal commentstring={#\ %s\ #}
I'm using this plugin for twig tempaltes which are very similar to jinja ones. But I struggle to use vim-commentary (tpope's plugin) with twig template. When I type
gcc
(to comment a single line):Consider this example:
Cursor being at second line, pressing gcc, preprends
##
to the line and give this result:Which is not valid syntax for twig file, instead it should use
How do I change this behavior ?