function! plug#begin wipes previous call plugs list
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
only **last** call for pair
```
call plug#begin()
....
call plug#end()
```
is taken into account.
all previous calls are wiped out.
in case if plugin bundle contain it's own plugin dependency list in a form of vim-plug instructions,
it will cause the .vimrc one to become **ignored** (skipped) for the installation/use.
better consider to have
`call plug#begin()
`
to **append** to existing list of plugs
instead of wiping out like:
`let g:plugs = {}
`
------------------------------
```
example file
.vimrc:
call plug#begin()
" List your plugins here
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
call plug#end()
while another file
.vim/plugin/init-coc-settings.vim:
" Use vim-plug to manage your plugins:
" https://github.com/junegunn/vim-plug
call plug#begin('~/.vim/vendor')
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}
Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-prettier', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tslint', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-lists', {'do': 'yarn install --frozen-lockfile'} " mru and stuff
Plug 'neoclide/coc-highlight', {'do': 'yarn install --frozen-lockfile'} " color highlighting
call plug#end()
```
```
vim-plug$ git describe --tags
0.14.0
vim-plug$ vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 10 2022 08:40:37)
Included patches: 1-749
```
- Type:
- [ X] Bug
- [ X] Enhancement
- [ X] Feature Request
- [ ] Question
- OS:
- [ X] All/Other
- [ ] Linux
- [ ] macOS
- [ ] Windows
- Vim:
- [ X] Terminal Vim
- [ X] GVim
- [ X] Neovim
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.