12

I am using Sublime Text 2.0.1, and unfortunately making it work with files distributed over sshfs is a pain - switch to other tab and go back makes Sublime checking if file has not been changed.

Are there any Sublime preferences or maybe sshfs mount options which can make my work over remote resources possible?

For now I am using following sshfs option (faster encryption):

-o Ciphers=arcfour
bluszcz
  • 3,776
  • 4
  • 28
  • 49
  • 4
    Finally I ended up with something like this: sshfs -o workaround=nodelaysrv -o cache_stat_timeout=600 -o uid=1000 -o idmap=user -o Ciphers=arcfour $1:/$2 /home/bluszcz/servers/$1 – bluszcz Sep 21 '12 at 12:00
  • what helped me was to open single files rather than the whole folder in sublime – mreq Mar 17 '13 at 20:22
  • Yes, but this is not what I want to achieve... – bluszcz Mar 18 '13 at 12:52
  • 1
    @bluszcz Thanks for the workaround, it seems to work OK. Hopefully somebody could find an even better one sometime :) – hifkanotiks Nov 02 '13 at 12:48
  • personally I found that rsub works best job: https://github.com/Drarok/rsub – bluszcz Nov 02 '13 at 18:52

4 Answers4

5

This is really more of a problem with SSHFS and FUSE-based file systems than Sublime Text.

If you want something a bit more robust and easy to use, you can try something that I've been working on called 'xeno' (https://xeno.io). I was similarly having problems with SSHFS (more to do with a shoddy connection than sluggish editor performance), so I put together this Git/SSH mashup as a replacement for SSHFS. It will allow you to open up files/folders in Sublime Text (or any local editor really) over an SSH connection, and automatically synchronize changes to the remote machine. You can even start your local editor from inside an SSH connection and have it continue to synchronize changes to the remote after you quit the SSH session. It should work on almost all POSIX systems (I myself use it from OS X to connect to Linux machines and edit files in Sublime Text).

What it does is generate an out-of-worktree Git repository of the files you want to edit on the remote machine, and then clones it locally and uses Git over SSH as a transport/synchronization mechanism. This does not interfere with any existing source control, and it also does not require you to use any existing source control. And because it's built on Git, it's extremely fast and supports automatic merging of files that might be changing on both ends, unlike SSHFS/rmate/rsub which will just clobber any files with older timestamps.

It's also free and open source :), and I'd really love some feedback.

havoc-io
  • 149
  • 2
  • 2
  • Thanks! As I said, I'm really open to feedback or feature ideas, so please let me know if you have any thoughts. – havoc-io Nov 03 '13 at 16:36
  • I downvoted - I don't like such advertisement - you have just created account and all post are about 'xeno' Regarding text editors some of them work ok with sshfs. Probably way how sublime refresh files. There is also http://sparkleshare.org/ which works really nice - but it is not an answer. – bluszcz Nov 03 '13 at 20:45
  • 1
    Well, I'm not rightly sure what the proper communication channel for such "advertisement" is, nor the harm in discussing something which is free in every sense of the word. I suppose its your thread though. A more succinct answer would have been that you're opening files on a virtual filesystem which relies on an unstable underlying connection, and your editor can't handle it well. Since your editor is closed-source, you're out of luck unless you can contact the developer and convince him to fix it. But that's not a useful answer... – havoc-io Nov 03 '13 at 21:43
  • Back some years ago [Komdo IDE/Komodo Edit](http://www.activestate.com/komodo-ide) were the only GUI apps that could handle files via sshfs well. You might wanna give them a try. There was also a hack for Textmate but I never tried it. – pstadler Nov 09 '13 at 12:17
  • @havoc-io Unfortunately this needs to be installed on both ends, something not possible in all circumstances when using SSHFS. – hifkanotiks Nov 10 '13 at 08:19
  • @havoc-io Yes, this problem has been reported for to devs. – bluszcz Nov 12 '13 at 11:54
  • @havoc-io Your https xeno.io link is broken, it says "Cannot GET /". When I use http, it forwards me to github, which I assume is what you want for https. – Tyler Collier Jul 15 '15 at 19:29
0

As @havoc-io said, this is mainly a problem of how ST2 listens to file system modifications. sshfs is simply too slow to handle the requests.

I'd recommend you to use a plugin like Sublime SFTP.

pstadler
  • 1,262
  • 11
  • 21
  • Sublime SFTP looks good, apart from the cost. Is there a free solution like it? Or can you enable the persistent connections it advertises on sshfs? – hifkanotiks Nov 09 '13 at 20:13
0

This:

{
    "index_files": false
}

in the settings of sublime helped me.

Victor Di
  • 636
  • 6
  • 13
0

To stop sublime text listening for file modifications and indexing files for goto definitions which slows down loading of folders, use these options. I use sshfs mounts and this trick worked great. don't forget to restart sublime text.

settings

{
    "index_files": false,
    "show_definitions": false
}
Akhil Jalagam
  • 585
  • 6
  • 18