Hacker News new | ask | show | jobs
by mangeletti 3562 days ago
I've never been more impressed by an editor than I am by Sublime. Literally everything about the editor is excellent[1].

My rule of thumb is:

    If I'm on a server via SSH, it's Vim. Otherwise, it's Sublime.
1. Actually... https://news.ycombinator.com/item?id=12553584 (sorry if you're a robot and just got stuck in recursion)
3 comments

If I have ssh access, I use sshfs to edit remote files with my local copy of Sublime. I also set up a Sublime build system that calls the compiler remotely over ssh. After I set my ssh config to cache and reuse connections, it adds virtually no overhead. Builds are one keystroke, errors show up in the editor just like normal, and small builds can still be done in just a fraction of a second.

The only problem with this setup is that sshfs is bad at recovering from network errors. If someone made a version of sshfs that could automatically reconnect after an interruption then this setup would be practically indistinguishable from working locally, even on moderately high latency connections.

You likely have already tried this, but in case you haven't: sshfs has a mount option -o reconnect which tries to be a bit more resilient about this sort of thing.
I didn't know that, thanks!
Isn't grepping files slow?
Well, using Sublime's find in files feature would be slow. Literally using grep would be fast if you do it on the remote machine over SSH.
I have to admit I was little worried about using Sublime because it was closed source and I had no idea how often it would phone home to say hello / record keystrokes, but I used it and was so impressed by how fast it was. It was an order of magnitude faster than Atom. I would set up a Samba share on a linux box, connect to it, and edit files. My linux box would be the server I would use and samba seemed to solve that ok. How is sshfs compared to Samba?
Not OP, but SSHFS is really nice. You can stand it up in basically one command, and tear it down similarly when you're done -- no need to worry about setting anything up on the server side as long as you have SSH access.
If you really wanted, you may be able to eliminate Vim from your workflow altogether: http://stackoverflow.com/questions/15958056/how-to-use-subli...
Only if you have a single, constant remote. I've used osx fuse + Sublime a lot. It's not perfect. If you change something on the remote through not-sublime, sublime doesn't pick up changes for a long time (rather, your OS doesnt, not Sublime's fault).

That said, decent for the day to day. If you're hitting moving target servers, docker, etc, you still need to have some basic vim or emacs or nano knowledge.

Really?! It doesn't check modified date on focus?
It's more that the Fuse doesn't get signals from the remote host, so if you change data on the remote then fuse won't pick up changes even close to immediately without a restart