vim PluginInstall not working in linux how to install plugins

361 Views Asked by At

this is my vimrc file in ~/ folder

Note : i use linux (kali linux)

https://pastebin.com/i37cPUSK

i installed vim plug using this

curl -fLo ~/.vim/autoload/plug.vim --create-dirs

https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

iam getting this error i tried enter :PluginInstall it shows not an editor command i even tried :PlugInstall

but it's not working you can see my vimrc file from above link i didn't posted because it will be too messi

1

There are 1 best solutions below

2
H M On

Your .vimrc might be corrupt. I recommend removing it (rm ~/.vimrc) and opening a new file using vim (vim ~/.vimrc) and pasting the config from the raw version of your pastebin (https://pastebin.com/raw/i37cPUSK).

I just tried the same in a new Docker container and it seems to work fine. Here are the steps that worked:

# Download Ubuntu image.
docker pull ubuntu

# Start a new container.
docker run -it --rm --name ubuntu-vim ubuntu:latest

# Install vim, curl, and git, and tools to check/change line endings.
apt-get update && apt install -y vim curl git file dos2unix

# Install vim-plug.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

# Install jellybean (because you have it in your .vimrc).
curl -fLo ~/.vim/colors/jellybeans.vim --create-dirs https://raw.githubusercontent.com/nanotech/jellybeans.vim/master/colors/jellybeans.vim

# Remove any existing .vimrc file.
rm -f ~/.vimrc

# Download your .vimrc.
curl -fLo ~/.vimrc https://pastebin.com/raw/i37cPUSK

# Ensure correct line endings for Unix.
dos2unix ~/.vimrc

# Install plugins non-interactively.
vim +'PlugInstall --sync' +qa