On 26/02/09 14:55, Ingo Karkat wrote:
[...]
> I respect your opinion, but I think the policy that Tony has outlined is worth
> considering, as it simplifies the source code and eases maintenance and 
> testing
> (if that is done at all for older versions ;-). Being an avid vimscript writer
> myself, I know how difficult it is to balance backwards compatibility (up to 
> VIM
> 7.0? or even 6.4 or 6.0?) with use of the latest features. We're all 
> interested
> in a stable runtime, and that is best achieved with a simple and 
> straightforward
> implementation.
>
> -- regards, ingo
>

I am _not_ advocating support of only the latest version in scripts not 
distributed together with Vim. If you write plugins for public use, I 
recommend that you make them as portable as you can, be it for platforms 
other than yours, for smaller featuresets than what you're usually 
running, and for earlier versions of Vim. There are several tools to do 
that, namely has() for OSes and featuresets, exists() for individual 
commands, functions and options, v:version (or, more portable, just 
version) for major and minor version, has() (again) for patchlevel 
within a given minor version, and, not to be forgotten, ":if 1" actually 
tests for +eval.

The helpfiles version4.txt to version7.txt will help you find out at 
which point a given feature or capability (not necessarily covered by 
has() and exists() ) was introduced.

I'm attaching a small plugin which I wrote some time ago to try to make 
the "Vim splash screen" appear even in some circumstances where 
plain-vanilla Vim doesn't display it: you'll notice to what lengths I 
went to avoid errors in any (even far obsolete) versions where you might 
try to use it. If you want to run it, I recommend that you drop it into 
~/.vim/after/plugin (Unix) or ~/vimfiles/after/plugin (Windows) so that 
it can run after all other global plugins. (Its name begins with zz so 
that, in Linux at least, it will be listed last in its directory.)


Best regards,
Tony.
-- 
What good is having someone who can walk on water if you don't follow
in his footsteps?

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

Attachment: zzsplash.vim
Description: application/octetstream

Raspunde prin e-mail lui