代码之家  ›  专栏  ›  技术社区  ›  MdNihal05

vim插件安装在linux中不工作如何安装插件

  •  -1
  • MdNihal05  · 技术社区  · 2 年前

    这是我在~/文件夹中的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文件,我没有发布,因为它太混乱了

    1 回复  |  直到 2 年前
        1
  •  -1
  •   H M    2 年前

    你的.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
    
    推荐文章