Although all the answers here are correct, I thought it might be helpful to provide a little more information.
What * does really * is to do a direct search for \<word-under-the-cursor\> . Since this is just a search operation, you can move back and forth to the next occurrences using n and n . It also means that your previous search is lost. # exactly matches * , except that it does reverse lookups.
\< and \> in the search bar are the word boundaries in the regex vim language, which makes the job so enjoyable. It is also important to note that what is considered a โwordโ is determined by the iskeyword option. See :help word details.
Randy morris
source share