[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs equivalent of the ":g" command in vi
From: |
Eric Abrahamsen |
Subject: |
Re: Emacs equivalent of the ":g" command in vi |
Date: |
Fri, 22 Jul 2011 12:03:35 -0700 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) |
On Fri, Jul 22 2011, C K Kashyap wrote:
> > which could be as simple as in vi/vim.)
> I think he want to delete lines matching a regexp, so C-k is not
> what he
> wants here.
>
> `query-replace-regexp' can be used with a regexp like this:
>
> ^.*\(your_regexp\).*$
>
> and you replace with nothing (empty prompt).
>
> --
>
>
> replace-regexp is indeed closer to what I am looking for. However,
> I'd like the result to not leave blank lines.
>
> Regards,
> Kashyap
Isn't this what flush-lines and keep-lines are for?
Re: Emacs equivalent of the ":g" command in vi, MBR, 2011/07/22
Re: Emacs equivalent of the ":g" command in vi, C K Kashyap, 2011/07/22