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

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

Re: Searching a word that is defined by the position of the cursor ?


From: kgold
Subject: Re: Searching a word that is defined by the position of the cursor ?
Date: 4 Nov 2003 22:25:21 GMT

Hackl Heinz <address@hidden> 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.

-- 


reply via email to

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