
Vim Plug – A minimalist Vim plugin manager - bpierre
https://github.com/junegunn/vim-plug/
======
coherentpony
See also pathogen [1] and vundle [2].

[1] [https://github.com/tpope/vim-pathogen](https://github.com/tpope/vim-
pathogen)

[2]
[https://github.com/gmarik/Vundle.vim](https://github.com/gmarik/Vundle.vim)

~~~
fndrplayer13
Yeah - why should a user switch over from Pathogen or Vundle? I'm not trying
to be a jerk -- just suggesting that that explanation is probably worth
giving.

~~~
junegunn
The most obvious benefit I believe is its ability to update plugins in
parallel. A GIF [1] shows that it managed to update 40 plugins in mere 4
seconds. The other notable point is that it allows you to load plugins on
demand, which helps reducing the startup time greatly [2] if you happened to
use many number of plugins. It also provides some other nice features that
pathogen or vundle do not have while still being easy to use.

[1]: [https://raw.githubusercontent.com/junegunn/i/master/vim-
plug...](https://raw.githubusercontent.com/junegunn/i/master/vim-
plug/40-in-4.gif)

[2]: [http://junegunn.kr/images/vim-startup-
time.png](http://junegunn.kr/images/vim-startup-time.png)

~~~
nilved
You can do that with pathogen very easily. See my vimfiles repo:
[https://stealthis.ca/vimfiles.git/tree/bin/update](https://stealthis.ca/vimfiles.git/tree/bin/update)

------
oinksoft
What is the use case for a Vim script manager? I've never understood what this
offers over including a full .vim in your version-controlled dotfiles. With a
script manager, you have to worry about repositories disappearing, Github
being down, and also breaking changes (unless you want to track a SHA on each
one).

With a simple .vim, your Vim configuration is a living, breathing thing, and
you can easily modify any script you're using the moment you find a bug in it
that interrupts your work: You own your vimfiles. When you manually upgrade a
script, it's trivial to roll back to the last version that worked. I guess
dotfiles are the last place I want to introduce needless indirection: They
should represent my work environment at a point in time, precisely.

I can only see two benefits: The ability to try out new plugins quickly, and
the ability to upgrade all of your plugins at once quickly. Are these worth
sacrificing control over your editor config? This has puzzled me since the day
tpope released Pathogen to much fanfare.

~~~
staz
I did the whole single .vim in git before switching to a script manager and I
consider it a huge improvement.

\- It's easier to install a new plugin, no more unzipping and copying files
manually.

\- The files from different plugins don't get mixed up together anymore

\- which mean is also easier to remove one

\- and also no file name conflict.

\- If I have a bug somewhere it's easier to disable each plugins temporarily
to find which one cause it.

\- Easier to update a plugin

\- My modification to my .vim don't get mixed up with the upstream updates
from the plugins. If I want to modify a plugin I just fork it (and try to have
my modification merged)

\- In fact I don't really have a .vim anymore, I put everything in my .vimrc
which is a nicer to read centralized location. If some part become too big I
just refactor it in a separate module that I install with the manager.

~~~
hobarrera
I don't get the benefits of a vim script manager vs using your distribution's
package manager, which seems to cover most (it not all) of the above.

------
vicaya
This is anything but minimalist.

Why do I need a slower plugin manager that requires editing .vimrc to
enable/disable plugins, when a couple of simple shell commands is faster and
less error prone?

    
    
      vimenable() { mv $VIM_DISABLED/$1 $VIM_BUNDLE }
      vimdisable() { mv $VIM_BUNDLE/$1 $VIM_DISABLED }
      vimupdate() { for p in $VIM_BUNDLE/*; do (cd $p; git pull); done }
    

The dependent plugin support is interesting but until all the plugins include
a standard dependency spec, I have to do it manually anyway.

~~~
nsmartt
It's a single file. It works with or without the ruby-dependent parallel
plugin installations and upgrades. It allows for plugins to be loaded only
when they're needed (e.g. only for JS files). That's minimalist.

------
eligundry
This is exactly what I've been looking for in a Vim plugin manager.

1\. Loading plugins as needed! I've been doing this manually in my Vim config,
but this makes it way easier. 2\. Custom dir names for plugins! I think I
opened up an issue on Vundle a few years ago asking for this (I think) but
this has it out of the box. 3\. Install hooks! I can't even describe how happy
this makes me.

I'll probably install this next time I'm at my Linux box.

------
GhotiFish
I just tested this, the parallel updates and installs are fantastic, however,
I have "YouCompleteMe" as a plugin, and it consistently fails to install, and
when it tries it seriously lags out. Vim will freeze for 4 or so minutes, and
it fails with an error "fatal: destination path '~/.vim/plugged/YouCompleteMe'
already exists and is not an empty directory"

Something strange there. Trying to resolve it, I don't doubt that there is
maybe something I neglected to do, but that's not a black mark on me, vundle
has no trouble with this, and doesn't complicate it either.

So cool project, young project, if I can resolve the issue I'll definitely be
using it.

edit: Wait a minute, miiiight just be YouCompleteMe.

Doing more testing!

edit2: noooope, vim-plug installed YouCompleteMe in such a way as to mess up
the repository. Manual installations work fine.

~~~
junegunn
As I answered in the issue [1] the problem is likely caused by the task
timeout. Maybe vim-plug should delete the repo directory if timeout occurs
during the installation. A workaround at the moment is to increase
`g:plug_timeout` so that it never times out.

[1]: [https://github.com/junegunn/vim-
plug/issues/75#issuecomment-...](https://github.com/junegunn/vim-
plug/issues/75#issuecomment-55513671)

------
adregan
I'm always curious about vim but hardly use it beyond git commit messages and
modifying files on a server. I'd be interested in getting better, but have an
easier time setting up Sublime (and don't really have the time during the week
to experiment).

I checked out vim plug and it seems really great, but is there a vim package
manager that works similar to the package manager you can get in sublime? One
that searches through available packages and allows you to install them that
way?

~~~
justinmk
> similar to the package manager you can get in sublime? One that searches
> through available packages

VAM[1] tries to. That is the only one I am aware of. But the list is managed
manually, which in my opinion is always a bad idea.

I think the best hope for a MELPA-like vim plugin source is to use the
vimawesome[2] API, but I'm not aware of any plugin manager that does so yet.
vimawesome scrapes various sources and looks at publicly-available .vimrc
files. This is a _technical_ solution rather than a "human vigilance"
solution. People want to post their vimrcs, so take advantage of that rather
than trying to curate a massive list. Passive/organic is usually better than
active/centralized[3].

[1] [https://github.com/MarcWeber/vim-addon-
manager](https://github.com/MarcWeber/vim-addon-manager)

[2] [http://vimawesome.com](http://vimawesome.com)

[3] I know some people still have a soft spot for Yahoo directory, but
whatever.

------
TheDong
Why not NeoBundle? It's easy to use, has lazy-plugin-loading, and everything
you could ever want that Pathogen/vundle doesn't have.

[https://github.com/Shougo/neobundle.vim](https://github.com/Shougo/neobundle.vim)

You might say it's not sufficiently minimalistic, but the parent really isn't
either and I'd say the lazy-loading implementation has to be a point in the
favour of minimalism for NeoBundle

~~~
junegunn
FYI, vim-plug also supports lazy-loading and the interface is pretty simple
and concise [1].

NeoBundle obviously has more features, most notably supporting VCS' other than
git, while vim-plug tries to be simpler and easier to setup and use (being a
single file, no boilerplate code [2]). So they have different perspectives and
I wouldn't argue that one is better than the other. It really depends on
personal tastes.

[1]: [https://github.com/junegunn/vim-plug#on-demand-loading-of-
pl...](https://github.com/junegunn/vim-plug#on-demand-loading-of-plugins)

[2]: [https://github.com/junegunn/vim-plug#example-a-small-
sensibl...](https://github.com/junegunn/vim-plug#example-a-small-sensible-vim-
configuration)

------
ravishi
How does all these plugin managers deal with plugins which require _manual
tasks_ to be performed during installation, like CommanT's and YCM's
compillation?

Also, is there any way to create different sets of plugins for different
install types and environments? I would like to have a "light" install, with
only necessary stuff, and a "full" install with that plus everything else.

------
nsmartt
I switched to vim-plug from Vundle a couple of weeks ago, and I'm in love.
Lazy initialization and, if your vim is built with ruby, threaded plugin
installations and upgrades. As a bonus, it's beautiful.

------
coherentpony
pyed, you are hellbanned.

~~~
joemi
Isn't telling people that they're hellbanned against the whole point of
hellbanning?

~~~
GhotiFish
HN uses the tool indiscriminately without any form of communication, on the
assumption that everyone who would dare violate a HN conduct rule simply can
not be reasoned with.

There are some people who really can't be reasoned with, but it's not
everyone.

------
hernan604
looking good

