vim PluginInstall 在 Linux 中无法运行如何安装插件

问题描述 投票:0回答:1

这是我的 vimrc 文件,位于 ~/ 文件夹中

注意:我使用linux(kali linux)

https://pastebin.com/i37cPUSK

我用这个安装了 vim 插件

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

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

iam getting this error 我尝试输入

:PluginInstall
它显示不是编辑器命令 我什至尝试过
:PlugInstall

但它不起作用,你可以从上面的链接看到我的 vimrc 文件,我没有发布,因为它太混乱了

vim vim-plugin
1个回答
0
投票

您的 .vimrc 可能已损坏。我建议删除它 (

rm ~/.vimrc
) 并使用 vim (
vim ~/.vimrc
) 打开一个新文件,然后从 Pastebin 的原始版本粘贴配置 (https://pastebin.com/raw/i37cPUSK)。

我刚刚在一个新的 Docker 容器中尝试了同样的操作,看起来效果很好。以下是有效的步骤:

# Download Ubuntu image.
docker pull ubuntu

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

# Install vim, curl, and git.
apt-get update && apt install -y vim curl git

# 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

# Open a blank .vimrc.
rm -f ~/.vimrc && vim ~/.vimrc

# Copy from https://pastebin.com/raw/i37cPUSK and paste into vim

# Reload .vimrc file (from within vim; otherwise just close and open again)
:source ~/.vimrc

# Install plugins.
:PlugInstall
© www.soinside.com 2019 - 2024. All rights reserved.