Closing down the competition

Well yesterday I talked about C-o (open-line) that opens up additional lines beneath the line you’re currently on, and how little I used it.

A related key that I use even less, but could see more opportunity for, is C-x C-o (delete-blank-lines), which collapses repeated lines of whitespace into a single line.

The first thing I find myself wondering, though, is “Why C-x?” It seems to me that most other commands like this—variations on a shorter set of keystrokes—use the C-u prefix to say, “do the opposite-ish”.

That aside, I’m going to try and keep this keystroke in mind, because it seems like something I will find a use for, if only I can remember it.

Opening up your document

I’m actually a bit of a fan of whitespace in code. I know a lot of people who…are of a different opinion, to say the least. Perhaps it’s because I don’t have some of the more sophisticated code-motion keys down in Emacs, but I like to have the whitespace to break up semantic units and help me understand how lines of code are interrelated.

So it’s surprising that I haven’t ever really cottoned to C-o (open-line).

Actually, that’s not 100% true—in the readline library that underlies the history system in the bash shell, I use C-o a lot; it is useful for when you have a repeated series of commands you want to cycle through again, you can find the first command in the series and then step through with it.

But in Emacs, I’ve never used it much.

However, what I do find myself doing a lot is C-q (quoted-insert) C-j (newline-and-indent) in the mini-buffer, during search-and-replace sessions. And for that, C-o may be, at times, an easier option. So I’ll try and adopt it, and see how it goes.