Linux system To use the Vim editor, you must install the Vim plugin, (Vim plugin installation can refer to the system home Ubuntu install vim plugin steps), and timely management Vim plugin is very It is necessary, and NeoBundle can manage the Vim plugin. The following small series will introduce you to the method of using NeoBundle for Linux installation.
Why do we use the Plugin Manager? Vim supports a large number of plugins, but since it does not strictly define the framework, the plugin files can be distributed in different directories, which makes it difficult for users to manage them (LCTT: Of course, if you have a lot of plugins, there is a little obsessive-compulsive disorder). I feel that these plugins will be comfortable in my mind.) And a plugin manager makes management a lot easier. Pathogen, Vundle and NeoBundle work to create a directory for different plugins and then throw those directories into the ~/.vim/bundle directory. This file sorting method allows you to easily and completely remove the plugin, use ‘rm -rf "plugin directory" & rsquo; or directly delete the directory where the plugin is located in the file manager, absolutely no green residue. At the same time, this approach also minimizes incompatibilities between plugins and plugins.
NeoBundle is a project based Vundle as Vundle, they can install and upgrade plug-ins. However, NeoBundle's documentation clearly states: “NeoBundle is not a stable plugin manager. If you want a stable one, please choose Vundle”. There is also a warning on the latest release-note. "This may cause compatibility issues" —— This is a note written by the developer that the manager is not yet safe to use.
So why do we use NeoBundle? It does not guarantee stable operation! Ok, it still has merit. Vundle only supports Git, a version control system, and NeoBundle supports Subversion and Mercurial. Another reason is that if you don't want to crash your Vim ecosystem when the plugin is upgraded, you can lock the NeoBundle to use only a fixed version of a plugin.
In addition, the NeoBundle creator, Shougo Matsuishita (LCTT: name looks like Japanese), is adding its command interface to other plug-in projects to reduce their command usage. NeoBundle now supports three plugins: unite.vim, the file and cache manager used by Vim, vimshell.vim, the script used by Vim, and vimproc.vim, which is run in vimshell.vim for support for asynchronous events. All of the above are special cases, lacking English documentation, so users hope someone can perfect them. Before we can use them officially, we need to focus our attention on some basic operations.
Installing and Initializing NeoBundle
NeoBundle supports Vim 7.2.051 or higher and requires git and cURL (for downloading files). You can either download NeoBundle manually or use cURL to download its library on GitHub. Use the following command in your home directory to download the NeoBundle plugin to the .vim/bundle/neobundle.vim directory, and NeoBundle can manage it yourself.
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh |
Sh
You also need to modify the .vimrc file. NeoBundle's GitHub home page provides a .vimrc template, but using this template directly, NeoBundle requires you to install 5 possible plugins. If you don't need them, you can use the following minimum configuration:
if has(‘vim_starting’)
set nocompatible
set runtimepath+=~/.vim/bundle /neobundle.vim/
call neobundle#begin(expand(‘~/.vim/bundle/’))
NeoBundleFetch‘Shougo/neobundle.vim’
call neobundle#end()
filetype plugin indent on
The above configuration is useful for starting NeoBundle and upgrading itself like other plugins. NeoBundle is downloaded and upgraded by default from GitHub. If you happen to be using GitHub, you only need to specify the maintainer's username and path for this plugin. In the above configuration, NeoBundleFetch only needs to be specified as “Shougo/neobundle.vim” instead of the full GitHub path. If you want to use a different website, such as a Subversion or Mecurial website, you will need to add the full URL.
If you want to install other plugins, you can use the following command:
curl -k https://github.com/[project maintainer]/[plugin path] ~~/.vim/bundle/[plugin path]
For example: if you want to install vim-abolish, a super NB text search and replace plugin, use the following command:
curl - k https://github.com/tpope/vim-abolish 》 ~/.vim/bundle/abolish
If you want to auto-upgrade it, add a line below the line NeoBundleFetch:
NeoBundle‘tpope/vim-abolish’
Introduce a little trick: you can specify a branch or version number for the plugin. What do you mean? NeoBundle will only use one branch or version of this plugin, ignoring its version update. If you are using a plugin that is in a high-speed development process, you can use this technique to avoid using buggy plugin versions. For example:
NeoBundle‘Shougo/vimshell’,{‘rev’:‘3787e5’}
Another trick: add a line to the .vimtc file about “NeoBundleCheck&rdquo ; the attribute. NeoBundle checks for plugins that are not installed based on the configuration and prompts you to install them. You can also install or upgrade the plugin using the command <;NeoBundleInstall" (LCTT: This is to be entered in the Vim editor's command mode).
NeoBundle Usage
Many NeoBundle commands work like Vundles, but the names of commands are different. Here's how to use the NeoBundle command:
:NeoBundleUpdate: Install or upgrade the plugin. If you manually delete the directory of a plugin, this command will reinstall the plugin. Adding a plugin name after this command will only upgrade one plugin; without any arguments, all plugins that are installed but not documented will be recorded. The :NeoBundleInstall command has the same effect.
:NeoBundle {REPOSITORY URI} [[REVISION}] [,OPTIONS}]]: Lock a plugin to a fixed version to prevent random upgrades.
:NeoBundleList: Lists all uninitialized plugins.
:NeoBundleClean: Enter the interactive interface and delete the plugin.
These commands work slightly differently when used with unite.vim (LCTT: one of the 32 examples mentioned above). You can use the “:help neobundle” command for more information.
Whether to use NeoBundle, decide for yourself
NeoBundle is a powerful tool and is in high-speed development. Any project in this state will be labeled "Promising" and "Unstable", see how you choose. If you want the latest stable version of the plugin, NeoBundle can take Vundle and Pathogen out a few streets.
However, the online help documentation has given a warning that it is not a stable product. Failure to update the version in time may cause some plug-ins to run incorrectly. Finally, you need to specify a stable version of your Neoundle and other plugins in the .vimrc file. Remember this warning, and then you can use these cutting-edge technology products with ease.
The above is a description of the Linux installation using NeoBundle, but NeoBundle is not stable enough at present, there are some problems, so there may be some problems when using NeoBundle.
Linux sed command is mainly used for text processing, can handle the lines and columns of text, the
Recently, some users have reported that they have problems using gulp under Fedora and Ubuntu operat
Installing Vagrant on Linux system is prone to various problems, for example, some people do not kno
In the Gnome graphical desktop environment of Ubuntu system, some users have encoun
How to use Linux to periodically delete expired files using the command
What should I do if the CentOS 6.5 network in VMware is not connected?
Linux System Tmux Installation and Usage Guide
How to encrypt emails under Linux?
Basic knowledge of cgroups in Linux
How to install Autossh on Linux system
Linux file method using file command to identify the file type
How do old computers install open source Linux systems?
What should I do if I get an error when installing LDAP on Linux under Linux?
How to boot a Linux ISO image file from the hard disk
Linux installation and configuration of rsync and sersync methods
Making the perfect WinXP VLK SP2 integrated CD
Linux system vps server entry level security configuration guide
What should I do if WinXP sets the account password to be invalid?
Solving Win7/Win8 can't open hibernation problem
Edge browser can't open webpage solution
Detailed WP8.1 WiFi-aware function
Easily teach you to restore the display desktop shortcuts in the WinXP Quick Launch bar
Win10 system prompts telnet not a solution for internal or external commands
Win8 desktop icon shortcut small arrow quick removal method
How to solve the problem that the Win10 taskbar time does not display the month?