2

I downloaded vim-fetch, but the install instructions are not clear to me:

Download and source the most current vimball from the releases list, then run :helptags {dir} on your runtimepath/doc directory. Or, if you use a git-based plug-in manager (like Pathogen, Vundle, NeoBundle etc.), simply add wsdjeg/vim-fetch to the list of plug-ins, source that and issue your manager's install command.

I don't have a git-based plug-in manager and would like to use a simple mechanism if possible. but, I have not idea what "runtimepath/doc directory" means. Or how :helptags is going to resolve this.

I do now have .vim/bundle/plugin/fetch.vim which I tried adding to my .vimrc, but it fails

1

2 Answers 2

1

I do now have .vim/bundle/plugin/fetch.vim which I tried adding to my .vimrc, but it fails.

If you want to manually install the plug-in by unpacking the files into locations your Vim will find, then you should store the plugin/fetch.vim into ~/.vim/plugin/fetch.vim (no bundle/ element there.) And the plug-in also depends on the autoload/ component, so you should also unpack autoload/fetch.vim into your ~/.vim/autoload/fetch.vim.

(There's also an autoload/stay/integration/fetch.vim, but it seems you only need it if you're also using the vim-stay plug-in.)

If you're unpacking the files manually, you might want to also unpack the documentation from doc/vim-fetch.txt into your ~/.vim/doc/vim-fetch.txt and then index it with :helptags ~/.vim/doc inside Vim (so that :help vim-fetch-usage and smilar commands will work from inside Vim.)


Having said that, there's not much benefit to unpacking plug-ins manually these days, since both you have rich plug-in managers that do the heavy lifting for you and, even if you don't like them, you can use native Vim packages.

For Vim packages, create a new directory ~/.vim/pack/<some-name>/start where you can pick <some-name> as appropriate to you, just avoid reserved names such as plugin (plural plugins is fine), using bundle is a popular choice, or pick your own username perhaps.

Then unpack vim-fetch there, so you'll have ~/.vim/pack/<some-name>/start/vim-fetch with all the subdirectories such as plugin/, autoload/ and doc/ directly under it. You will need to create the help index explicitly with :helptags ~/.vim/pack/<some-name>/start/vim-fetch/doc.


My actual recommendation is to use a plug-in manager, I tend to find it makes it much easier to install and maintain plug-ins that way (even if I fully understand and like the low-level approach of native Vim packages myself.) I recommend vim-plug, which is very easy to use but also very featureful and modern.

Plug-in managers such as vim-plug (and its predecessor Vundle) will often use directories such as ~/.vim/bundle to store the plug-ins they download. But in that case, they will add one more level of directories with the plug-in name under bundle. So instead of ~/.vim/bundle/plugin/fetch.vim (as you mentioned in the question), that file will be present in ~/.vim/bundle/vim-fetch/plugin/fetch.vim.

But it's not enough to just place the file there... The magic of the plug-in managers is to update 'runtimepath' to incude ~/.vim/bundle/vim-fetch (and the other plug-ins they manage), so that Vim will be able to find the files plugin/fetch.vim and autoload/fetch.vim that make this plug-in work.

If you're using a plug-in manager such as vim-plug, you don't need to worry about creating help tags, since vim-plug will do that automatically for you.


Finally, for completeness, if you really want to use the Vimball file vim-fetch-3.0.0.vmb available from vim-fetch's Releases page on GitHub, then download that vim-fetch-3.0.0.vmb file and open it with Vim, as in:

~/Downloads$ vim vim-fetch-3.0.0.vmb

Vim will show you a screen that has the following in it:

" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.
UseVimball
finish
...
***vimball*** Source this file to extract it! (:so %)

The last line is actually telling you how to install it. You just source it, so execute the suggested :source command:

:so %

This will install the Vimball you currently have opened.

But note that the most recent Vimball for vim-fetch, for version 3.0.0, was created on March 5, 2018, over 2 years ago. The GitHub page also tells you there were 12 commits to the repository since this version was cut. So for those reasons alone, you should avoid using Vimballs.

Not to mention that a Vimball is not only harder to initially install, but also harder to track, upgrade, uninstall. Vimballs have lost popularity to Vim plug-in managers for a good reason, so I'd recommend avoiding Vimballs as much as you can.

1
  • 1
    There is minpac and derivatives with packages in mind. Obvious benefit, they don't have to update and maintain runtimepath.
    – Maxim Kim
    Commented Sep 3, 2020 at 6:33
1

I would not suggest to use vimball installation if you plan to update/remove plugin later.

If you don't want to use plugin managers (all of them are git based afaik) just download plugin source files and put them into ~/.vim/pack/plugins/start/ folder. (Assuming you have not that old vim with packages support :h packages).

Or if you have git installed you can do (in terminal):

mkdir ~/.vim/pack/plugins/start
cd ~/.vim/pack/plugins/start
git clone https://github.com/wsdjeg/vim-fetch

If your vim doesn't support packages you are left with either vimball (again wouldn't suggest) or plugin managers that are not based on packages, such as vim-plug, for example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.