Tuesday, January 26, 2010

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

> It seems easy to know we're running in vim 7.2, but is it possible for a
> vim script to know what exactly the patch version is? like 7.2.344.

See :h v:version

> Also, it is possible to know what vim is compiled with? like Normal
> version, Big version, Tiny version...

Well, you could redirect the output of :version and look at the fourth
line, but it would be much cleaner to check for the capability you're
interested in directly using the has() function, rather than relying
on what you think might be in the various versions. Hmm, I suppose
you could invert the list given at :h +feature-list and choose a set
of has() tests that would tell you, along the lines of

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

No comments:

Post a Comment