Vim: How can I :cd to an sftp directory?

I’m currently an emacs user, but thought I would come back and take another look at Vim for fun.

My client machine is Ubuntu, and I frequently work on other ubuntu servers within my network, emacs and tramp is really nice in this regard, I can just connect to a file via sftp and then easily navigate to it’s parents/children/sibling, just as if I was dealing with a file on the local file system.

With Vim I can sftp to a file, but none of the navigation stuff works, when I use :e or fuzzy file search, vim still thinks I’m back on the client machine. If I try to :cd to the sftp directory I get an error.

Is there anyway I can get the same file/folder navigation regardless of whether I’m looking at an sftp folder or a folder on my client machine?

Cheers,

Chrsi

Answer

If you mount the SFTP folder in nautilus it will show up under ~/.gvfs and any app can access the files there.

Attribution
Source : Link , Question Author : ChrisInCambo , Answer Author : Ignacio Vazquez-Abrams

Leave a Comment