* Suresh Govindachar on Saturday, May 06, 2006 at 15:06:27 -0700:
>   > Christian Ebert wrote:
>   > I wanted to use the exists clause to fork a script 
>   > according to the current vim version, and this works 
>   > in other cases.
> 
>   Bram explained the issue with endfor.  I am curious as 
>   to why you don't fork -- based not on test for existence 
>   of :for but -- based on test for version directly?

Good question.

Because I am to lazy to look up which new feature belongs to
which version? ;-)

Perhaps I wasn't clear, and the subject is a bit misleading.

I tested with v:version first, and when I got an error I tried to
narrow down the issue and then found out that even checking
exists(":for") or exists(":endfor") does /not/ give an error.
Only the loop itself breaks the script.  

I couldn't make head or tail out of the fact that the fork based
on the very command itself did work (as I could see the vim7
stuff working) but that I still got a parsing error with vim6.

But, on a more general level, what is the recommended way to do
such forks? Is forking by v:version faster? Better style? -- I
thought to make a very specific fork isn't that bad an idea.

c
-- 
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>

Reply via email to