Vim Plug – A minimalist Vim plugin manager
github.com
github.com
I've found even that I can install vim-plug with only a few lines of vimscript so that I don't even need to store a .vim directory in my dotfiles repository. Everything can just be installed and run the first time I start vim on a machine, and I can easly :PlugUpdate to get updates to any of my installed plugins.
https://github.com/jwhitley/vimrc/blob/master/.vim/bootstrap...
... and this one after the plugin definitions installs the remaining bundles:
https://github.com/jwhitley/vimrc/blob/master/.vim/bootstrap...
(I haven't updated this to the new "Plugin" Vundle syntax yet; the change is local but not pushed.)
That said, features like vim-plug's postupdate hooks are sweet.
[1]: https://raw.githubusercontent.com/junegunn/i/master/vim-plug...
Indeed, vim-plug seems a very nice plugin manager, but it is in no way "more minimalist" than pathogen. How could one be?
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.
I recognize that this is really a misgiving I have with the direction Vim is going, towards complexity (plugin managers, multithreaded implementations). NeoVim looks like the final push that makes Vim configuration and operation truly byzantine. Then everybody gets to pick between Emacs and VEmacs.
There's nothing simple about the Vim source, but Neovim has cut it in half, and modularized it. The Neovim strategy is similar in spirit to a microkernel, or shell tools: let the Vim core operate on inputs, and let external tools (GUIs, plugins) operate on the outputs. Like `find . | grep -v foo | sort` involves three self-contained, well-defined tools.
Because blocking the UI thread for any kind of I/O network, process, file, whatever is such a great thing. Or even just syntax highlighting, which actually prevents you from being able to move your cursor in vim sometimes.
Vim's source code is an abomination, and Neovim is making it unquestionably better.
A single-threaded UI means I can easily tell what Vim is doing at any time. It means the editor never feels clunky because indexing or some other background activity is hogging resources. It also means I never get a "process is running" prompt like in IntelliJ or Emacs when I want to exit.
No, instead you find that you can't :q - or type anything for that matter - because everything's frozen while vim is realising that the network drive is down, or you're waiting for the syntax highlighting to finish.
You're not sacrificing any control. I'll speak only of the ones I know: vundle, neobundle, and vim-plug are using very basic Vim mechanisms to save you the hassle. Appending to &runtimepath is the Vim equivalent of modifying your shell $PATH.
And deferred loading, if you choose to use it (I don't), actually gives you more control over plugin behavior.
> You own your vimfiles
This is emacs mentality. I don't want to own (read: maintain) the plugins I use. If I find a bug, I send a PR upstream so others can benefit. If the bug is unforgivable I uninstall the plugin. (You can also pin to a specific SHA).
> This is emacs mentality.
I think that plugin managers (further complexity in editor configuration) are Emacs mentality. See, ELPA. The approach I'm describing is how people maintained their vimfiles before plugin managers became popular.New Vim users are told to use a plugin manager now if they want to install other users' scripts, and I believe that is a flawed approach to configuring a lightweight editor like Vim.
Is it so hard to relate to the desire simplicity and control in editor config? It's one place where I want to keep the cognitive overhead as low as possible: No forking git repositories to fix a bug in somebody's indent script that's not been maintained since 2007.
- 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.
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.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.
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.
[1]: https://github.com/junegunn/vim-plug/issues/75#issuecomment-...
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?
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
[3] I know some people still have a soft spot for Yahoo directory, but whatever.
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
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...
[2]: https://github.com/junegunn/vim-plug#example-a-small-sensibl...
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.
That said, coherentpony may just be against hellbanning as a whole. I find it a tasteless tool myself.
There are some people who really can't be reasoned with, but it's not everyone.