From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Emacs equivalent of the ":g" command in vi Date: Fri, 22 Jul 2011 11:27:57 +0200 Message-ID: <14F21CEC-7265-4DE4-888A-A10FCFFF6826@Web.DE> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1311326924 21873 80.91.229.12 (22 Jul 2011 09:28:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2011 09:28:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: C K Kashyap Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 11:28:38 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QkC2A-0000rV-Ef for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 11:28:38 +0200 Original-Received: from localhost ([::1]:34493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkC29-0004Ri-Uq for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 05:28:37 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkC26-0004Ql-4O for help-gnu-emacs@gnu.org; Fri, 22 Jul 2011 05:28:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkC25-0001af-5j for help-gnu-emacs@gnu.org; Fri, 22 Jul 2011 05:28:34 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]:56551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkC24-0001aF-TE for help-gnu-emacs@gnu.org; Fri, 22 Jul 2011 05:28:33 -0400 Original-Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate02.web.de (Postfix) with ESMTP id 270D01A6F7964; Fri, 22 Jul 2011 11:27:58 +0200 (CEST) Original-Received: from [88.153.242.186] (helo=peter-dyballas-macbook-pro.fritz.box) by smtp01.web.de with asmtp (WEB.DE 4.110 #2) id 1QkC1W-0005j2-00; Fri, 22 Jul 2011 11:27:58 +0200 In-Reply-To: X-Mailer: Apple Mail (2.1084) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX198/arX0DCLBFV+6Rosy9HfIhhkApYW2ZKHODQC 0WNx1PBHE5unONmSD/DFXFk04dBsfubT2zFqKTtDiwmmEusBLc mGE9GW2fRXy2eK3nBvog== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81723 Archived-At: Am 22.07.2011 um 10:42 schrieb C K Kashyap: > I need to perform a certain action (such as delete the line) on each = line of > a buffer if the line matches a regular expression. In vim, we can use = the :g > command for this. I don't know that :g in vim that exactly, I prefer to use ``.=B4=B4 from = time to time. GNU Emacs allows to use three commands: repeat repeat-complex-command repeat-matching-complex-command See which one can be used! (Deleting a single line is simple: C-k, = deleting a bunch of lines is also quite simple: C-u C-k =96 = which could be as simple as in vi/vim.) -- Greetings Pete There's no place like ~ =96 (UNIX Guru)