contact
----------------------------

Blog <-

Windows GVim FTP

I've spent an eternity trying to find out how to get gvim under Windows to open files transparantely over FTP. According to the manual, it's supposed to work like this:

:e ftp://[user]@[hostname]/file

But that didn't work for me. I thought I tried everything, but it just wouldn't work. Some red-coloured errors flashed by everytime I tried to open a FTP file, but I coulnd't read the errors because they were gone too fast.

Turns out I had to make sure of at least the following:

  • Don't forget to create a temporary directory c:temp or c:tmp, or some other path which is set in the 'directory' setting in vim (type ":set directory" to find out). GVim needs it to temporary store the file there.
  • Make sure the NetRW plugin is loaded.
  • When opening a FTP file, make sure you put a DOUBLE SLASH between the hostname and any filenames. For instance, I tried opening the file ftp://hostname/myfile.php, and it worked. But when I tried to open ftp://hostname/mydir/myfile.php, it failed! When I entered ftp://hostname//mydir/myfile.php, it worked again. Weird stuff but who cares? As long as it works, it's all fine with me.

I've got some more tips and pointers about the windows version of GVim. One of them is: "Don't use windows." ;-) Some other tips might be added to my vim page in the near future (where 'near future' in my dictionary is defined as 'somewhere between now and a vague and distant future).

Leave a Reply

You must be logged in to post a comment.