BBEdit, HTML Markup tag on one line

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>

Quick tip: keyboard shortcuts in FireFox

Would you like to have a keyboard shortcut that lead you directly to your company’s Basecamp dashboard, ESP, or your Bank’s login page? You can, its easy and it will save the lives of thousands of kittens a year.
This feature has been in FF for a while but it is kind of buried in the interface,  here’s how you do it.

Creating shortcuts for urls

  1. Bookmark a site
  2. Open the bookmark organizer and find then select the bookmark you created. Locate the “More” UI control (its in the bottom left of the right hand pane)
  3. Enter your “keyword” (this will be the shortcut that brings you to the bookmarked URL).
  4. Goto a FireFox window, CMD-L puts the focus in the location bar area. Type your keyword, hit enter. And, you’re there.