V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yazoox
V2EX  ›  Neovim

neovim 的设置文件或者插件目录,怎么设置成在 mac & windows 下面通用啊?

  •  
  •   yazoox · Apr 8, 2021 · 1832 views
    This topic created in 1849 days ago, the information mentioned may be changed or developed.

    这个是楼主的 nvim 的插件目录相关设置,在 mac 下面是正常工作的。但是,拿到 windows 下面,就不行了。

    if empty(glob('~/.vim/autoload/plug.vim'))
        silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
                    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
        autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
    endif
    
    " Specify a directory for plugins
    " - For Neovim: stdpath('data') . '/plugged'
    " - Avoid using standard Vim directory names like 'plugin'
    call plug#begin('~/.vim/plugged')
    

    手工先把 init.vim 拷贝到 AppData\Local\nvim\init.vim

    然后打开 nvim,结果一大堆错误,都是 plugin 相关的。我估计是路径设置不对。

    如果我把~/.vim 改成 windows 下面的比如 c:\users\yazoox\.vim 等等,那我得维护两套 init.vim 文件了......

    FurN1
        1
    FurN1  
       Jun 3, 2021
    不知道楼主解决了没。可以参见我的 dotfiles
    https://github.com/g6ai/dotfiles
    masOS, Linux, Windows 通用,设计和部署细节我写到里面的 Wiki 了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1025 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:11 · PVG 02:11 · LAX 11:11 · JFK 14:11
    ♥ Do have faith in what you're doing.