> > for a variable, I believe VIM::command("let foobar = 'value'")
> > is the right way to do it.
>
> Thanks for confirming that. I think I will stick with this
> solution.

You might want to escape certain characters as you did it in your
initial proposal though.

:ruby a = %{1"foo'bar'\n"2}; VIM::command(%Q{let g:foo = '#{a.gsub
("'", "''")}'})
:echo a

Works fine, but

:ruby a = %{1"foo'bar'\n"2}; VIM::command(%Q{let g:foo = '#{a}'})

Throws an "Invalid expression" error.

BTW there is a vimRubyX plugin that extends the VIM module. I don't
use it myself but the code (6kb) might give you some ideas.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to