Tyler Eaves wrote:

Dotan Cohen wrote:

>> 2009/2/16 Tyler Eaves <[email protected]>:
>>>
>>> Hi - I'm currently considering VIM as my editor. My work mainly
>>> consists of working with files over mounted remote filesystems (sshfs
>>> via fuse, transfer is decent, ~200KB/sec, but latency is certainly
>>> non-zero), and I'm having so issues getting them to work reasonably.
>>> Using local swapfiles helps some, but things are still very slow.
>>> Turning off MatchParen helps some, but it's still noticeably "laggy".
>>> Also, I like having autochdir set, but again, when this is set to a
>>> location on the remote FS, vim really doesn't like it.
>>>
>>> Any suggestions? (The files being edited are mainly php source files,
>>> and none are especially large, with the largest maybe 500 lines)
>>>
>>
>> If you use KDE then you can browse the remote file system in Konqueror
>> with the fish:// pseudo-protocol (SSH, really). You then open the
>> document in Gvim. Konqueror copies the file to tmp and when you save
>> it writes back to the remote system.
>>
>> You might even be able to get away with this in Konsole, I haven't
>> tried.
>>
>
> I'm running OS X, so unfortunately that won't work for me. Is it
> possible to get vim to open the file fully? It feels like vim is only
> reading it one screenfull at a time or so.


No, Vim reads the whole file in memory. But swap file (for crash
recovery) and backup can use the remote file system if you don't
inform vim to use another directory:

  :help 'directory'
  :help 'backupdir'

Maybe you have some script or autocmd which keeps accessing
the file system?

First thing to do, is to check whether it's slow with "vim -u NONE".
If it's fast, then you can try to comment things out in your ~/.vimrc
until you find out what it is.

Also, I don't know whether OS X has the equivalent of strace.
On Linux, I can run...

  $ strace vim foo.c 2> strace.log

Then in another terminal, I do:

  $ tail -f strace.log

... and I see all systems calls that Vim performs. If OS X has this too,
then you can find what kind of system calls access the remote file
system and how often.  It should give you previous hints.

I did it on my machine and it was interesting so see that I had an
autocmd, recently added in my ~/.vimrc, which did a stat64 every
few seconds:

:au CursorHold,CursorHoldI * exe bufnr("") . 'checktime'

I commented it out since I don't really need it.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to