你的.virc可能已损坏。我建议删除它(
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, 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