From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: vim equivalent in emacs %5,50s/serah_term/replace_term/gc Date: Fri, 23 Nov 2007 04:43:52 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87y7cpwujb.fsf@kobe.laptop> References: <13640969.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195832507 16134 80.91.229.12 (23 Nov 2007 15:41:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2007 15:41:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 23 16:41:53 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ivaf8-00027A-TK for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Nov 2007 16:41:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ivaeu-0004NA-Pc for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Nov 2007 10:41:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!news.buerger.net!nuzba.szn.dk!news.szn.dk!pnx.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (berkeley-unix) Cancel-Lock: sha1:OpvZoEAdufWzXNUbeIYN3zYB1ds= Original-Lines: 34 Original-NNTP-Posting-Host: 62.1.205.36 Original-X-Trace: news.sunsite.dk DXC=Rh2id1]GU_01@QH[VaTAe9YSB=nbEKnk; l2^feVC_<66L^Mj7l4=h[MC00X>ak3M:VL0D49ZJlA4TP3H43 Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:154013 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49444 Archived-At: On Fri, 23 Nov 2007 02:33:24 +0000 (UTC), dkcombs@panix.com (David Combs) wrote: >In article , >Peter Dyballa wrote: >> >>Am 08.11.2007 um 05:01 schrieb iluvindo: >> >>> Hi I recently moved from vim to emacs and need help to search and >>> replace >>> using line numbers(say between two lines 5 and 50). This can be >>> done in vim >>> as %5,50s/serah_term/replace_term/gc >>> What is equivalent in emacs? >> >>Activate 'active region highlighting' from Options menu, mark the >>region either by dragging with the mouse cursor or with the keyboard >>(M-g g 5 RET C-SPC M-g g 50 RET), and then substitute: > > M-g? So I did C-h k on M-g, and in a mini-or-whatever buffer at > screen bottom, a line saying "set-face: default m-g d, ......". > > My question: how to grab that doc-line? M-g is a `command prefix'. You can see the help of `M-g g' by typing `C-h k M-g g'. This opens a new buffer/window, and you can switch to that window using `C-x o' (one more more times, if necessary), to copy text, move around, etc. If you are using a GUI version of Emacs, point with your favorite pointing device and click somewhere in the help buffer. It will become the active buffer, and you can copy text, move around, and so on... HTH, Giorgos