Wednesday, February 2, 2011

Re: value of a variable within a expression

Hi Jonas!

On Mi, 02 Feb 2011, Jonas Geiregat wrote:

> Hello,
>
> You have to excuse me if this is a silly question. But as you might
> have guessed I'm new to vim.
>
> I've defined a variable s:nfile and want to use it in the following
> expression.
>
> !stylus < '%:p' > s:nfile
>
> This doesn't work and really runs !stylus <
> whatever_is_the_current_file > s:nfile.
>
> I've tried everything from echo s:nfile to let s:nfile within the
> expression.
>
> Thanks in advance,

This is becoming a faq and there is also an entryน on the faq, that
covers this question:
http://vimhelp.appspot.com/vim_faq.txt.html#faq-25.14

น)Well, the question only barely mentions your specific problem, but the
general problem on how to evaluate a vim variable with an :ex command is
still covered. Anybody wants to improve the text?

regards,
Christian

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

No comments: