mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-18 23:56:55 +02: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
|
set shell=sh
|
||||||
endif
|
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')
|
call plug#begin('~/.vim/plugged')
|
||||||
Plug 'dylanaraps/wal.vim' " Color scheme
|
Plug 'dylanaraps/wal.vim' " Color scheme
|
||||||
Plug 'airblade/vim-gitgutter' " Git diff
|
Plug 'airblade/vim-gitgutter' " Git diff
|
||||||
|
@ -20,12 +20,6 @@ make package=vim
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
I use [vim-plug][vim-plug] as my plugin manager of choice. Install it, then run:
|
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 +PlugInstall +qall
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you can use my vim config with all the plugins installed!
|
|
||||||
|
|
||||||
[vim-plug]: https://github.com/junegunn/vim-plug
|
[vim-plug]: https://github.com/junegunn/vim-plug
|
||||||
|
Loading…
x
Reference in New Issue
Block a user