-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Install Without Opening Vim / Automated Install via Command Line #225
Comments
@rosstimson are you using neovim?? the installer should be synchronous in vim but there are some problem with neovim, see #104. For the error about the colorscheme, I personally use |
As @vheon mentioned, it looks like you're running Neovim. We've been planning to make Neovim installer synchronous only during (@vheon Since the only workaround for this is to use plain Vim, we could possibly make installer synchronous when
You should run into the same problem regarding colorscheme not present even if you use NeoBundle or Vundle. There's essentially no difference in how these plugin managers update your |
Thank you both, you are indeed correct, I had recently changed my Dockerfile to use Neovim. I'll keep an eye on issue #104 that you mentioned. The colorscheme thing was just an aside as it seemed to be a stumbling block with getting an automated install going. I'll use the Anyway, I'm sure my main issue is now down to Neovim (#104), apologies for being such a n00b and thank you both for the pointers. |
No problem. Maybe it's a good idea to install both vim and neovim until #104 is fixed and use vim for synchronous installation. |
Hi, I am dockerizing vim with the command Any ideas? |
@longkai Is |
@junegunn Thank you for your reply. I try I find there is an error when executing: E185: Cannot find color scheme 'solarized'. It is fine if I comment My .vimrc file(partial) is: call plug#begin('~/.vim/plugged')
Plug 'https://github.com/altercation/vim-colors-solarized.git'
call plug#end()
colorscheme solarized How can I fix it? Thanks in advance. |
@longkai Well, that's not a valid way to use |
@junegunn thx, it works! |
I am also facing the same issue, i need to setup neovim on a machine and then install the plugins non-intercatively. Is it possible to make this run in background ? |
It's worked for me: vim -E -s -u "path_to_vim_rc/.vimrc" +PlugInstall +qall |
@rbhanot4739 this looks better for my Dockerfile build: |
@golonzovsky in my case I use nvim if I add |
@asolopovas I just figured it out. Looks like nvim has |
$ vim --version | head -n 1
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 15 2019 16:41:15)
$ vim -E -s +PlugInstall +qall; echo $?
1
$ vim -E -s +PlugInstall +visual +qall; echo $?
0 |
it worked for me :) |
Coming across this looking for a solution and here was how I fixed it (Docker example): #Setup Vim Errors were popping up in Vim because lines in .vimrc that depended on my plugins, e.g. colorscheme=gruvbox. But then +PluginInstall cannot complete on command line because of the errors popping up. Cyclic dependency ;) My fix is to make a .vimrc_plugin_install that just installs all the plugins, and then put the .vimrc proper back. |
I came across this topic and wanted to share the following. You can install vimplug and the plugins directly from within your vimrc by putting " Install vim plug if not installed
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif before calling call plug#begin('~/.vim/plugged') or anything plugin related. |
I've just tried vim-plug out after using Vundle and NeoBundle in the past.
I'd like to try and automate the install of all my plugins as I'm going to do this in a Dockerfile, in Vundle I would be able to do something like:
vim +BundleInstall +qall
.I've attempted
vim +PlugInstall +qall
but that quits before my plugins have installed. I've also tried creating a shell script similar to the one NeoBundle uses to do this: https://github.com/Shougo/neobundle.vim/blob/master/bin/neoinstall but nothing seems to work.I also get an error about my colorscheme not being present as it is installed via vim-plug and obviously I can't manage to install everything without manual intervention.
This is all possible, and fairly simple, with NeoBundle and Vundle; any ideas how this can be achieved with vim-plug as I like vim-plug's more minimal approach?
Thanks for any help and this great project.
The text was updated successfully, but these errors were encountered: