0

After moving from Vim-plug to Minpac, the only missing functionality has been to be able to load local paths.

Actually I managed to make it work (details below), but I've got the feeling that there might be some flaws in the workflow and that I'm missing something in relation to the new 'packages' and 'jobs' features.

With Vim-plug that would be:

Plug '/usr/local/opt/localplugin'

I have Minpac installed and configured both in Vim and Neovim by following its README and the Vimcasts' episode Meet Minpac.

By following the discussion in this issue:

I don't think it's useful., because minpac doesn't manage runtime path. Isn't it enough to modify the runtime path directly? E.g.:

set rtp+=/usr/local/opt/fzf

Or, if you put a plugin under the package directory, you don't need to modify rtp. Vim will do it automatically.

I've managed to make it kind of work (in Neovim) by putting a sample plugin under the package directory (under */start/). It is possible to see the changes by either restarting Neovim or by :source path/to/plugin/localplugin.vim.

However, I don't understand the difference between the method above (by placing the plugin inside the package directory) and by modifying the rtp. Despite of that, to restart or to use :source doesn't feel like the proper way to do it.

Can anyone expand on how to properly (re)load local plugins with the use of Minpac and packages and jobs features?

1 Answer 1

2

It is actually quite easy. IF you want to have all flexibility and be able to use a plugin wherever it resides on your local filesystem, you need to go with setting up the runtimepath setting yourself (e.g. using :set rtp+=...). This might make sense for having the plugin reside somewhere locally, where it can be used by different users on your system (e.g. NFS share or something).

However if you are okay with placing a local plugin in a package directory of your local configuration directory (e.g. ~/.vim/pack/opt/), then Vim will load the package automatically (if it was placed below the start subdirectory) or you can load it manually on demand, by placing it below the opt subdirectory).

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.