unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Automatically highlighting the symbol under point
@ 2015-08-21 20:10 Colin Yates
  2015-08-21 20:26 ` John Mastro
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Yates @ 2015-08-21 20:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hi (newbie warning!),

I am using prelude and if my point is over a symbol then I can call
'highlight-symbol-under-point' which works great. However, I can't
figure out how to turn it off.

Ideally, I would like it to automatically highlight the symbol under
point all the time, or at least when in a programming mode - is that
possible and any prior art you can point me at?

Thanks!

Sent with my mu4e



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

* Re: Automatically highlighting the symbol under point
  2015-08-21 20:10 Automatically highlighting the symbol under point Colin Yates
@ 2015-08-21 20:26 ` John Mastro
  2015-08-21 20:31   ` John Mastro
  2015-08-22  5:36   ` Tassilo Horn
  0 siblings, 2 replies; 5+ messages in thread
From: John Mastro @ 2015-08-21 20:26 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: Colin Yates

> I am using prelude and if my point is over a symbol then I can call
> 'highlight-symbol-under-point' which works great. However, I can't
> figure out how to turn it off.

You can use `unhighlight-regexp' (on `C-x w r' and/or `M-s h u') for
this. It prompts for a regexp, but for your scenario you can just hit
`RET' to accept the default.

> Ideally, I would like it to automatically highlight the symbol under
> point all the time, or at least when in a programming mode - is that
> possible and any prior art you can point me at?

Check out `idle-highlight-mode' (available in MELPA) for that:
https://github.com/nonsequitur/idle-highlight-mode

-- 
john



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

* Re: Automatically highlighting the symbol under point
  2015-08-21 20:26 ` John Mastro
@ 2015-08-21 20:31   ` John Mastro
  2015-08-21 20:34     ` Colin Yates
  2015-08-22  5:36   ` Tassilo Horn
  1 sibling, 1 reply; 5+ messages in thread
From: John Mastro @ 2015-08-21 20:31 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

>> Ideally, I would like it to automatically highlight the symbol under
>> point all the time, or at least when in a programming mode - is that
>> possible and any prior art you can point me at?
>
> Check out `idle-highlight-mode' (available in MELPA) for that:
> https://github.com/nonsequitur/idle-highlight-mode

After you install it, you can active it in programming modes with
something like this:

    (defun my-programming-config ()
      (idle-highlight-mode 1))

    (add-hook 'prog-mode-hook #'my-programming-config)

-- 
john



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

* Re: Automatically highlighting the symbol under point
  2015-08-21 20:31   ` John Mastro
@ 2015-08-21 20:34     ` Colin Yates
  0 siblings, 0 replies; 5+ messages in thread
From: Colin Yates @ 2015-08-21 20:34 UTC (permalink / raw)
  To: John Mastro; +Cc: help-gnu-emacs

Thanks John.
On 21 Aug 2015 21:32, "John Mastro" <john.b.mastro@gmail.com> wrote:

> >> Ideally, I would like it to automatically highlight the symbol under
> >> point all the time, or at least when in a programming mode - is that
> >> possible and any prior art you can point me at?
> >
> > Check out `idle-highlight-mode' (available in MELPA) for that:
> > https://github.com/nonsequitur/idle-highlight-mode
>
> After you install it, you can active it in programming modes with
> something like this:
>
>     (defun my-programming-config ()
>       (idle-highlight-mode 1))
>
>     (add-hook 'prog-mode-hook #'my-programming-config)
>
> --
> john
>
>


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

* Re: Automatically highlighting the symbol under point
  2015-08-21 20:26 ` John Mastro
  2015-08-21 20:31   ` John Mastro
@ 2015-08-22  5:36   ` Tassilo Horn
  1 sibling, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2015-08-22  5:36 UTC (permalink / raw)
  To: John Mastro; +Cc: Colin Yates, help-gnu-emacs@gnu.org

John Mastro <john.b.mastro@gmail.com> writes:

>> I am using prelude and if my point is over a symbol then I can call
>> 'highlight-symbol-under-point' which works great. However, I can't
>> figure out how to turn it off.
>
> You can use `unhighlight-regexp' (on `C-x w r' and/or `M-s h u') for
> this. It prompts for a regexp, but for your scenario you can just hit
> `RET' to accept the default.
>
>> Ideally, I would like it to automatically highlight the symbol under
>> point all the time, or at least when in a programming mode - is that
>> possible and any prior art you can point me at?
>
> Check out `idle-highlight-mode' (available in MELPA) for that:
> https://github.com/nonsequitur/idle-highlight-mode

Or alternatively, highlight-symbol-mode from

  https://github.com/nschum/highlight-symbol.el

Bye,
Tassilo



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

end of thread, other threads:[~2015-08-22  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21 20:10 Automatically highlighting the symbol under point Colin Yates
2015-08-21 20:26 ` John Mastro
2015-08-21 20:31   ` John Mastro
2015-08-21 20:34     ` Colin Yates
2015-08-22  5:36   ` Tassilo Horn

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).