Suppose I have selected a word in visual mode. Now I want to search that word in the document.
How can I do that?
Thanks in advance.
If it's just a single word, you don't even have to select it. Just place the cursor on the word and press * (or # to search backwards). Note that this search will only match the whole word. To allow a search for foo to match foobar, use g* or g#.
foo
foobar