TypeMetal 1.0.4

…is now live on the Mac App Store.

This update makes the path bar context menu work again, fixing the regression that appeared in version 1.0.3. (Sorry for the inconvenience that caused — we’ll be more careful next time!)

1.0.4 also fixes a bug wherein using the arrow keys inside a <pre> element would collapse whitespace, just as TypeMetal does in ordinary text. Condensing whitespace makes sense in most parts of an HTML document, but it’s not something you want in a preformatted text block, where whitespace and newlines are significant. With the fix in 1.0.4, you now can safely use the arrow keys inside a <pre> element, without disturbing the formatting of its content.

<pre> elements are especially useful for featuring clippings of literal markup or program source code in your writing, by the way. A common construct for this is a <pre> wrapped around a <code>, where the <pre> element preserves spaces and line breaks, and the <code> element marks the content as being some kind of program source code, typically prompting appropriate styling such as use of a monospaced font.

You can assemble a <pre><code> construct easily by inserting a <pre> element (Control+/ p r [return]), then inserting a <code> element (Control+/ c o [return]). This leaves you inside the <code> element ready to type. Note that when you’re all done typing the content of this code block, and you want to type what follows the <pre><code> block, you can simply hit the [tab] key to pop out of both the <code> and the enclosing <pre>.

Creating this kind of construct will give you something like this in your HTML:

<pre><code>for (id thing in collection) {
    [thing doYourThing];
}</pre></code>

which, with CSS styling applied, might be rendered something like this:

for (id thing in collection) {
    [thing doYourThing];
}

If this is a construct you use a lot, you might want to create a snippet to make it even quicker to assemble. The snippet body would look like this:

<pre><code>{content}</code></pre>

With that snippet added to my HTML file’s associated snippet set, I’m able to insert a <pre><code> construct by typing Control+/ p r e c [return].

If you ever want to paste some HTML markup for people to read as markup, note that you’ll need to use TypeMetal’s “Paste as Plain Text” command (Command+Shift+Option+V). Ordinary “Paste” (Command+V) would interpret the HTML markup, putting the described elements in your document, instead of the HTML source code description of them. By pasting “as Plain Text”, you get the exact text that’s on the pasteboard, without any interpretation of HTML element tags it might contain. (Relevant User Guide page: Paste)

I hope you’ll enjoy this update! Stay tuned for more improvements to come!