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
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.