Vim Plugins
Last updated
Was this helpful?
Last updated
Was this helpful?
Although Vim already provides very powerful features, but if you have a few good plug-ins to complement, more can make your work twice as fast.
虽然 Vim 已经提供了非常强大的功能,但如果有几款好用的插件辅佐,更能让你的工作事 半功倍。
If you want to install Vim plugins manually, you need to complete the following steps (it is not recommended to install manually, please refer to the content below):
Create the .vim
folder
Create the bundle
folder in the .vim
folder
copy or clone the plugin to the bundle
folder
Note: If the plugin does not have a git address, you can also create the relevant folder directly and place a .vim
file in it.
Edit runtimepath
By modifying the runtimepath
property, you can let Vim find the plugin you want to load. To view the runtimepath
property, you can use the :set runtimepath
command
You can enable new plugins by adding the following configuration to .vimrc
When you have more and more plugins, you need a manager to manage Vim plugins. There are several popular plugin managers:
I personally prefer vim-plug, and I will briefly introduce this manager below.
https://github.com/junegunn/vim-plug
Add the vim-plug
configuration to ~/.vimrc
:
The configuration starts with call plug#begin()
Plugin list, starting with the Plug
command
End with call plug#end()
to initialize the plugin system
This will automatically enable filetype plugin indent on
and syntax enable
. If you don't want this, you can reset your settings after this configuration, for example: filetype indent off
, syntax off
Restart Vim or reload
.vimrc
and execute:PlugInstall
to install the configured pluginThe reload command is
:source ~/.vimrc
PlugInstall [name ...] [#threads]
Install plugin
PlugUpdate [name ...] [#threads]
Install or upgrade
PlugClean
Clean plugin
PlugUpgrade
Upgrade vim-plug
PlugStatus
View installed state
Note: For more commands, see the official website
, and put it in the autoload
folder (usually this folder is located in ~/.vim/autoload/
).
There are a lot of Vim plugin resources on , you can search by vim plug
keyword to
Vim official script collection, pay attention to there are many Vim scripts in addition to plugins
Vim plugin recommendation
This tutorial will also update some excellent plugins and usage instructions from time to time in