Switch from vim-plug to minpac, which uses Vim 8.0's native packages and so gives really good startup times

This commit is contained in:
Danielle McLean 2018-01-12 12:00:06 +11:00
parent 4dc1a935a0
commit 08a615f546
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 48 additions and 34 deletions

View file

@ -1,56 +1,67 @@
set encoding=utf-8 set encoding=utf-8
scriptencoding utf-8 scriptencoding utf-8
if !filereadable($XDG_CACHE_HOME . '/vim/autoload/plug.vim')
silent !curl -fLo $XDG_CACHE_HOME/vim/autoload/plug.vim --create-dirs 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
augroup vimplug
autocmd VimEnter * PlugInstall
augroup END
endif
function s:ensure_dir(dir) function s:ensure_dir(dir)
if filewritable(a:dir) != 2 if filewritable(a:dir) != 2
call mkdir(a:dir, "p", 0700) call mkdir(a:dir, "p", 0700)
endif endif
endfunction endfunction
call plug#begin($XDG_CACHE_HOME . '/vim/bundle') silent! packadd minpac
Plug 'tpope/vim-sensible' if !exists('*minpac#init')
silent !git clone https://github.com/k-takata/minpac.git $XDG_CACHE_HOME/vim/pack/minpac/opt/minpac
augroup minpac
autocmd!
autocmd VimEnter * call minpac#update()
augroup END
endif
Plug 'ciaranm/inkpot' packadd minpac
Plug 'editorconfig/editorconfig-vim'
Plug 'ervandew/supertab'
Plug 'jamessan/vim-gnupg'
Plug 'junegunn/fzf' | Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-unimpaired'
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
Plug 'wincent/loupe'
Plug 'wincent/terminus'
Plug 'LaTeX-Box-Team/LaTeX-Box' call minpac#init({'dir': $XDG_CACHE_HOME . '/vim'})
Plug 'vhda/verilog_systemverilog.vim' call minpac#add('k-takata/minpac', {'type': 'opt'})
Plug 'sheerun/vim-polyglot' call minpac#add('tpope/vim-sensible')
Plug 'sukima/xmledit'
Plug 'alx741/yesod.vim' call minpac#add('ciaranm/inkpot', {'do': 'colorscheme inkpot'})
Plug 'pbrisbin/vim-syntax-shakespeare' call minpac#add('editorconfig/editorconfig-vim')
call minpac#add('ervandew/supertab')
call minpac#add('jamessan/vim-gnupg')
call minpac#add('junegunn/fzf')
call minpac#add('junegunn/fzf.vim')
call minpac#add('junegunn/vim-easy-align')
call minpac#add('scrooloose/nerdtree')
call minpac#add('tpope/vim-repeat')
call minpac#add('tpope/vim-sleuth')
call minpac#add('tpope/vim-surround')
call minpac#add('tpope/vim-unimpaired')
call minpac#add('vim-airline/vim-airline')
call minpac#add('vim-airline/vim-airline-themes')
call minpac#add('wincent/loupe')
call minpac#add('wincent/terminus')
call minpac#add('LaTeX-Box-Team/LaTeX-Box')
call minpac#add('vhda/verilog_systemverilog.vim')
call minpac#add('sheerun/vim-polyglot')
call minpac#add('sukima/xmledit')
call minpac#add('lepture/vim-jinja')
call minpac#add('alx741/yesod.vim')
call minpac#add('pbrisbin/vim-syntax-shakespeare')
if has('neovim') || exists('*ch_close_in') if has('neovim') || exists('*ch_close_in')
Plug 'w0rp/ale' call minpac#add('w0rp/ale')
endif endif
if has('macunix') if has('macunix')
Plug 'itspriddle/vim-marked' call minpac#add('itspriddle/vim-marked')
endif endif
call plug#end()
colorscheme inkpot silent! colorscheme inkpot
hi Normal ctermbg=NONE augroup transparent_term
autocmd!
autocmd ColorScheme * highlight Normal ctermbg=NONE
augroup END
inoremap jj <Esc> inoremap jj <Esc>
nnoremap <C-t> :Files<CR> nnoremap <C-t> :Files<CR>

3
vimrc
View file

@ -6,6 +6,9 @@ endfor
set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CACHE_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_CONFIG_HOME/vim/after,$XDG_CACHE_HOME/vim/after set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CACHE_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_CONFIG_HOME/vim/after,$XDG_CACHE_HOME/vim/after
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
if exists('+packpath')
set packpath^=$XDG_CONFIG_HOME/vim,$XDG_CACHE_HOME/vim
endif
let g:netrw_home = $XDG_CACHE_HOME . '/vim/netrw' let g:netrw_home = $XDG_CACHE_HOME . '/vim/netrw'
let $MYVIMRC = $XDG_CONFIG_HOME . '/vim/vimrc' let $MYVIMRC = $XDG_CONFIG_HOME . '/vim/vimrc'