Search for visually selected text in Vim

I wrote a Vim script to do visual searches.  Directly from the Vim Todo list:

For Visual mode: Command to do a search for the string in the marked area.  Only when less than two lines. Use “g/” and “g?”.

In other words, a way to search for visually selected text !!  It’s available here. With tip 171, you can select some text, then press a key to search for the next occurrence of the text.

Leave a Reply