这是我的 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
:PluginInstall
它显示不是编辑器命令
我什至尝试过:PlugInstall
但它不起作用,你可以从上面的链接看到我的 vimrc 文件,我没有发布,因为它太混乱了
您的 .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