vim_plug
GitHub - junegunn/vim-plug: :hibiscus: Minimalist Vim Plugin Manager
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
其他方式
git clone https://github.com/junegunn/vim-plug
mkdir ~/.vim/autoload
cp vim-plug/plug.vim ~/.vim/autoload/
编辑vim ~/.vimrc
call plug#begin()
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
call plug#end()
~
常用操作
vim-plug常用命令 :PlugInstall '安装新添加的插件' :PlugStatus "检查插件安装状态" :PlugUpdate "更新已安装的插件" :PlugClean "卸载在call plug#begin与call plug#end() 之间删去的插件" :PlugUpgrade "升级vim-plug本身" :PlugDiff " 审查插件 " 作者:glRu 链接:https://www.jianshu.com/p/55b769df5dfa 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
配置文件
1 set nocompatible " be iMproved, required 2 3 autocmd vimenter * NERDTree 4 let base16_colorspace=256 5 let g:lightline = { 6 \ 'colorscheme': 'blue_mood', 7 \ } 8 9 map <F2> :NERDTreeMirror<CR> 10 map <F2> :NERDTreeToggle<CR> 11 filetype off 12 set nu 13 call plug#begin('~/.vim/plugged') 14 Plug 'vim-airline/vim-airline' 15 Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } 16 Plug 'valloric/youcompleteme' 17 Plug 'lmintmate/blue-mood-vim' 18 Plug 'tpope/vim-fireplace', { 'for': 'clojure' } 19 call plug#end() ~ ~ ~ ~ ~
Quick start, installing all completers
-
Install YCM plugin via Vundle
-
Install CMake, Vim and Python
apt install build-essential cmake vim-nox python3-dev
-
Install mono-complete, go, node, java, and npm
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_current.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list apt install mono-complete golang nodejs openjdk-17-jdk openjdk-17-jre npm
-
Compile YCM
cd ~/.vim/bundle/YouCompleteMe python3 install.py --all
确保使用 Vim >= 8.1.1719 或 Neovim >= 0.4.0。
安装 nodejs >= 16.18.0:
curl -sL install-node.vercel.app/lts | bash
对于 vim-plug 用户:
" Use release branch (recommended) Plug 'neoclide/coc.nvim', {'branch': 'release'} " Or build from source code by using npm Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'npm ci'}
sudo apt install nodejs sudo npm install -g yarn
cd ~/.vim/bundle/coc.nvim yarn install yarn build
vim中安装:CocInstall coc-python
:CocInstall coc-python