Home  >  Q&A  >  body text

vim plug-in - cloned vim configuration, how to make vundle automatically download the plug-in?

Uploaded the configuration to github myself, and then cloned it, I found that I had to execute PluginInstall in vim to download the plug-in. How can I trigger this download in the script?

大家讲道理大家讲道理2712 days ago597

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:37:55

    #install.sh
    vim +BundleInstall +qall

    reply
    0
  • PHPz

    PHPz2017-05-16 16:37:55

    Can be added in vimrc

    
    let hasVundle=1
    let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
    if !filereadable(vundle_readme)
        echo "Installing Vundle..."
        echo ""
        silent !mkdir -p ~/.vim/bundle
        silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle
        let hasVundle=0
    endif
    
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()
    
    
    这里配置你的插件列表xxx
    
    if hasVundle == 0
        echo "Installing Plugins, please ignore key map error messages"
        echo ""
        :PluginInstall
    endif
    

    Automatically download Vundle and install plug-ins

    You can refer to tao12345666333/vim On GitHub

    reply
    0
  • Cancelreply