Vim-plug: The ability to get scripts from vim.org

Created on 2 Apr 2015  路  5Comments  路  Source: junegunn/vim-plug

The direct download doesn't work with the http://www.vim.org/scripts/script.php?script_id=4021 format. (restore_view.vim) not sure if this is a limitation of vim-plug, or if it's just because it is a flat file. If there is a way, could you post an example on the README ?

Very nice so far. Floobits and vim-man were trivial, though floobits could use some post install magic. That would be them, not you, unless you feel super motivated to add default cruft to your code for other projects, possibly convince them to add a way to check if installed by plug instead of vundle and have them add it?

question

All 5 comments

Aren't all script from vim.org automatically uploaded to

https://github.com/vim-scripts/$plugin_name_here

??

@vheon Not quite. The mirror is run by Vundle's scraper, that can be seen at https://github.com/vim-scraper/vim-scraper . I don't know how often it gets run, I think it is manually executed on a server when somebody with credentials to vim-scripts launches it. GMarik the guy who ran Vundle has been somewhat inactive.

@ryanmorillo As vheon pointed out, almost all vim.org scripts can be found mirrored under https://github.com/vim-scripts repository. Plug automatically prepends the vim-scripts/ like Vundle does, so simply:
Plug 'restore_view.vim' is enough. Alternatively, Plug 'vim-scripts/restore_view.vim' if you are a bit pedantic like me.

IMPORTANT: If vim.org has many scripts with the same name, you will get the one the scraper put in last. Though usually name collisions aren't an issue.

@junegunn We don't seem to document the automatic prepending of the mirror anywhere in README, is it on wiki somewhere or just a hidden feature?

@starcraftman I implemented the prepending to make vim-plug Vundle-compatible so it's easier for the users to migrate. But currently, I'm not sure if it was a good idea for vim-plug to have the hardcoded dependency to vim-scripts when the future of it is somewhat questionable (the repository has been inactive for years by now) So I think we should guide the users to be explicit and use vim-scripts/foo instead and keep the implicit prepending as a hidden feature just for Vundle-compatibility.

@ryanmorillo
As @vheon and @starcraftman explained, you can use the mirrored vim-scripts repository on GitHub. If you do not wish to use the mirror and download the script straight from vim.org, I believe NeoBundle provides a mechanism to do that, but it's beyond the scope of vim-plug. I'll consider updating README or wiki page with the reference to vim-scripts, thanks.

the future of [vim-scripts] is somewhat questionable

Indeed, the scraper has stopped updating the vim-scripts GitHub org, at least as of vim-scraper/vim-scraper#89. There are newer versions of scripts that aren't on GitHub. They are inaccessible to vim-plug. What's a vim-plug user to do?

This would be a great addition to vim-plug as some of the vim-scripts haven't been updated for 3 years!

Was this page helpful?
0 / 5 - 0 ratings