In BBEdit I use the keyboard shortcuts a lot. They’re a great way to save some time. The default behavior for the keyboard short cut to insert (or wrap the selected text in) the <p> tag always bothered me, it put the <p> and </p> on new lines like:
<p>
</p>
What I want (almost always) is both <p> and </p> on the same line:
<p></p>
Well I spent some time digging around the plist files and the preferences and couldn’t figure it out for a while.
I don’t often use the menus or the palletes, too much mousing around. But here’s where I found the solution to getting command-option-p to output the <p> tag on one line: In HTML mode, go to the Markup menu, in the Block Elements sub menu, select the first option “Paragraph…” (vs. the second one which has the cmd-opt-p shourcut bound to it). This is the menu based dialog that presents the various options a <p> can have (id, class, style, etc.). De-select the “Place Tags on Separate Lines” checkbox and click the Apply button.
You now have told BBEdit your preference for how the <p> tag is used via this menu command and via the keyboard shortcut, cmd-opt-p. From now on when you use the cmd-opt-p keyboard command, you’ll get:
<p></p>