Archive for February, 2006

Adding Heading Tag Support To CityDesk

One of my annoyances with CityDesk is the lack of support for H1/H2/H3/etc tags. It really bugs me that I have to switch to HTML mode whenever I want to format a heading. That stuff should be provided in the WYSIWYG interface.

Since Fog Creek Software never showed any interest in supporting heading tags, I figured out this neat workaround.

I downloaded a free keyboard macro utility called AutoHotkey and set up the following macros in the default ini file:

KeyWait Control
KeyWait Alt

KeyWait Control
KeyWait Alt

KeyWait Control
KeyWait Alt

What this does is maps Ctrl-Alt-1 to send the key sequence to CityDesk to switch to HTML mode, move the cursor to the start of the line, go forward one character, press Del, type “h1”, move to the end of the line, go back one character, press Backspace, type “h1”, then switch back to Normal mode. It does the same to map Ctrl-Alt-2 to “h2” and Ctrl-Alt-3 to “h3”.

To use it, just put your cursor on a line that you want to change into a heading, and then press Ctrl-Alt-1 (or 2, or 3, depending upon which level of heading you want to create). The macro will switch to HTML mode, change the <p> at the start of the line to a <h1>, change the </p> at the end of the line to a </h1>, and return you to Normal mode.

There are some limitations – your heading-to-be needs to be on a single line (not broken across multiple lines), and it needs to be a normal <p> paragraph with no extra spacing at the start or end of the line. If you’re just typing your article in directly in Normal mode, you should be OK with these restrictions.

Try it out, and let me know what you think!

February 23rd, 2006

Vim Assistant

Okay, this is one for the hard-core geeks. My apologies to everyone else :-).

This is an animation showing the new Assistant for Vim in action. It’s not just the Office weenies that get help from animated characters now!

February 13th, 2006


February 2006
« Jan   Mar »

Posts by Month

Posts by Category