benjohnson / atom-django-templates

Atom support for Django templates.
23 stars 10 forks source link

multiline comments #23

Open dteskera opened 9 years ago

dteskera commented 9 years ago

if i want to use multiline comments with ctrl+/ i have to manually change django-templates.cson to '.text.html.django': 'editor': 'commentStart': '{% comment %}' 'commentEnd': '{% endcomment %}'

is there a better way to use single and multiline comments in atom with django-templates

gitanupam commented 7 years ago

@dteskera thanks for the workaround tip. In my version of the package, I see this:

'comment':
    'prefix': 'comment'
    'body': '{% comment %}\n\t$1\n{% endcomment %}'

Do I explicitly have to add the 'editor' section for multiline comments to work ?

Update: Sorry, I was looking at snippets/django-templates.cson instead of settings/django-templates.cson.

@dteskera's workaround worked for me. Would be great to have cmd + i support the more standard template comment sometime though (i.e the following):

{%   code %}
{%   code %}
{%   code %}

This package is great btw - thanks @benjohnson !

drvid commented 7 years ago

+1 for multiline commenting :)

dvops-hq commented 5 years ago

Single line commenting is {# #} While block (multi line) commenting is {% comment %} {% endcomment %} Apparently only one commenting method is possible with ctrl+/

Is there any way to use both? I see both in "django-templates/grammars/html (django).cson" but they don't seem to be used by django-templates in the editor.