On OS X, I frequently need to edit files that are actually stored on a remote Linux server I connect to via SSH over VPN. When I'm at the physical of the location of the server, I can easily mount the directory of those files via sshfs and drag them into Sublime Text. Reading and writing files will be almost instantaneous.

However, when I'm mounting the directory via sshfs on FUSE for OS X, loading the directory listings takes forever, and when I pull the entire directory into Sublime Text, then save a file, saving is blocking the entire UI until the file is finally saved on the server.*

I also tried opening the directory in Cyberduck and editing files from there. While the saving works nicely (because it's asynchronous), this has two drawbacks: I can only open a few files at once—not entire folders—and therefore cannot search files easily (like CmdT in Sublime). Also, sometimes it loses the connection and then I have to quit and restart Cyberduck to make it work again.

Is there any way to edit files from a remote machine in a non-blocking manner? Maybe through tweaking sshfs? Mounting the files differently?

What I'd really like is for the file to be transmitted in the background when I save it, without having the filesystem wait.

* This seems to be a known problem with Sublime Text, but I cannot use any other editor, really. I posted the issue on their forums as well.

  • Do you have the same problem with, say scp from the same source? Or is it specific to the local mounting of the shares? Nov 23 '13 at 9:53
  • scp is usually fast. I think the issue is a combination of Sublime Text with the underlying sshfs. I will try with a different SMB mount later.
    – slhck
    Nov 23 '13 at 9:55
  • Turns out SMB is much faster and doesn't block for as long. Since not everyone will have SMB available on the server, I will leave this question up, looking for solutions with SSH/sshfs.
    – slhck
    Nov 23 '13 at 10:01

If you haven't tried it already, I highly recommend Transmit. I haven't done direct head-to-head tests, but I was having a lot of issues using various FUSE options, and they've pretty much disappeared since I started using Transmit. It's got a great UI, including a little toolbar helper that allows you to mount shares as an OS X volume easily without starting the full program. You can try before you buy, but for me it was a no-brainer to buy. Yes, occasionally things are a little slow, but personally I think that for me it has more to do with some underlying issues I have with OS X than anything to do with Transmit itself.

If you're a registered user, you can try the latest build of Sublime Text 3 to see if that improves anything. Another option you can try is setting

"atomic_save": false

in your user preferences (Sublime Text -> Preferences -> Settings - User) so you're just performing a single save action over the SSH connection, instead of a save and move. Please note that this is a Sublime Text 3-specific feature.

Finally, if you feel like generating a thorough bug report, please open an issue on the unofficial bug tracker at GitHub/SublimeText/Issues. This is a community-supported resource that may or may not be consulted by Jon Skinner, the ST author, but it's a single place to file bugs and allows for much better tracking than the forums.

  • I was using ST3 all along, but you know what, disabling the atomic_save option increased the saving speed to less than a second compared to several seconds. Thanks! (By the way, the ST3 beta is already public.)
    – slhck
    Nov 23 '13 at 18:41
  • Glad it worked! I know the beta is public, but the latest builds at sublimetext.com/3dev require registration
    – MattDMo
    Nov 23 '13 at 18:48

This may or may not apply to you, but I discovered that the GitGutter plugin was the cause of my slowdown on sshfs.

  • Speculative solutions and helpful hints would be better as a comment. Save answers for definitive solutions.
    – fixer1234
    Mar 20 '15 at 18:35
  • Agreed, except for the requirement to have 50 reputation points to comment. That requirement makes no sense to me.
    – bdombro
    Mar 23 '15 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.