Post

vim Plug Manager

安装

1
2
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

修改配置

~/.vimrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
call plug#begin('~/.vim/plugged')

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-fugitive'
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'dense-analysis/ale'
Plug 'fatih/vim-go'

call plug#end()

syntax enable
set ts=4
set showcmd
set smartindent
set clipboard=unnamedplus
set undodir=/home/save/lcc/vim/undodir
set expandtab
set autoindent
set number
set hlsearch
set nocompatible
set backspace=indent,eol,start

安装列表插件

  • 打开终端
  • vim
  • 进入命令行模式

    1
    
      :PlugInstall
    

插件其他操作

  • 更新插件::PlugUpdate
  • 更新指定插件::PlugUpdate NERDTree
  • 恢复插件::PlugSnapshot ~/vim-plug.list
This post is licensed under CC BY 4.0 by the author.