how can I check which version of vim I have installed?

I'm running Mac OS X Snow Leopard. How can I check which version of vim I have installed?

Ideally I'd like to know a general solution for checking software versions via the command line.


Solution 1:

The command:

vim --version

This is pretty standard for all unix executables.

Solution 2:

or, just if you run vim already and want to know what you are in right now:

:version

Solution 3:

In a terminal run vim --version ther version number is in the top line of output.