Linux – GVIM hangs when saving through GVFS’ FTP

ftpgvfsgvimlinux

I loved Gnome's Nautilus and FTP integration and being able to mount a remote FTP directory as a regular bookmark/directory, and double clicking any remote files to open in any unmodified program. I also loved editing text files with GVim.

However, if I double clicked file on Nautilus to open a text file in Gvim, then saving a file will take about 10 seconds and GVim will hang for that amount of time. The major irritant is that I cannot continue editing while the text editor is waiting for the write to finish, this delay interrupted my workflow and thought process and saving becomes a painful process. The other problem is that I don't think simply uploading a file should take that much time.

I'm aware of GVim's internal FTP support, but they are not as well integrated with Nautilus's FTP and it suffers from the same problem.

So a few question:

  1. Is there a way to make GVim or GVFS to save in background while I continue editing?
  2. Why is GVFS so slow? Is there any way to set GVFS to use a single persistent FTP connection instead of creating a new FTP connection each time?

I'm on Gentoo Linux x86-64.

Best Answer

Unfortunately I don't think you are going to find a solution to this, at least not easily. My understanding is that it is a function of the virtual filesystem - It blocks on writes until they have completed successfully or failed so that can be accurately reported to the application.

I have (like user55325) experienced this with Kate and SFTP, also with a number of other apps, it just seems to be the way it works.

Given that my VPN to work is quite slow I've had to give up editing files this way when working from home and I've had to resort to rsync for large projects.

Related Question