Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function! plug#begin wipes previous call plugs list #1299

Open
4 tasks
Ole2mail opened this issue Nov 29, 2024 · 0 comments
Open
4 tasks

function! plug#begin wipes previous call plugs list #1299

Ole2mail opened this issue Nov 29, 2024 · 0 comments

Comments

@Ole2mail
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant