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:
parent
8b45742540
commit
0c1e32ea39
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user