Is it possible to make vim to reload pathogen plugins without restarting vim? I have opened vim with many files, then I add plugin to:
~/.vim/bundle Since now I'd like to force vim to use the new plugin.
Place pathogen. vim inside ... \vim\vimfiles\autoload and you should be good to go. Bundles and pathogen should go to user's own vim configuration directory which is by default in {Disk}:/Users/{User}/vimfiles or {Disk}:/Documents and Settings/{User}/vimfiles .
vim-pathogen is a runtimepath manager created by Tim Pope to make it easy to install plugins and runtime files in their own private directories.
Vim 8 has a built-in plugins support using packages ( :h packages ). This post will show you how to install plugins using packages.
Now you can place Vim plugins in ~/. vim/pack/vendor/start, and they'll automatically load when you launch Vim. A file tree will open along the left side of your Vim window. Any plugins installed into opt are available to Vim, but they're not loaded into memory until you add them to a session with the packadd command.
Pathogen just manipulates the 'runtimepath'
option; the situation with plugin reloads is therefore the same as with the plain default plugin structure. (Other plugin managers may offer this kind of reload / dynamic enable functionality; I suppose you want to stick with Pathogen.)
To retroactively enable a plugin in a running Vim session, you need to :source
all (usually that's only one) plugin scripts that have been added. For a plugin named foobar
, that would be:
:source ~/.vim/bundle/foobar/plugin/foobar.vim
If you can get Pathogen to re-initialize the 'runtimepath'
(or augment it yourself via :set rtp+=~/.vim/bundle/foobar
), you can also use the shorter
:runtime plugin/foobar.vim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With