meta-q

Every one in a while you discover something that is so pitifully basic yet also so marvelously productive that it's worth exposing yourself as an Emacs dummy who's been using the editor for years and thus has no good excuse for not already knowing this. For me, this is one of those times. Here is my discovery:

Meta-q word wraps the current paragraph.

In particular, it wraps comments correctly according to whatever comment-delimiting convention you're using (e.g., // or /* */ or /* with a leading * on each new line). I don't know how many comments I've manually wrapped to 80 columns, painstakingly adding the leading * for each line. Never again, thanks to Meta-q!

(And as long as I have you here, you probably know this one too, but in case you don't, control-R in bash searches your history in reverse. Try typing "<ctrl-r> emacs" at a bash prompt for an example.)

Categories

About this Entry

This page contains a single entry by Mike Tsao published on August 26, 2004 1:10 PM.

Cygwin X was the previous entry in this blog.

woot is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2rc2-en