unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Searching a word that is defined by the position of the cursor ?
@ 2003-11-04 15:21 Hackl Heinz
  0 siblings, 0 replies; 4+ messages in thread
From: Hackl Heinz @ 2003-11-04 15:21 UTC (permalink / raw)


I would like to switch from gvim to xemacs and I'm missing the following
feature:
In gvim CTRL-*  highlights that word (and all identical words in the file)
that has the cursor (in any position) on it.
Is there a possibility to configure emacs to realize this function ?
thanks and best regards
 

DI Heinz-Werner Hackl 
Senior Design Engineer SLI Design 
___________________________________________                    
austriamicrosystems AG 
accento! Business Unit Communications 
Schloss Premstaetten, A-8141 Unterpremstaetten 
Tel.: ++43 (0)3136 500 5314 , Fax: ++43 (0)3136 500 5491 
heinz.hackl@austriamicrosystems.com 
http://www.austriamicrosystems.com <http://www.austriamicrosystems.com/>  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching a word that is defined by the position of the cursor ?
       [not found] <mailman.3127.1067959363.21628.help-gnu-emacs@gnu.org>
@ 2003-11-04 18:31 ` Kevin Rodgers
  2003-11-04 22:25 ` kgold
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2003-11-04 18:31 UTC (permalink / raw)


Hackl Heinz wrote:

> I would like to switch from gvim to xemacs and I'm missing the following
> feature:
> In gvim CTRL-*  highlights that word (and all identical words in the file)
> that has the cursor (in any position) on it.
> Is there a possibility to configure emacs to realize this function ?


;; You might want to run M-b first, then:

C-s C-w


-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching a word that is defined by the position of the cursor ?
       [not found] <mailman.3127.1067959363.21628.help-gnu-emacs@gnu.org>
  2003-11-04 18:31 ` Searching a word that is defined by the position of the cursor ? Kevin Rodgers
@ 2003-11-04 22:25 ` kgold
  2003-11-04 22:53   ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: kgold @ 2003-11-04 22:25 UTC (permalink / raw)


Hackl Heinz <Heinz.Hackl@austriamicrosystems.com> writes:
> I would like to switch from gvim to xemacs and I'm missing the following
> feature:
> In gvim CTRL-*  highlights that word (and all identical words in the file)
> that has the cursor (in any position) on it.
> Is there a possibility to configure emacs to realize this function ?
> thanks and best regards

There are two parts:

To search for the word under the cursor: C-s C-w

To highlight all matches, look at ishl.el.  For example:  

(require 'ishl)
(ishl-mode t)
(setq-default ishl-cleanup nil)

To change the color of all occurrences after the first:

(set-face-foreground 'secondary-selection    "antiquewhite1")
(set-face-background 'secondary-selection    "Mediumblue")

Bonus:

Play with M-x occur and M-x igrep when you have time.

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Searching a word that is defined by the position of the cursor ?
  2003-11-04 22:25 ` kgold
@ 2003-11-04 22:53   ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2003-11-04 22:53 UTC (permalink / raw)


> To highlight all matches, look at ishl.el.  For example:  

The ishl.el functionality is included in Emacs-21.
Just do (setq isearch-lazy-highlight t).


        Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-04 22:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3127.1067959363.21628.help-gnu-emacs@gnu.org>
2003-11-04 18:31 ` Searching a word that is defined by the position of the cursor ? Kevin Rodgers
2003-11-04 22:25 ` kgold
2003-11-04 22:53   ` Stefan Monnier
2003-11-04 15:21 Hackl Heinz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).