Tuesday, January 26, 2010

Re: How to get vim patch version number in vim script?

John Little 写道:
> if !has("visual")
> echo "Tiny"
> elseif !has("eval")
> echo "Small"
> elseif !has("arabic")
> echo "Normal"
> elseif !has("profile")
> echo "Big"
> else
> echo "Huge"
> endif
>
> To me, the above clearly shows the clunkiness of the approach, I only
> did it for fun.
>
> Regards, John

This has one problem:

if there's no 'eval' then 'if' statement will always be false, and Tiny
Small version will never be print.

Then how to tell from Tiny and Small?

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

No comments:

Post a Comment