Updated tips (markdown)

Junegunn Choi 2020-09-28 16:19:13 +09:00
parent d38da77e2b
commit ea2ad17b06

19
tips.md

@ -20,6 +20,25 @@ If you're behind an HTTP proxy and your proxy does not have TLS/SSL certificates
Resort to this only if git cannot get updated certificates or if Github has TLS/SSL issues.
#### Automatic installation of missing plugins
You can even go a step further and make `:PlugInstall` run on startup if there are any missing plugins.
```vim
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
```
Note that this may increase the startup time of Vim.
### Install plugins on the command line
```sh