I'm trying to move my
.viminfo file into my
.vim/ folder for cleaner syncing across multiple machines. (I have my
.vim stored on Dropbox, and then create symlinks to it from my home directory.)
So this morning, I found this answer on how to do just that. Great! Unfortunately, I use Windows at work and Mac at home, so
~/.vim is actually sometimes
~/vimfiles. As a result, a one-line solution
has now become a 5-line solution
if has('unix') set viminfo+=n~/.vim/viminfo elseif has('win32') set viminfo+=n~/vimfiles/viminfo endif
which just feels clumsy to me.
Is there some kind of default environment variable I can use to access the user-specific runtime path, à la
$MYVIMRC? Or is this something I just have to dance around?