Single Line HTML Comments Possible?

45 views
Skip to first unread message

BeeRich33

unread,
May 19, 2019, 11:09:26 AM5/19/19
to BBEdit Talk
Hi folks.

Just wondering, for HTML, is there a way to comment them out by not using block comments?  Blocking out single lines turns that single line into 3 lines.  Ugly as a thing that's really ugly, that is.  

The preference pane has nothing in for single line comments.  Is there an entry with some kind of placeholder that works to do this?

<!-- <a href="http://liveleak.com">go here</a> -->

As stated, this happens:

<!-- 
    <a href="http://liveleak.com">go here</a> 
-->

Cheers

Roland Küffner

unread,
May 19, 2019, 2:33:12 PM5/19/19
to bbe...@googlegroups.com
Hi, I just tried it. I may be missing something, but BBEdit already does what you want.

Try  selecting just a part of a line and choose Text > Comment Lines. This does not insert any line breaks in the comment.

Try selecting a whole line - including the line break (this is what you get e.g. with a mouse click in the number gutter).  Now, the Comment-command adds line breaks with the comment tags.

So, maybe you just had whole lines selected while using it?

Regards,
Roland
--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/cf547d71-d2e2-4fa7-8af8-e70ce1c6d81e%40googlegroups.com.

Rod Buchanan

unread,
May 20, 2019, 11:53:04 AM5/20/19
to BBEdit-Talk List

Yes. Do not include the newline character at the end of line.
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or need technical support, please email
> "sup...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
> To post to this group, send email to bbe...@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/cf547d71-d2e2-4fa7-8af8-e70ce1c6d81e%40googlegroups.com.

--
Rod Buchanan
Kelly Supply Company
1004 W Oklahoma Ave
Grand Island, NE 68802-1328
308 382-5670
308 382-8764 x1120

BeeRich

unread,
May 20, 2019, 12:20:04 PM5/20/19
to Submit BBEdit Group
Hi there. Thanks for the response.

I usually choose a full line using the gutter where the line numbers are. It seems the trailing <cr> is what treats it like a block, including a leading <cr> before <!—

I guess that’s what I have to deal with. Oh well.


> On May 19, 2019, at 2:33 PM, Roland Küffner <medien...@gmail.com> wrote:
>
> Hi, I just tried it. I may be missing something, but BBEdit already does what you want.
>
> Try selecting just a part of a line and choose Text > Comment Lines. This does not insert any line breaks in the comment.
>
> Try selecting a whole line - including the line break (this is what you get e.g. with a mouse click in the number gutter). Now, the Comment-command adds line breaks with the comment tags.
>
> So, maybe you just had whole lines selected while using it?
>
> Regards,
> Roland



Cheers
bee...@gmail.com



BeeRich

unread,
May 20, 2019, 12:20:04 PM5/20/19
to Submit BBEdit Group
That was it.


> On May 20, 2019, at 11:52 AM, Rod Buchanan <ro...@kdsi.com> wrote:
>
>
> Yes. Do not include the newline character at the end of line.



Cheers
bee...@gmail.com



Christopher Stone

unread,
May 21, 2019, 1:07:57 PM5/21/19
to BBEdit-Talk
On 05/20/2019, at 11:16, BeeRich <bee...@gmail.com> wrote:
I usually choose a full line using the gutter where the line numbers are.  It seems the trailing <cr> is what treats it like a block, including a leading <cr> before <!—

I guess that’s what I have to deal with.  Oh well.  


Hey There,

You don't have to select a line to comment it – you only need to have the cursor somewhere in it.

--
Best Regards,
Chris

BeeRich33

unread,
May 22, 2019, 10:02:35 AM5/22/19
to BBEdit Talk
Ah yes.  I use this all the time.  I guess the HTML throws me off.   
Reply all
Reply to author
Forward
0 new messages