enter image description here

While I was working on the terminal (mac os) I pressed wrong combo then the 'def' word highlightend. I found it is very useful.

How to turn on and turn off highlight on a word? (shortcut key, no command or script please)

1 Answer 1


You probably hit * or #, which searches for the word currently below the cursor and moves the cursor to the the next/previous match.

This also highlights all matches when hlsearch is set.

Turn off highlighting:


See here: Highlight all occurrence of a selected word?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .