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

前端 未结 4 1852
挽巷
挽巷 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:20

    On Unix & Linux systems (and maybe Windows) Vim uses the $HOME environment variable to locate the .vimrc file and .vim directory. So you can cd into the directory where you have your custom versions and start vim or gvim like this:

    HOME=. vim files....
    

提交回复
热议问题