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
Direct Download
Read full article as PDF:
Price $2.95
News
-
KaOS 2022.06 Now Available With KDE Plasma 5.25
The newest iteration of KaOS Linux not only adds the latest KDE Plasma desktop but sets LibreOffice as the default.
-
Manjaro 21.3.0 Is Now Available
Manjaro “Ruah” has been released and includes the latest Calamares installer, GNOME 42, and much more.
-
SpiralLinux is a New Linux Distribution Focused on Simplicity
A new Linux distribution, from the creator of GeckoLinux, is a Debian-based operating system with a focus on simplicity and ease of use.
-
HP Dev One Linux Laptop is Now Available for Pre-Order
The System76/HP collaboration Dev One laptop, geared toward developers, is now available for pre-order.
-
NixOS 22.5 Is Now Available
The latest release of NixOS with a much-improved package manager and a user-friendly graphical installer.
-
System76 Teams up with HP to Create the Dev One Laptop
HP and System76 have come together to develop a new laptop, powered by Pop!_OS and aimed toward developers.
-
Titan Linux is a New KDE Linux Based on Debian Stable
Titan Linux is a new Debian-based Linux distribution that features the KDE Plasma desktop with a focus on usability and performance.
-
Danielle Foré Has an Update for elementary OS 7
Now that Ubuntu 22.04 has been released, the team behind elementary OS is preparing for the upcoming 7.0 release.
-
Linux New Media Launches Open Source JobHub
New job website focuses on connecting technical and non-technical professionals with organizations in open source.
-
Ubuntu Cinnamon 22.04 Now Available
Ubuntu Cinnamon 22.04 has been released with all the additions from upstream as well as other features and improvements.