Managing Vim Plugins

In this tutorial we'll talk about managing Vim plugins. Has it often occurred to you that you've found about this new shiny Vim plugin, installed it, used it for some time and then completely forgot about updating it? And it gets worse when you get a new computer, because you can't even remember the name of the plugin you've been using. After that you have to search the Internet for that same plugin, while you could have used the time more appropriately.

Because of that I've written a Perl script that automatically downloads the selected Vim plugins into the ~/.vim/bundle/ directory, but it also updates the plugins when they've already been downloaded. This is why the script can be used to install and update all of the Vim plugins we're depending upon for everyday file/source editing.

The plugin can be found in dotfiles-vim repository on my Github account. In the repository you can also see my .vimrc and .gvimrc files that I'm using in everyday life. If you feel up to it, you can check out the configuration files where you can find my configuration options. I know I'm always fond of looking though other people's dotfiles, because I always find something interesting that I didn't know before.

The script is called and is located here. The script basically goes over the defined repositories stored in git_bundles array and clones them into the ~/.vim/bundle/ directory by using git clone command. If they have already been downloaded, it updates them by using git pull command.

In order to start using the script, you have to download it into the ~/.vim/ directory and run it from the same directory. You have to run the following commands.

# cd ~/.vim/
# wget
# perl

After the script has finished downloading and updating the plugins, we have to restart Vim for the changes to take effect.