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 23:52:07 +0300
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

kgold@watson.ibm.com (kgold) writes:

> Emre Sevinc <emres@bilgi.edu.tr> writes:
>> >
>> > 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 need one more C-s.  C-w says search for the word, and the second
> C-s says to get the next match.

Unfortunately that did not create the effect I'm searching
for. As you suggested C-x ( M-b C-s C-w C-s ) and then C-x e
but it didn't do what I described.

Alternatively I tried these in *scratch*:

(global-set-key (kbd "C-*") "\M-b\C-s\C-s\C-w")

(global-set-key (kbd "C-*") "\M-b\C-s\C-w\C-s")

which didn't work, too.

I don't know what I doing wrong if I can't handle
it with simple keyboard macro way then I'll have 
to use the elisp functions from the suggested packages
(even though I think they are a little bit overkill
for just the single thing I want (besides that, they 
are nice and providing functionality I liked)).


-- 
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]