[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delete every other line
From: |
Colin S. Miller |
Subject: |
Re: Delete every other line |
Date: |
Sun, 27 Sep 2009 13:37:49 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
James wrote:
Is there a way to deleting blank unnecessarily double spaced blank lines
in a buffer. "delete-blank-lines" doesn't do what I want.
Cheers,
James
James,
Ctrl-Home
M-x replace-regexp RET
C-q C-j C-q C-j + RET
C-q C-j RET
will replace two-or-more end-of-line characters with
a single end-of-line, for the entire buffer.
C-q allows a special character to be entered literally (from the keyboard),
C-j is end-of-line. + means one-or-more of the previous character (here the last
C-j).
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the
hostname to reply.