Tuesday, May 24, 2016

Re: Use Register as Search Pattern in Ex Mode silent

Am Freitag, 20. Mai 2016 10:30:30 UTC+2 schrieb Marcel Jödicke:
> Hello Community,
>
> I'd like to ask if there is somehow a way to use the Content I saved wit +%y+ before to the Clipboard in EX mode as Search Pattern for the File. I tried it with a ".. combination, but it doesn't work because powershell is complaining for a second " to close the string. I also tried it like \=@@ which works fine as replace pattern, but not for searches. I tried to set it to Register a with @a=@@ And I tried to paste it with <C-r>a , but it doesn't work, because commands like <C-r> are not working in written state. Do you have a solution for that problem. I also would be fine If there is a way to read out the seach pattern from a File somehow with :r.
>
> Thank you very much in advance!
>
> Marcel

Hello Ben,

yet again thanks for the explanations.
In my case I opened a File like:
vim c:\ip.txt -e -s +let @/=getline('.')

and vim had problem somehow to use let in that context. I now made just a litte java program for that purpose. But anyway, thank you very much for your help and effort!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: