how do I get vim home directory?

Posted by nsharish on Super User See other posts from Super User or by nsharish
Published on 2010-03-15T05:11:40Z Indexed on 2010/03/15 5:20 UTC
Read the original article Hit count: 621

Filed under:
|
|
|

I wanted to set VIMHOME variable this way(common to windows and linux),

let $VIMHOME=expand("%:p")."/..",
so that VIMHOME is "~/.vim" in linux or "path/to/vimfiles" in windows.

I put this in a var.vim file and placed this in the plugin directory.
It loads properly, but VIMHOME is set only to "./..".
How do I get the full path of a file using expand?
Is there an easy way to set VIMHOME?

© Super User or respective owner

Related posts about set

Related posts about vim