mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-15 12:54:15 +01:00
vim: Install vim-plug if it is not present
This commit means that manually copy/pasting the curl command on new machines is no longer necessary.
This commit is contained in:
parent
8056132e7b
commit
2fa91642d3
@ -5,6 +5,15 @@ if &shell =~# 'fish$'
|
||||
set shell=sh
|
||||
endif
|
||||
|
||||
let plugsys = glob('/usr/share/vim/vimfiles/autoload/plug.vim')
|
||||
let plugusr = glob('~/.vim/autoload/plug.vim')
|
||||
|
||||
if empty(plugsys) && empty(plugusr)
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/0.10.0/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'dylanaraps/wal.vim' " Color scheme
|
||||
Plug 'airblade/vim-gitgutter' " Git diff
|
||||
|
@ -20,12 +20,6 @@ make package=vim
|
||||
|
||||
## Usage
|
||||
|
||||
I use [vim-plug][vim-plug] as my plugin manager of choice. Install it, then run:
|
||||
|
||||
```
|
||||
vim +PlugInstall +qall
|
||||
```
|
||||
|
||||
Now you can use my vim config with all the plugins installed!
|
||||
I use [vim-plug][vim-plug] as my plugin manager of choice. If it isn't installed already, my `.vimrc` will install it for you. If you already have vim-plug installed, run `:PlugInstall`. Now you can use my vim config with all the plugins enabled!
|
||||
|
||||
[vim-plug]: https://github.com/junegunn/vim-plug
|
||||
|
Loading…
Reference in New Issue
Block a user