If you press * , Vim will search for all occurrences of the word under the cursor.
If you have search highlight turned on, they will be highlighted.
You can turn on search highlighting by placing it in your .vimrc :
set hlsearch
One nice plus is that you no longer have to choose a word ... you just press the * key.
(you can match it with another key to make it even more convenient)
If you don't like the way the cursor moves when you press * , you can prevent it with a simple match:
nnoremap * *N
(put it in your .vimrc)
This holds the cursor in the current position when you press * .
source share