Functionality built-in to emacs:
With point on the word in question, type
M-s h .
to highlight all occurrences. Note that this matches the entire word, not substrings. Repeat this multiple times, each is assigned a unique color.
M-s h u
allows you to select which word to un-highlight. There are a few other highlighting commands, type M-s h C-h
for a list.
For what it's worth, here is how I search for occurrences of a word.
For a quick overview, use swiper. It's quick and very good at giving you a overview of the word across the entire document, but is transient: once you use it to traverse to another occurrence, you have to engage swiper again to traverse elsewhere.
I-search. Still the most flexible search tool, and built-in to boot. Can easily search for substrings. Once you've found another occurrence, is quicker than swiper to find next (or prior) occurrence. You're still only seeing matches that currently fit on the screen, however. Has plenty of time-saving commands, which I only found out after years of using it, when I bothered to read the manual.
occur-mode. Pretty awesome, and built-in: M-s o
. Provides a persistent record of all matches for any regexp. May be the best option if you want to see and traverse through a list of all occurrences in a buffer. Easy to go back M-g p
and forward M-g n
, or jump to another occurrence.
Honorable mention goes to iedit. I don't use it often, but always enjoy it when I do. Hit the shortcut, and all matching occurrences are highlighted. Here's the bonus: start typing, and all occurrences are changed, not just the one where the cursor is. That's its basic idea. There are some fancy options, but I've not found the readme very clear about those.
I'll also mention idle-highlight. I've not used it, but it does advertise as doing what you describe. (Highlights other occurrences when cursor has been idle for a time.) Though I don't know if it handles substrings.