On Mon, 22 May 2006 at 5:45pm, James Vega wrote:

> On Mon, May 22, 2006 at 02:11:49PM -0700, Hari Krishna Dara wrote:
> >
> > In a Vim7 session, after working for sometime, I started getting a weird
> > error, when one of my plugins did the below:
> >
> > :put=""
>
> This is the same as using:
>
>   :put =
>
> Double quotes are Vim's comment character so you either need to use
> single quotes or escape the double quotes.

Interesting... since it takes an expression, I never doubted whether
double-quotes will work. I should go back and check if I used double
quotes in any of my other plugins too... hopefully not.

>
> > and the error was:
> >
> > E121: Undefined variable: retVal
> > E15: Invalid expression: retVal
>
> As noted in the help for :put, if nothing is specified after '=' then
> the previous expression is used.  In this case, it appears that
> contained a variable that was no longer in scope.
>
> James
>

Perfect, that explains what was happening.

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to