I want to keep my Vim and Emacs configurations under version control, but I don’t want my entire home folder there (or rather, I do, but there should be 3 separate repositories). With Emacs it’s easy; if ~/.emacs doesn’t exist, then ~/.emacs.d/init.el is used as the init file. So I can have a separate Git repo in ~/.emacs.d/. With Vim, it seems .vimrc can only exist in home folder and not in ~/vimfiles (the equivalent to ~/.emacs.d). Is this the best way to put .vimrc under version control?
I want to keep my Vim and Emacs configurations under version control, but I
Share
Perhaps moving your
.vimrcto~/.vim/and symlinking to home will do?Other, much more modular approach is to move your startup script to
~/.vim/plugins/, perhaps create a subdirectory there, and single or multiple init scripts: Vim will do a:runtime! plugin/**/*.vimwhen starting.