Skip to content

Twig commentary #28

@Herz3h

Description

@Herz3h

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:

{% block stylesheets %}
    <link rel="stylesheet" href="{{ asset('documents.css') }}">
{% endblock %}

Cursor being at second line, pressing gcc, preprends ## to the line and give this result:

{% block stylesheets %}
##    <link rel="stylesheet" href="{{ cached_asset('js-lib/modele-workflow-save.css') }}">
{% endblock %}

Which is not valid syntax for twig file, instead it should use

{# .... comment here .... #}

How do I change this behavior ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions