提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
前言
vim-plug is very good
提示:以下是本篇文章正文内容,下面案例可供参考
一、What is vim-plug?
示例:vim-plug 是 vim 管理插件的插件
二、How to use ?
1.install
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
error:
Failed to connect to raw.githubusercontent.com port 443: Connection refused
2.fix
open this file
sudo vim /etc/hosts
add
199.232.28.133 raw.githubusercontent.com
3. plug install error
error:
fatal: unable to access ‘https://github.com/xxx
1 将该行
let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git')
改为
let fmt = get(g:, 'plug_url_format', 'https://hub.fastgit.xyz/%s.git')
2 将改
\ '^https://git::@github\.com', 'https://github.com', '')
改为
\ '^https://hub.fastgit\.xyz', 'https://hub.fastgit.xyz/', '')
总结
1.vim-plug command
Command | Description |
---|
PlugInstall [name …] [#threads] | Install plugins | PlugUpdate [name …] [#threads] | Install or update plugins | PlugClean[!] | Remove unused directories (bang version will clean without prompt) | PlugUpgrade | Upgrade vim-plug itself | PlugStatus | Check the status of plugins | PlugDiff | Examine changes from the previous update and the pending changes | PlugSnapshot[!] [output path] | Generate script for restoring the current snapshot of the plugins |
2.Example
The file: .vimrc
"" 插件
call plug
"" 彩虹括号
Plug 'luochen1990/rainbow'
"" 历史记录
Plug 'mhinz/vim-startify'
"" 轻量级代码补全
Plug 'skywind3000/vim-auto-popmenu'
call plug
|