atom-vim-mode-plus
atom-vim-mode-plus copied to clipboard
Yanking into / register should set the search pattern
In vim:
|word some word
Typing "/yiwn would put the cursor on the second word.
I understand your intention, but " / y i w" really save yanked inner-word to/` register?
I tried, but couldn't.
I could successfully put it when I did let @/ = "word" from the command(:) mode.
What version of vim, what OS are you using?
My bad, it indeed doesn't work in vim. I have a mapping that looks like this:
map <Plug>(yank-plaintext) :<C-u>call setreg(v:register, searchPattern#EscapeText(visual#GetText()))<CR>
nmap z* viw"/<Plug>(yank-plaintext)
So it's actually using command mode as well.
But can we implement it in VMP anyway?