Setting the viminfo path in gVim for portability (Windows)
Posted
by Will Vousden
on Super User
See other posts from Super User
or by Will Vousden
Published on 2010-03-21T11:46:00Z
Indexed on
2010/03/21
11:51 UTC
Read the original article
Hit count: 740
I'm trying to make my gVim installation as portable as possible, and in doing so I want to put the _viminfo
file in the $VIM
directory rather than $HOME
. I'm pretty new to hacking vimrc configurations, but here's what I've been trying:
let viminfopath=$VIM."\\_viminfo"
execute "set viminfo='1000,n".escape(viminfopath, ' ')
" Some other portability stuff.
set nobackup
set nowritebackup
if has("win32") || has("win64")
set directory=$TMP
else
set directory=~/tmp
end
This doesn't seem to be working, though; does anyone have any tips?
Thanks!
© Super User or respective owner