How to make vimrc work when there is no plug

Use case: user configured `.vimrc`, copied it to another machine, but did not install `plug` there. `.vimrc` will fail with many errors.

Update `README.md` with instructions how to deal with this case.
This commit is contained in:
Stepan Koltsov 2021-01-25 23:43:04 +00:00 committed by GitHub
parent 8b45742540
commit 0c1e32ea39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,8 @@ Add a vim-plug section to your `~/.vimrc` (or `stdpath('config') . '/init.vim'`
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
silent! call plug#begin('~/.vim/plugged')
if exists('g:plug_home') " Only invoke following commands if `plug` is installed
" Make sure you use single quotes
@ -133,6 +134,7 @@ Plug '~/my-prototype-plugin'
" Initialize plugin system
call plug#end()
endif
```
Reload .vimrc and `:PlugInstall` to install plugins.