Buakaw San
Buakaw San

Reputation: 95

GVim taking forever to load when connected to office network

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?

Upvotes: 1

Views: 209

Answers (3)

jamessan
jamessan

Reputation: 42667

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.

Upvotes: 1

Pierre-Antoine LaFayette
Pierre-Antoine LaFayette

Reputation: 24402

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.

Upvotes: 2

Tim Henigan
Tim Henigan

Reputation: 62168

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.

Upvotes: 1

Related Questions