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

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

Re: How to produce the effect of * and # of VIM in Emacs?


From: Emre Sevinc
Subject: Re: How to produce the effect of * and # of VIM in Emacs?
Date: Wed, 27 Jul 2005 20:29:37 +0300
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Micha Feigin <michf@post.tau.ac.il> writes:

> On Wed, 27 Jul 2005 17:09:19 +0100
> Marc Tfardy <m-t-o___CUT_IT___@web.de> 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


reply via email to

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