gvim is slow opening, saving, and scanning tags on a file across the network

32 views
Skip to first unread message

aj

unread,
Jan 3, 2008, 11:25:16 AM1/3/08
to vim_dev
I am running gvim on a windows box, version 7.1.

There are a series of coldfusion source files located on another
machine on the network. I have a shortcut to the network directory
containing these files on my desktop.

When I try to open one of these files using notepad, it opens
instantly.

When I try to open one of these files using gvim, it hangs for about
20 seconds before opening.

I get the same 20 second delay when saving files, and also when
attempting to do tab completion (scanning tags).

This happens 90% of the time, the other 10%, I get lucky, and it works
instantly.

I have tried disabling plugins and syntax highlighting, to no avail.

Any ideas?

Ingo Karkat

unread,
Jan 4, 2008, 1:55:55 AM1/4/08
to vim...@googlegroups.com, a...@bookac.com

VIM normally creates a 'swapfile' in the same directory as the edited file (cp.
:help swap-file). This file creation can take some time on a network share. Try
launching VIM with the -n argument (no swapfile), e.g. gvim -n
\\<hostname>\share\myfile.txt. If this fixes the problem, you can selectively
disable swapfile creation for this network share (but keep swapfiles for local
files) by setting up an exception in your .vimrc file:
autocmd BufReadPre //<hostname>/* setlocal noswapfile

-- regards, ingo

/^-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --

Ben Schmidt

unread,
Jan 4, 2008, 4:07:30 AM1/4/08
to vim...@googlegroups.com

Also see

:help 'directory'

which you can use to store swapfiles for remote files locally for safety.

Ben.


Send instant messages to your online friends http://au.messenger.yahoo.com

AJ Mieskolainen

unread,
Jan 4, 2008, 6:42:59 PM1/4/08
to Ingo Karkat, vim...@googlegroups.com
I tried adding this setting to my _vimrc (on Windows), to no avail. I still
get the massive delay.

Thanks for your insight, though. Very much appreciated.

-AJ

drc...@campbellfamily.biz

unread,
Jan 4, 2008, 8:21:15 PM1/4/08
to vim...@googlegroups.com
Quoting AJ Mieskolainen <a...@bookac.com>:

>
> I tried adding this setting to my _vimrc (on Windows), to no avail. I still
> get the massive delay.
>
> Thanks for your insight, though. Very much appreciated.

Try

gvim -u NONE -U NONE -X -n somefile

That'll start gvim up with no plugins, syntax, etc, no X clipboard, and no
swapfile writing.

Regards,
Chip Campbell

Reply all
Reply to author
Forward
0 new messages