3 ms·
I often ssh then open a vim on the server. But it would make more sense to me if vim had support for open remote files via its own ssh connection instead. Does
by tgb 7y ago
I often ssh then open a vim on the server. But it would make more sense to me if vim had support for open remote files via its own ssh connection instead. Does this exist (for vim or some other editors)? Then I could always use my local config and it would be easier to type on a bad connection.
- mercora 7y agoi don't know about vim but in emacs tramp mode allows this. However, you could just mount the remote filesystem via sshfs which makes it work everywhere (its slow though).
- switch007 7y agoEmacs supports e.g. /ssh:my.server.net:/path (with host name completion too e.g. /ssh:my.<tab>)
- Tistel 7y agoemacs is nice too in that if you are using tramp mode (/ssh:blah) to open a remote file you can create a remote eshell too. you can do diffs and merges between remote machines also. in the pre container/k8s days i worked at a place that did horizontal load balancing between 20ish remote VMs. the ability to have many eshell tiled on screen was so helpful. i also had some elisp that took advantage of tramp mode to very crudely do VM orchestration across the 20. i will shut up now because i don’t want to be that emacs guy.
- jenscow 7y agoTried sshfs? It mounts sftp.
- tgb 7y agoI haven't, I'll look into it.
- enriquto 7y ago> Does this exist (for vim or some other editors)? It does: vim scp://server//path Run :h netrw inside vim to learn all about editing remote files.
- tgb 7y agoThanks, this looks like what I want.
- demosito666 7y agoIf I'm not mistaken (on mobile now), you can do `vim scp://host//path/` and it will open netrw browser of remote dir.