3 ms·
You can get this by editing files over sshfs. Been there, it's a kludge and tends to not cope well with network disconnects. Also when sshfs flakes out then it
by moe 16y ago
You can get this by editing files over sshfs.
Been there, it's a kludge and tends to not cope well with network disconnects. Also when sshfs flakes out then it has a habit of leaving you with 0-byte files.
Also note this doesn't fully address the problem.
I literally want to drag/drop into the current directory of whatever server I'm ssh'd into (possibly with multiple ssh-hops in between).
This has been possible in the 80's, it's called ZModem.
The server-side part is still in your favorite linux distribution (lrzsz). Sadly the client-side support has disappeared from almost all terminal emulators (Afaik only Zoc still supports it).
With Zoc you can just drop a file and it will send the ZModem init-string, which conveniently launches the 'rz' binary on the server. Likewise you can say 'sz file', Zoc will detect the init-string and open a download-dialog.
Forgotten technologies... not all of them were bad.
- tlack 16y agoI've also been frustrated by these issues. I want to be able to edit a file with local typing speed (i.e., gvim on Windows), but then be able to hit a key and be in a terminal window on that server in that folder to perhaps do a manual grep or rebuild an index or whatever. I feel like we were closer in the 90s with innovative products like Slirp and Term and, yes, Zmodem (and Kermit). I started trying to build out something like this based on vim's netrw stuff but it never really worked out. I'm not even sure if what I want is part of vim or if it's some nebulous other tool.
- __david__ 16y agoSounds like you want Emacs' tramp. On your local emacs, open a file in the form "/user@remote-ssh-host:file" and it will grab the remote file and edit it locally. Crazily all the emacs version control commands and stuff like M-x compile and M-x grep all work in the remote context. Very cool stuff. Obviously this requires that you use Emacs instead of Vim though. Don't be afraid though, the grass is pretty green over here :-).
- moe 16y agoNo need to switch to an inferior editor. ;-) Vim has this functionality built right in: http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw http://vimdoc.sourceforge.net/htmldoc/pi_netrw.html#netrw However, as said above, for me Tramp/netrw are kludges that tend to add more problems than they solve. A real solution can't be constrained to a particular editor.
- lukeschlather 16y agoIn my experience, tramp was even more reliable than sshfs. Both need work before they are truly effective solutions. Though the latency of my satellite connection outweighs the shortcomings of sshfs. The thing about tramp is that where sshfs hangs up directory listing and file loading, tramp regularly hangs up the editor. (And tramp should really turn off autosave by default.)