Skip to content
Most minimalistic plugin "manager" I could have come up with
Vim script
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugin
README.md

README.md

Its function is simple: download, update and enable using :packadd

It's limited only to GitHub repositories

Best utlized with, nomen omen, minimal list of plugins

Installation

Execute in shell:

git clone https://github.com/Jorengarenar/minPlug.git ~/.vim/pack/plugin/opt/minPlug/

and in vimrc add:

packadd minPlug " initialize minPlug

If you want to have minPlug automatically installed, add this to your vimrc:

if empty(glob(substitute(&packpath, ",.*", "/pack/plugins/opt/minPlug", "")))
    call system("git clone --depth=1 https://github.com/Jorengarenar/minPlug ".substitute(&packpath, ",.*", "/pack/plugins/opt/minPlug", ""))
    autocmd VimEnter * silent! MinPlugInstall | echo "minPlug: INSTALLED"
endif

Usage

This plugin provides two commands: MinPlug and MinPlugInstall

  • Add plugin

    After initialization of minPlug, use MinPlug in vimrc in such fasion:

MinPlug username/repo branch

        If branch isn't provided, as defualt master will be used

        To disable plugin, simply comment out this line

        Practiacal example: MinPlug Jorengarenar/vim-darkness

  • On-demand loading
MinPlug! username/repo branch

        Will only add plugin to list, so you can download it, but it won't start automatically

        You can then use autocmd (or ftplugin) to load it on demand using packadd

        Example:

MinPlug! Jorengarenar/pseudoClip | autocmd filetype cpp packadd pseudoClip
  • Download/update plugins
:MinPlugInstall

        When it finishes, only the message DONE will be shown

  • Download/update plugins overriding local changes
:MinPlugInstall!
  • Delete

        Remove MinPlug username/repo line from vimrc, then go to ~/.vim/pack/plugins/opt and remove the directory of plugin


Additional note

If you added something to the packpath option, ensure that your desired destination is first in the list (use ^=, e.g. set packpath^=$XDG_DATA_HOME/vim)

You can’t perform that action at this time.