Open verajosemanuel opened 3 years ago
Followed installing instructions
Which command did you run?
Vim and NeoVim commands as documentation states:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
and
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
SOLVED
Fix with a pretty convoluted workaround reading the:version
info output
Seems that VIM root folder in WSL is/
instead of $HOME
so placed the VIM config file in there inside a folder. Chowned to my user and then voilá. PlugInstall worked.
.vim/vimrc
Then NeoVim, reading :version
info the init file seems to be at
"$VIM/sysinit.vim"
Odd enough, that folder in WSL is the $HOME
folder as in any other linux distribution
/home/user
So I created a file namedsysinit.vim
with all my configs and voilá. Working again....
we run curl -fLo ~/.vim/autoload/plug.vim --create-dirs \https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim and get the error:curl: (60) SSL certificate problem: self signed certificate More details here: https://curl.haxx.se/docs/sslcerts.html So how to solve it ?
Thank you this worked for me too.
Had to create sysinit.vim
in user\(username)\
folder. It worked
Neovim Windows 10
Edit: Although once I tried re-installing Neovim and vim-plug altogether and it worked fine without extra work.
I got same issue with vim on Ubuntu (WSL) and solved as below.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
As i run vim --version
we have the following output, then we know
system is reading .vimrc file in home folder
system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim"
then run following to create file if not yet have. cd ~; touch .vimrc
call plug#begin()
" Declare the list of plugins.
Plug 'tpope/vim-unimpaired'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
Key point is because we put the file in autoload folder, it only load the plugin if some function is called in the file. hence we call plug#begin() in .vimrc (mean if .vimrc empty, the vim-plug may not be loaded)
Below is from https://learnvimscriptthehardway.stevelosh.com/chapters/53.html
Autoload lets you delay loading code until it's actually needed. You'll take a slight performance hit overall, but if your users don't always use every single bit of code in your plugin autoloading can be a huge speedup.
Here's how it works. Look at the following command: :call somefile#Hello() ... vim will load autoload/somefile.vim....
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
I recommend that you keep it simple and call plug#begin
without an argument unless you want to install plugins in a non-default directory. i.e. call plug#begin()
thank you @junegunn , it would be more simple to call call plug#begin()
only.
Cannot use PlugInstall or any other command in Vim or Neovim for WSL2. (windows 10)
Followed installing instructions but I always get a message:
E492: Not an editor command: PlugInstall
vim version and nvim version below
Run :checkhealth for more info