If you use Emacs, you can stop reading now. If you don’t, there’s a possibility that you may not be aware of an incredibly powerful productivity-boosting tool that works in almost every OS X app. Read on.
Take Control · The trick I’m about to describe works whenever you’re editing text: Gmail, Pages, Keynote, wherever. It relies on the “Control” key, which is down on the lower left corner of most OS X keyboards (but stay tuned for a trick to make it more accessible). The trick is, hold down the “Control” key while you’re hitting another, for example “A”; let’s call this “C-A”.
Go to the beginning of the line.
Go to the end of the line.
Go one character forward.
Go one character backward.
Go to the previous line.
Delete the character at the cursor.
Go to the next line.
Erase all the characters to the end of the line.
Flip the character your cursor is on and the one before it.
Notes · Not all these are available in all programs. I’ve listed them in decreasing order of availability; C-K and C-T sometimes don’t work. Also, you get surprises; for example, in Firefox, if you hit Command-F to search, that opens a little search window at the bottom and it steals C-A and C-F and a few others. Bad, bad Firefox!
Control-K is particularly useful when you’re in a Google search window and it insists in filling in more words than you want to search for. I.e., you type in “owl dropping” and it insists you want “owl droppings photos”. Get as far as you want, C-K, Enter, and there you go.
The Bottom Line · When you’re working hard with your keyboard, you can work harder and go faster if you don’t have to take your fingers off the keyboard, which you do most often to reach the arrow keys; only with these keystrokes, you usually don’t need to. So you can go faster.
Fatter Control Key · If you like these, you may become irritated that the control key is stuck way down in the corner of the keyboard where you have to fish around for it. So, here’s what you do: Open the Mac system preferences, then the Keyboard preferences, and down in the lower right corner of that screen there’s a “Modifier Keys” button. Open that up, and tell it to use the Caps Lock key as the Control key. Who needs Caps Lock anyhow? And having a big fat Control key right there beside the “A” is pretty wonderful.
Emacs · These keystrokes were first seen in Emacs, which you don’t need to know about for this to be useful, but just for background, here’s what noted geek/author Neal Stephenson had to say about it:
In the GNU/Linux world there are two major text editing programs: the minimalist vi (known in some implementations as elvis) and the maximalist emacs. I use emacs, which might be thought of as a thermonuclear word processor. It was created by RichardStallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer – i.e., if someone else is getting paid to worry about how your words are formatted and printed – emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish. – from In the Beginning was the Command Line (1998)
This blog entry, and all the others here, are written in Emacs.