Is it possible to get the version number for an installed plugin from within Vim?
3 Answers
in general: no. there is no concept of plugin-version
in vim. if the plugin itself provides some variable, you might :echo
that one.
Is it possible to get the version number for an installed plugin from within Vim?
Yes, as long as the plugin installs from github.
One example... let's find the version of the vim
Plugin called ale
...
- First,
cd
into your plugin's git root directory... in my case, it'scd /home/mpenning/.vim/bundle/ale
. git log | grep commit | head -n1
. This returns:commit 607f33a1b0f662d9809d54363e8e81a4965862ce
- Now I go to the github list of
ale
commits. Remember to account for the fact that github shows a short hash andgit log
gives you a long hash.
The hash matched git HEAD
... based on the git tag
list, the most recent version of ale
is version 3.2.0.
So I'm running ale
git HEAD... just north of ale
version 3.2.0
Some plugins lists the version in the help files. E.g. with Nvim-R
, you can see the version using :help nvim-r
.