On 13/04/09 05:42, [email protected] wrote:
>
> I was browsing the python.vim index file and I noticed this line in
> the implementation of GetPythonIndent:
>    let plnum = prevnonblank(v:lnum - 1) .
>
> I have noticed the used of v:lnum in a few other indent files also.
>
> I am curious,  why is v:lnum is being used instead of a:lnum?

a:lnum would be an argument to a function. AFAIK, unlike a:firstline and 
a:lastline there's no predefined variable with that name so you would 
have to include it among the named arguments of the function.

v:lnum is defined when evaluating five particular expressions, and is 
only valid there. These expressions may be functions, but they need not 
-- each of them can be any arithmetic expression whose type agrees with 
what they are meant for, see ":help v:lnum". If they aren't functions, 
then the a: namespace is invalid with them. The v: namespace, OTOH, 
refers to names predefined by Vim and either used in certain contexts 
(like v:lnum) or global to Vim (like v:version).


Best regards,
Tony.
-- 
There once was a girl named Irene
Who lived on distilled kerosene
        But she started absorbin'
        A new hydrocarbon
And since then has never benzene.

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

Reply via email to