Closed Grawl closed 8 years ago
I think it is too tricky, when line can be hidden in comment by some symbol in some lines above. Comments should be explicit.
Especially because every text editor have hot key (like Cmd + /
) to add //
to all selected lines.
However, I am open for thoughts and maybe you can convince me, that this feature is very important.
Maybe you're about some .one//two
selectors or content: '//'
? You can limit block comments only by the start of line after all spaces, like
.foo//
color: red
will not work, but
//.foo
color: red
will.
@Grawl Look at github highlighting. How should I guess that whole block is commented? I agree it's too tricky. Syntax should be intuitive.
@TrySound it's Sass highlighting.
Here's Jade highlighting:
div
//-span
span
Still unintuitive.
Did I comment on this and it got deleted or am I crazy?
Anyway, I originally agreed with @ai but syntax highlighting fixes this and actually looks pretty nice. Might be too complicated for the payoff right now though.
@corysimmons this question was in other issue :). I think you answer it there before @Grawl separate question to 2 issues.
Using block comments in Jade and not thinking that it's “unintuitive” or something.
If I add a class .hidden
up in DOM tree I'm ready to get hidden subtree.
If I delete one of my folders in a system I'm ready to not get access to it's content.
It's tree structure.
It's intuitive to work with tree, not with small chunks of code.
:+1: <- helpful
@Grawl show me any benefits of this commenting style compare to Ctrl+/
+1
It's not super difficult to Ctrl+/
out multiple lines, but I really like the way Jade handles this. It's a minor convenience, but I think it is worth implementing (eventually.)
Against this... Hinders readability in my opinion. Uncommented code that acts like it is commented? Seems silly and like an anti-feature... I don't mind dragging my cursor (or merely shift-clicking) a few extra lines so I can press Ctrl+/ in my editor, if that distinctively shows what code is commented and what is not.
Moot point. Editors with syntax highlighting for SSS will display it as commented out.
:+1: Indent block commenting. It's just nice when you want to comment a whole er... block. I use it often in Jade/Pug as well. Click and dragging to comment/uncomment multiple times while testing is a bit much when you compare it to just comment/uncomment a single parent.
If clicking a "only a few more times" was ever a good reason to not add a feature we wouldn't have multiple cursors in our editors either. :grin:
Although it's not the end of the world if this doesn't get added.
I saw that both ways has own fans. But I decide to not implement it. You can always fork project and add it to them :).
I would prefer to comment by indent.
What will be equal to:
It works in that way in Jade and I very like this way to comment out whole trees.