Nerdtree: Add NERDTree support for remote directories.

Created on 24 Jul 2013  Â·  19Comments  Â·  Source: preservim/nerdtree

It would be nice to be able to browse remote directories using NERDTree.

Something like this:

:NERDTree scp://user@host//a/b/c/

Most helpful comment

There is always SSHFS and FTPFS which allows you to mount a remote folder directly into your system and see it as a normal folder.

sshfs: sudo sshfs -o allow_other,default_permissions [email protected]:/ /mnt/workdir
then cd /mnt/workdir && vim

All 19 comments

+1

:+1:

+1

+1

+1

I see this is request was made nearly a year ago. Are there any news on this topic?
Because that would make NERDTree even more awesome!

This is a complicated topic - I would really need to do some testing to figure out how much work this involves.

At present I'm not seriously considering it - but maybe one day.

Personally, if I was going to do enough editing on a remote server that I wanted my own env, then I'd probably use sshfs.

Much of this is already implemented in netrw, which comes standard with vim
these days. Perhaps you can find a way to hook into that?
On Jun 29, 2014 11:41 AM, "Martin Grenfell" [email protected]
wrote:

This is a complicated topic - I would really need to do some testing to
figure out how much work this involves.

At present I'm not seriously considering it - but maybe one day.

Personally, if I was going to do enough editing a remote server that I
wanted my own env, then I'd probably use sshfs.

—
Reply to this email directly or view it on GitHub
https://github.com/scrooloose/nerdtree/issues/275#issuecomment-47458246.

+1

+1

+1

+1
@scrooloose any news?

+1

+1

I'm going to close this issue. It can be reopened if someone decides to take it on. @scrooloose has already stated that this isn't something he is considering, and I'd rather close it than let it linger indefinitely.

I know this has been closed forever ago, but lack of this one feature is why I'm currently hunting around every forum and trying to unlearn years of nerdtree, changing my keybindings and having to learn netrw and work around conflicting keybindings between my setup and netrw (which btw is a complete mess in comparison).

As remote work becomes more prevalent, this is a definitely a feature where nerdtree will continue to lag behind and I'm sure there are several other people in similar situation who had to go through this change because their remote setup is incompatible with nerdtree. Life would have been so much easier if nerdtree supported this like netrw already does.

It's 2020 and browsing remote directories is a feature that a file browser needs to support. Please re-consider your stance on this and if possible, please introduce a way to browse files in nerdtree via scp.

There is always SSHFS and FTPFS which allows you to mount a remote folder directly into your system and see it as a normal folder.

sshfs: sudo sshfs -o allow_other,default_permissions [email protected]:/ /mnt/workdir
then cd /mnt/workdir && vim

I did try sshfs and unfortunately sshfs is extremely slow when dealing with larger directories (with lots of files) on a server that's 250ms away (India <-> USA). Maybe it is a viable option for connections that are less than 50-80 ms, but over long distances sshfs is a no go. I did not try ftpfs yet, so thanks for mentioning that but I believe it would be similarly slow over longer distances accordingly.

Either way, I played around with netrw quite a lot and ended up in a loop of a few issues and hence eventually switched to VSCode which has native integration for editing files remotely on a server far away and is fairly quick. Sure it was a bit of learning, but the vim plugins on VSCode have gotten really good lately ( Shout out to VSCodeVim : https://github.com/VSCodeVim/Vim ). It's not ideal, but it's the most robust solution out there.

If working remotely over longer distances then VSCode remote might be the ideal solution since sshfs isn't a viable option over high latency connections.

I too am considering moving to VSCode for this one feature, but am loathed to do so. The fact that you can just use :edit to open remote directories for exploration should make it quite possible to add this feature.

Was this page helpful?
0 / 5 - 0 ratings