I'm aware that I can use / followed by a regex to search something. And I can use ? to search backwards. And I can use n and N to repeat the search forward and backward.
There are also two nice shortcuts: * or # will search for the word under the cursor (forward/backward). That's very useful! (there are also g* and g# variants)
But... Once I've selected text using visual mode (v), how can I ask Vim to search for exactly that text? A quick look at :help did not... huh... help me.
*and#! Would be nice if your question would also explain whatg*andg#would do ;) – winklerrr Oct 25 '18 at 15:28gcharacter means that you want to search for the same word on any other tab that you have opened in the same VIM session/window. – alexventuraio Jul 20 '21 at 17:02g*/g#means that a match doesn't have to be a whole word (less strict), whereas*/#only matches the whole word (more strict). docs For example, usingg*when the cursor is on the wordtestwill result in the command/testwhich would match the first four letters in the wordtesting. Using*will result in the command/\<test\>, notice the added angle brackets, which means it must match the whole wordtesttherefore it will not matchtestinglikeg*would. – RcoderNY May 31 '23 at 10:42