tags:

views:

53

answers:

3

When I load GVim from the Cygwin command line or when I'm not connected to the office network (mapped to U:/) it loads instantaneously. It takes a good minute or so to open when I'm on the network. What is going on here?

+2  A: 

You probably need to set your $HOME directory to something other than U:/. Create a $HOME environment variable for Windows that points to My Documents or whatever and it won't try and use U:/. You may need to log-off/log-in to pick up the changes.

Pierre-Antoine LaFayette
+1  A: 

You should check what your $HOME directory is mapped to in each case. I bet that it is different depending on if you are connected to the network or not.

Do you have any custom .vimrc or other config files read at startup? If nothing else, vim will query your $HOME directory to look for such files. If your network is slow, it could cause your problem.

See ":help startup" inside vim for more details on the startup process.

Tim Henigan
A: 

It might also be a good idea to set the directory and backupdir options so they prefer a local directory. Something along the lines of

set backupdir^=C:/Temp
set directory^=C:/Temp//

The ^= syntax puts the directory at the start of the list of directories for each option. The trailing // for directory tells Vim to encode the full path to the file being edited in the swapfile's name. This allows for swapfiles to be created in one directory when editing multiple files with the same name, but different paths.

jamessan