Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no support for {{!-- --}} style commenting #18

Closed
timohofmeijer opened this issue Jul 5, 2013 · 6 comments
Closed

no support for {{!-- --}} style commenting #18

timohofmeijer opened this issue Jul 5, 2013 · 6 comments

Comments

@timohofmeijer
Copy link

alt-command-slash (Mac) on text-selection should wrap the selection in a {{!-- --}} type comment. This allows commenting code blocks which contain other hbs expressions.

Highlighting of these type of comments would also be great!

@daaain
Copy link
Owner

daaain commented Jul 5, 2013

Hmm, I guess this commenting style could just be the default? Is there any reason not to use it everywhere?

Otherwise things might get a bit confusing as ideally the package should support HTML comments as per #11

@timohofmeijer
Copy link
Author

{{!-- --}} is a multi-line/multi-hbs-tag comment
{{! }} is a single hbs tag comment

http://handlebarsjs.com/#Comments

The difference is similar to difference between // comment and /* comment */ commenting in Javascript. On Sublime-Mac the shortcuts for this are: command-/ and alt-command-/.

@daaain
Copy link
Owner

daaain commented Jul 5, 2013

But that means that there's no harm in just using {{!-- --}} everywhere after all, right?

It would prevent errors when there's a Handlebars block / token in the commented out part so much less error prone to use. The whole comment gets stripped out from the rendered template so even those few extra characters can't be a problem.

Or do you see some particular value keeping the single line {{! }}?

@timohofmeijer
Copy link
Author

{{! }} is cleaner when commenting single hbs tags. It could –for my use– do without shortcut, but not without syntax highlighting.

@knownasilya
Copy link

@timohofmeijer Ditto on that last comment. It just looks broken, because it stops muting the color once it hits the first }} inside the commnet.

image

@daaain
Copy link
Owner

daaain commented Jul 30, 2013

This is fixed now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants