Ben Schmidt schrieb:
> Hi, Chip and other script developers,
> 
> I have an old Vim 6 lying around I use in 'emergencies' and discovered that 
> it 
> chokes on the hilinks plugin and others. The problem seems to be the :for 
> command. 
> Vim 6, it seems, is unable to even skip over it when it's in an if 
> version>=700 or 
> such conditional, but throws up errors such as 'return not in function' or 
> 'endif 
> without if'. Perhaps it sees the :endfor as ending some other block since it 
> doesn't know about :for. Why it would do this, I don't know, but it seems to 
> do 
> something like that.
> 
> I don't know if there's a workaround, i.e. a way you can rewrite the plugin 
> to 
> still work on Vim 6 minus a few features. It would be nice if there were. But 
> in 
> lieu of that, I think scripts that use :for will need to :finish prematurely 
> for 
> Vim < 7, as simply putting the :for in a conditional on the version doesn't 
> work.
> 
> Ben.

" This works with Vim 6.4, but not with Vim 7.1:

func! Foo()
    echo "endfor is endfunction"
endfor

call Foo()

" no error (with Vim6) if :endfor occurs outside a function.

-- 
Andy


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

Raspunde prin e-mail lui