3 ms·
Wait, you can use scp as a protocol?!
by aidos 7y ago
Wait, you can use scp as a protocol?!
- Izkata 7y agoNot generally, but vim can: https://vim.fandom.com/wiki/Editing_remote_files_via_scp_in_vim https://vim.fandom.com/wiki/Editing_remote_files_via_scp_in_...
- fzil 7y agowow, that's incredible. learn something new everyday.
- d0mine 7y agoEmacs' Tramp supports multiple protocols https://www.gnu.org/software/emacs/manual/html_node/tramp/Quick-Start-Guide.html https://www.gnu.org/software/emacs/manual/html_node/tramp/Qu... For example, to run a remote command using an inline org-mode source block: src_sh[:dir /ssh:host:]{some command} Or to run code using a remote Jupyter kernel within Org-mode in Emacs: #+BEGIN_SRC jupyter-julia :session /ssh:ec2:/run/user/1000/jupyter/kernel-julia-0.6.json ... #+END_SRC https://github.com/dzop/emacs-jupyter/blob/master/README.org#remote-kernels https://github.com/dzop/emacs-jupyter/blob/master/README.org...
- TeMPOraL 7y agoOh, that remote execution is a neat trick. Thanks! To cover the more trivial point for the non-Emacs readers: Tramp in Emacs makes it so that there's almost no difference between opening a file (C-x C-f) like this: /home/user/some-file.txt and like this: /ssh:some-machine:/home/user/some-file.txt and like this, if you need superuser rights: /ssh:some-machine|sudo:some-machine:/etc/someconfig The subsystem in Emacs called Tramp makes this almost transparent; you edit your remote files as if they were local. There are occasional kinks with path translation in corner-case situations, like local Emacs editing remote source files and trying to load them into remote REPL, but those are rare and can be configured away. Dired (directory manager in Emacs) also works transparently over Tramp, so this essentially replaces SCP and graphical SFTP tools for me. You can even run GDB remotely over Tramp, which is a nice trick.