Tuesday, May 24, 2016

Re: Use Register as Search Pattern in Ex Mode silent

On Tuesday, May 24, 2016 at 3:30:26 PM UTC-5, Marcel Jödicke wrote:
> vim c:\ip.txt -e -s +let @/=getline('.')
>
> and vim had problem somehow to use let in that context.

The problem is the space in the command. The shell doesn't understand that's a single argument to pass to Vim. Just use quotes:

vim c:\ip.txt -e -s +"let @/=getline('.')"

Or, the -c flag if you prefer:

vim c:\ip.txt -e -s -c "let @/=getline('.')"

--
--
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: