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
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
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.