How do I search for the selected (with v and y) string? I usually search with /, but I cannot paste the selected string after /.
Tip: You can also use the keyboard shortcuts Ctrl + f (Windows, Linux, and ChromeOS) or + f (Mac) to find a word or phrase quickly. You can find more info about a specific word or phrase on a page. Highlight a word or phrase. On a PC: Right-click the highlighted content.
Hold the Ctrl keyboard key and press the F keyboard key (Ctrl+F) or right-click (click the right mouse button) somewhere on the article and select Find (in this article).
To select a single word, quickly double-click that word. To select a line of text, place your cursor at the start of the line, and press Shift + down arrow. To select a paragraph, place your cursor at the start of the paragraph, and press Ctrl + Shift + down arrow.
In insert mode you can use CTRL-R to insert the contents of Vim registers. By default, copied text gets put in the unnamed register ", so to insert that text you would type <C-R>" in insert mode. The search prompt uses Command-line mode which has its own
CTRL-R that works almost identically to the one in Insert mode.
So if I just yanked the text foo, typing /<C-R>" would search for the text foo once I press enter.
:set hls
:vmap * y:let @/ = @"<CR>
set hls (hight light search)v => hjkl (select something)*, copy selected text to reg "
/ as "
n/N to navigateIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With