From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emre Sevinc Newsgroups: gmane.emacs.help Subject: Re: How to produce the effect of * and # of VIM in Emacs? Date: Wed, 27 Jul 2005 20:29:37 +0300 Organization: Istanbul Bilgi University Message-ID: <873bq0cg3i.fsf@ileriseviye.org> References: <87ack8uxj0.fsf@ileriseviye.org> <3kpmgfFvjmpuU1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122485658 11061 80.91.229.2 (27 Jul 2005 17:34:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2005 17:34:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 19:34:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dxpm0-0004Ka-O7 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2005 19:32:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxpoP-0003du-Gp for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2005 13:35:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-X-Trace: individual.net ljM89FyY9+axTFx0JDougQcsCkcHsrWgX4iTlKz2ALaH1ioePf User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:nmmW6+0sBPBu00T3hL5FxZy6pOc= Original-Xref: shelby.stanford.edu gnu.emacs.help:132702 Original-To: help-gnu-emacs@gnu.org 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:28225 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28225 Micha Feigin writes: > On Wed, 27 Jul 2005 17:09:19 +0100 > Marc Tfardy wrote: > >> Emre Sevinc schrieb: >> > Hello, >> > >> > What I'm trying to learn is how to produce the effect >> > of * and # of VIM in Emacs. >> > >> > I know I can make something like that: >> > >> > M-b C-s C-w >> > >> > I'd like to learn how can I make it with a single keystroke >> > (key combination) or write some elisp function that >> > does so. >> > >> > Any suggestions? >> >> One stupid question - what do * and # in VIM? >> > > Search forward and backward for the word under the cursor > > You can make a macro from this sequence and bind it to a key I tried that by pressing C-x ( and then pressing M-b C-s C-w and then C-x ) and Emacs said that a macro is defined, then I came to the middle of the word pressed C-x e to execute the macro but the cursor just stayed there, nothing happened. Any ideas why that doesn't work? Is it related to I-search's being interactive and interfering with the macro creation process? > You may also want to have a look at the highlight-regexp package at > http://www.geekware.de/software/emacs/ Very nice package! It does %99 of what I have described in my original post. One question: I have tried the functions in that package and it does the highlighting but once all the occurences of word are highlighted how can I jump to them as: next occurence, next occurence, ..., ? -- Emre Sevinc eMBA Software Developer Actively engaged in: http:www.bilgi.edu.tr http://ileriseviye.org http://www.bilgi.edu.tr http://fazlamesai.net Cognitive Science Student http://cazci.com http://www.cogsci.boun.edu.tr