For example when I select a word I want the same words to be automatically highlighted just like it in Notepad++:

When I select the word "install" in Notepad++ (all other "install" are highlighted"):

enter image description here

I'm using spacemacs. I tried the package auto-highlight-symbol and also the package highlight-symbol. Set mode to 1 in .spacemacs. But when I select a word no other same words highlighted:

  • auto-highlight-symbol work for me, but I'm not sure about spacemacs. Is the face (color) too close to background?
    – xuhdev
    Nov 14, 2016 at 10:19
  • 3
    Please clarify what you mean when you say "syntaxes": do you mean particular words or symbols? Please also clarify what you mean by "none of them are working." Edit you post to explain what, exactly, you did, what you expected, and what happened instead.
    – Dan
    Nov 15, 2016 at 18:42

3 Answers 3


Use package highlight-symbol.

(use-package highlight-symbol
  :ensure t
  (add-hook 'prog-mode-hook 'highlight-symbol-mode))

There are multiple packages that do this:

They all perform the basics well enough.

Although idle-highlight was the only package that worked well on large buffers.


You don't need to use any external package. Take a look at the functions isearch-forward-symbol-at-point and isearch-forward-symbol.

To find out if they're bound to a key on Spacemacs, evaluate (where-is 'isearch-forward-symbol).

  • Can this be done without moving the cursor?
    – ideasman42
    Sep 16, 2021 at 14:23
  • @ideasman42 yes.
    – aadcg
    Sep 16, 2021 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.