help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: some vi equivalents please?


From: Parker, Matthew
Subject: RE: some vi equivalents please?
Date: Fri, 31 Oct 2008 12:01:02 -0400

M-x delete-matching-lines     -> delete lines that contain regexp
M-x flush-lines               -> synonym
M-x delete-non-matching-lines -> the reverse
M-x keep-lines                -> synonym

Matthew Parker

SEI  | 1 Freedom Valley Drive | Oaks, PA 19456 | p: 610-676-1279 | f:
484-676-1279 | www.seic.com
> -----Original Message-----
> From: help-gnu-emacs-bounces+mparker=seic.com@gnu.org
[mailto:help-gnu-
> emacs-bounces+mparker=seic.com@gnu.org] On Behalf Of rustom
> Sent: Friday, October 31, 2008 11:09 AM
> To: help-gnu-emacs@gnu.org
> Subject: some vi equivalents please?
> 
> 1. In vi I can delete a line that contains a <pat> with
> :g/<pat>/d
> 
> How is this done in emacs?
> 
> 2. match-variables:
> If I want to remove everything after the second : (in a file that has
> 3 fields separated with two :'s)
> I do
> :s/\(.*\):\(.*\):.*/\1 \2
> How do I do that in emacs?
> 
> Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]