Emacs 24 looks like it will have a package manager. What package management options are there for Vim?
Is it possible to update vim plugins automatically?
Emacs 24 looks like it will have a package manager. What package management options are there for Vim?
Plugin management for vim used to be a pain in the traditional way by spreading plugin files across the whole personal vim runtime directory, eg. ~/.vim
for *nix system. Once a plugin is installed, it is hard to be updated because there is no easy way to remove the outdated plugin files which is a necessary step.
At the beginning, I d like to list my personal requirements about how a fine plugin management tool should be:
There are lots of implementations out there(Vim-Scripts.org has a comprehensive summary of all the available tools), I will only talk about several major tools by their creating order.
vimball was the first attempt to solve the problem and actually had been a half-official solution that lots of plugins shipped with a *.vba
package together for a long time. Combined with GetLatestVimScripts, this formed the traditional way for the vim plugin management.
Even though, the problem still remained until Tim Pope s pathogen(Github Repo), which places each plugin into its own directory and loads them at the startup by modifying the "rtp(runtimepath)" of the vim, showed up. This is great progress - combined with vim-scripts.org hosted by git/github and other tools(eg. vimmer), it forms the modern way of managing vim plugins. There are lots of articles and videos talking about this topic.
As a plugin that manage the plugins, pathogen is still missing some core functionalities like searching, install, updating and removing the plugins. As a result, VAM(Vim-Addon-Manager)(Github Repo) stepped out. VAM provides almost everything needed to be plugin manager: places plugin files in its own directory, loads plugins at vim startup, searching/installing/updating/removing plugins in ex command line, written in pure VimL, maintains its own plugins central info database, even resolves the plugin dependencies. It seems VAM should be the one that we need as a full-featured vim plugin manager, but from my point of view, the approach VAM takes is a little bit inelegant and sometimes over-designed. Though it is still a wonderful plugin and worth using.
Then, there came Tom Link s tplugin(Github Repo) which improved pathogen by having plugins only loaded when related commands or functions are called, similar to AsNeeded. Also, it has some sort of dependency solving mechanism which seems nice.
Finnaly, Gmarik created Vundle (Github Repo) which is a successor of Tim Pope s pathogen with inspiration from Ruby s Bundler, it provides a better user interface and additional management functionality. Vundle to Vim is much similar as Bundler to a Ruby Project. By having needed plugins declared in vimrc, vundle handles all the rest, including installing/updating and removing plugins, through the ex command line interface. Most importantly, vundle is implemented in pure VimL. With the help of vundle, managing vim configuration across several computers could be done with just a simple vimrc file. As a modern plugin management tool, vundle relies on Git and can install plugin directly from Github. Vundle also provides a fancy interactive interface for searching and installing plugins.
Vundle does not fully fulfill my requirements though, but it does head to the right direction, which seems to be a good start point for me.
Here are a discussion and another comparison between vim plugin managers by VAM s author MarcWeber.
There s also pathogen.vim
http://www.vim.org/scripts/script.php?script_id=2332
Although its not exactly what you are asking for it provides a means to manage checkouts from your github s and bitbucket s.
This is good as it separates the plugin s directory structure. So you can checkout a repository of the plugin and get a proper version control rather than rely on the maintainer to update the code. Also it doesn t rely on the plugin author to set up/package as required by the other options cited.
There are some other plugins on vim.org that perform this task although I can t find them at the moment
I m using a hand-crafted setup for now, but I keep telling myself to give this a shot sometime (the links all have to do with the same plugin):
Once again, I haven t actually tried this myself yet, but it certainly looks promising.
All these answers seem pretty old. As described in this answer to a similar question,
Both Vim 8.0 and Neovim have their own built-in package manager
There is no need at all for another plugin manager.
I ve been using it for a year or two and it seems simple and easy to me.
Here are a few resources about its advantages and how to use it:
Vim.org + Vimballs + GetLatestVimScripts is preffered built in way to manage vim plugins at the moment.
:h GetLatestVimScripts
The bad things about it:
Is it possible to update vim plugins automatically?
How can I configure vim to autowrite buffers after switching with alt-tab to another application?
I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....
I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...
How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...
I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...
Whenever I start a shell in vim using :sh, it doesn t source my ~/.bashrc file. How can I get it to do this automatically?
I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...