How can I override ~/.vim and ~/.vimrc paths (but no others) in vim?

前端 未结 4 1851
挽巷
挽巷 2021-01-31 04:56

Let\'s say I have a tarball of all my vim config - everything normally inside ~/.vim (plugins, autoload, colours, all that stuff), and a vimrc file. I extract this to a director

4条回答
  •  执笔经年
    2021-01-31 05:09

    My solution isn't quite the same but could be adapted pretty easily.

    I have my Vim setup on my workstation and it's shared through regular Windows file sharing. I have this batch file that I can launch from any other computer in the building (and there's an install of Vim on another network share since most workstations don't even have Vim installed). I just run this batch file and am in my happy place.

    set MYWORK=\\my_pc\work
    set RCBASE=%MYWORK%\personal\utilities\tom.
    
    start \\server\software\vim\vim73\gvim.exe -u %RCBASE%vimrc -U %RCBASE%gvimrc
    

    So basically the adaptation would put the batch file, shell script, or otherwise into the archive you're unpacking and launch the system vim with your local files.

提交回复
热议问题