Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magit version available in Vim #69

Closed
dfishburn opened this issue Feb 11, 2016 · 1 comment
Closed

Magit version available in Vim #69

dfishburn opened this issue Feb 11, 2016 · 1 comment

Comments

@dfishburn
Copy link

I don't really see a way to get the version of the plugin that is loaded from within Vim.

The reason I ask, is I am testing over some of the master branch, so I have multiple directories of Magit.

Never really certain which one Vim loaded.

What I like to do in my plugins is take the standard loaded variable:

let g:loaded_magit = 1

Use the release #:

let g:loaded_magit = 160

That way from within Vim I can do:
``
:echo g:loaded_magit

It also helps when I am working with a user, trying to determine which version of my plugin is loaded.

For master you can have:

let g:loaded_magit = master


Of course, that is just one way, if there is some "Github" thing, where you could include the commit id somehow when the the user downloads, or something.

@jreybert
Copy link
Owner

Do you know if there are any vim plugin doing some versioning?

As long as the proper way to release vim plugin was to package them (in .vba for example), I can see some hack to propose a versioning.

But now, the proper way is to git clone a project, and an installation step is not mandatory at all.

The only way I can see would be to perform some operation on travis for example, performing some ugly sed in some file while the integration of a release branch succeed and commit it. And it would not cover your need, as it would be done only for release integration (I do not want to commit a "versionning patch" each time I push).

Versionning is good! But if it is not automatic, it won't work. If you have any lead about vim plugin versioning, I would be happy to read them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants