Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Previously I've been using vim without any problems. However a few months ago our company made some network and security updates. After that whenever I plug a network cable into my laptop, it creates a network shared drive "H" with my company name and when I try to open vim it doesn't load plugins and other things that are in my vim home directory.

I have found the reason but I don't know how to solve it. The problem is that these network updates changed our HOME directory. When I write:

echo $HOME

It prints H. Before plugging in a network cable my home was C:\Users\blabla.

How can I change my HOME variable? When I run set it prints:

C:\Windows\System32>set | findstr /R "^HOME"
HOMEDRIVE=H:
HOMEPATH=\
HOMESHARE=\\companyname\blabla\username$
share|improve this question

You can set HOME to whatever you like by

set HOME=h:\example_directory\ (or something)

(or go to Control Panel\System\Advanced\Environmental ... and create an enviromental variable of that name there)

but why not place Vim in some directory so that

\gvim
\gvim\_vimrc
\gvim\vim73\
\gvim\vimfiles

is your order of files & folders. That way if nothing is found at HOME it will still find the relevant files (it should).

share|improve this answer
2  
I can't change HOME because of it is used by other company applications. Are there any other options ? – mcaaltuntas Oct 13 '11 at 10:32
    
@mcaaltuntas - Put your _vimrc and \vimfiles according to the described scheme then (that is the "echo $vim" directory). All of this is described in the "help vimfiles" part of help. – Rook Oct 13 '11 at 14:05

You can put your vim files in a different place. My Ubuntu system gives me the following list:

   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"

Try putting the files in $VIM, which will probably be C:\Program Files\Vim or similar.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .