Managing Vim plugins
NeoBundle
Just as Vundle is based on Pathogen, so NeoBundle is based on Vundle. The chief rationale for NeoBundle is that Vundle's creator preferred to keep Vundle simple, whereas NeoBundle's creator chose to add additional functionality. For example, like Vundle, NeoBundle works with Git, but it also supports Subversion or Mercurial repositories. Additionally, NeoBundle lets you lock a plugin to a specified update, which prevents updates that might break the plugin.
More idiosyncratically, NeoBundle can be integrated with other plugins written by the same developer, such as Unite.vim
[6], a file and buffer manager, and vimshell.vim
[7], a scripting shell that works with vimproc.vim
[8], which is an asynchronous execution library. However, most users will probably be interested primarily in NeoBundle itself.
NeoBundle shares the directory structure of Pathogen and Vundle and can be installed with a similar command (Figure 3):
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
NeoBundle also requires modifications to .vimrc
similar to those that Vundle requires, aside from the names. A minimum .vimrc
for NeoBundle is shown in Listing 3.
Listing 3
Minimum .vimrc for NeoBundle
01 if has('vim_starting') 02 set nocompatible 03 set runtimepath+=~/.vim/bundle/neobundle.vim/ 04 05 call neobundle#begin(expand('~/.vim/bundle/')) 06 07 NeoBundleFetch 'Shougo/neobundle.vim' 08 09 call neobundle#end() 10 filetype plugin indent on
Other plugins should be added, one per line, beneath the line:
NeoBundleFetch 'Shougo/neobundle.vim'
As with Vundle, the syntax assumes that files on GitHub and any other repository must be specified using its complete URL. Other plugins are installed in the same way as NeoBundle.
Similarly, most of NeoBundle's utilities for use within Vim differ from Vundle's mainly by name, with small variations in functionality: :NeoBundleInstall
and :NeoBundleUPdate
to enable or update, :NeoBundleList
to view unenabled extensions, and :NeoBundleClean
for removing unused extensions (see above). Additionally,
:NeoBundle {REPOSITORY URI} [VERSION}] [OPTIONS}]
enables an extension while locking it into a specified version to prevent unwanted updates (Figure 4).
For most users, the main advantages of NeoBundle are the types of repositories it supports and the ability to lock plugin versions. Because the creator is Japanese, English-speaking users might have to wait for documentation; nonetheless, there is no doubt that NeoBundle is a major addition to Vim plugin management.
Choosing a Plugin Manager
The four plugin managers I discussed here give Vim users no shortage of choices. However, which you choose can be highly subjective.
Vim-addons is ideal for those familiar with Debian or one of its derivatives, as well as those comfortable with package management from the command line. It also has the advantage of requiring less manual configuration, or the memorization of utility names, as well as being able to manage plugins for both the current user and the entire system.
Of the other three, NeoBundle might appear at first to be the obvious choice, because it elaborates upon Vundle and Pathogen. NeoBundle's ability to lock versions is definitely an advantage over Vundle, but some users may prefer Pathogen, opting for the sake of security for manual updates rather than depending on remembering to set version preferences. Similarly, those concerned about NeoBundle's rapid and wide-ranging development might opt for the relative simplicity of Vundle, especially if they have no interest in integrating with other plugins.
However, whichever plugin manager you choose, you cannot go far wrong as long as you take the time to understand it. If nothing else, each is a considerable improvement over trying to manage dozens of plugins in unmodified Vim.
Infos
- Vim-addon-manager: http://packages.debian.org/squeeze/vim-addon-manager
- Pathogen: https://github.com/tpope/vim-pathogen
- Vundle: https://github.com/gmarik/vundle
- NeoBundle: https://github.com/Shougo/neobundle.vim
- Vim-scripts: http://packages.debian.org/squeeze/vim-scripts
- Unite.vim: https://github.com/Shougo/unite.vim
- Vimshell.vim: https://github.com/Shougo/vimshell.vim/blob/master/doc/vimshell.txt
- Vimproc.vim: https://github.com/Shougo/vimproc.vim/blob/master/doc/vimproc.txt
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.