Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For Vim users: I'm looking for the equivalence of tw=80, gq

I have two paragraphs of a certain width, which I'd like to reformat to fit in the width of 80 characters. What is the easiest way to do that, while keeping the paragraphs (empty line between) separate?

share|improve this question
up vote 6 down vote accepted

80 characters should be the default width, otherwise:

C-x f 80 RET

Then select your paragraphs and press:


For the justified version use:

M-1 M-q

Where M is the meta key: Alt or Esc.

share|improve this answer
80 was just an example. In any case, works perfectly, thanks cYrus! – Rook Jan 4 '12 at 11:35
Btw, does emacs have a command to restore the last selection again? (so I don't have to go any select the region manually over and over)? – Rook Jan 4 '12 at 11:36
I don't know, but if it concerns paragraph reformatting consider the following: 1) M-q will be applied to the current paragraph if nothing else is selected; 2) you can M-x auto-fill-mode to automatically reformat text as you write it. Hope this helps. – cYrus Jan 4 '12 at 11:44
It does somewhat, yup :) – Rook Jan 4 '12 at 11:58
@Idigas: If you didn't move you can use C-x C-x to exchange-point-and-mark and thus reselect the last region. If you've moved, the last region will be selected extended to your current position. – Daimrod Jan 4 '12 at 16:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.