Change how BBEdit formats: remove line breaks after opening <p> and before </p>?

1,027 views
Skip to first unread message

Todd Everett

unread,
Jun 5, 2015, 1:56:22 PM6/5/15
to bbe...@googlegroups.com
Can I change how BBEdit is formatting the HTML for paragraphs? I set up a keyboard shortcut to apply paragraphs:
     Markup -> Block Elements -> Paragraph

When I do this, I get:

<p>
Meet the expert instructors and apply to share your unique skills & knowledge with our students.
</p>

I'd like to set it up so that the <p> tags aren't on their own line. Like this:

<p>Meet the expert instructors and apply to share your unique skills & knowledge with our students.</p>


Thanks!

Patrick Woolsey

unread,
Jun 5, 2015, 2:43:09 PM6/5/15
to bbe...@googlegroups.com
On 6/5/15 at 1:43 PM, bbe...@googlegroups.com ('Todd Everett'
via BBEdit Talk) wrote:

>Can I change how BBEdit is formatting the HTML for paragraphs?
>I set up a keyboard shortcut to apply paragraphs:
>Markup -> Block Elements -> Paragraph
>
[examples elided]


BBEdit does offer an expert prefs option which you can set to
obtain the desired behavior.

To do so, please issue the following Terminal command on a
single line:

defaults write com.barebones.bbedit
HTMLParagraphMarkup_ParagraphsOnSeparateLines -bool NO

and that should do the job.


[PS: This option is not currently documented, but I'll make sure
we add an entry for it in the next update.]


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>

Oliver Boermans

unread,
Jun 8, 2015, 7:33:46 PM6/8/15
to bbe...@googlegroups.com

On 6 June 2015 at 04:13, Patrick Woolsey <pwoo...@barebones.com> wrote:
defaults write com.barebones.bbedit HTMLParagraphMarkup_ParagraphsOnSeparateLines -bool NO

Thanks!

Gustave Stresen-Reuter

unread,
Jun 8, 2015, 7:57:56 PM6/8/15
to bbe...@googlegroups.com
I have been waiting patiently for years for this… thank you!

Ted

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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.

Lawrence San

unread,
Jun 8, 2015, 8:39:55 PM6/8/15
to BBEdit-Talk
I usually want the P tags on the same line as the text, but occasionally I want it on separate lines (the default), and I've set up BBEdit to do it either way...

I didn't do anything in Terminal as Patrick describes, so if I use the contextual menu "Insert Tag" and choose "p", it puts the paragraph tags on separate lines.

However, I also created a Clipping called "p", and assigned it a keyboard shortcut of control-option-command-P. (It shows up as a cap "P" in the Clippings menu for some reason, although I don't actually hold down the shift key.) This clipping surrounds any selected text with paragraph tags on the same line as the text:

<p>#selectionorinsertion#</p>
#inline#

I also created a similar clipping called "p_class" that also puts the paragraph tags on the same line, plus a class placeholder:

<p class="#placeholderstart#class#placeholderend#">#selectionorplaceholder content#</p>
#inline#

...and another called "p_id" that puts the paragraph tags on the same line, plus an ID placeholder:

This way, depending on my overall formatting, I have a nice choice of how I want the P tags to appear.

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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.

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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.


--
Lawrence San
Business Writing: Santhology.com
Cartoon Stories for Thoughtful People: Sanstudio.com


San

unread,
Jun 8, 2015, 8:46:37 PM6/8/15
to bbe...@googlegroups.com
Oops, I seem not to have pasted in the "p_id" clipping. Here it is:

<p id="#placeholderstart#id#placeholderend#">#selectionorplaceholder content#</p>
#inline#

(I tried to edit my original post from just a few minutes ago, but I can't see any way to do that from either Gmail or from the Google Groups interface. Anybody know a way to do that?)

Lawrence


Patrick Woolsey

unread,
Jun 9, 2015, 10:03:30 AM6/9/15
to bbe...@googlegroups.com
On 6/8/15 at 8:39 PM, lawre...@gmail.com (Lawrence San) wrote:

> However, I also created a Clipping called "p", and assigned it a keyboard
> shortcut of control-option-command-P. (It shows up as a cap "P" in the
> Clippings menu for some reason, although I don't actually hold down the
> shift key.)

Key names are always capitalized in menu commands, e.g. Command-Q. :-)

Todd Everett

unread,
Jun 10, 2015, 12:53:53 PM6/10/15
to bbe...@googlegroups.com, pwoo...@barebones.com
Awesome! Thanks so much!
Reply all
Reply to author
Forward
0 new messages