3 ms·
If I’m reading this right, it’s “open a local vi(m) on a remote file”, by invoking a remote command. Is that right? I’m wondering how it’s different in effect
by darrenf 2y ago
If I’m reading this right, it’s “open a local vi(m) on a remote file”, by invoking a remote command. Is that right?
I’m wondering how it’s different in effect to just using
vim sftp://host/path/to/file
- __MatrixMan__ 2y agodoes sftp require configuration beyond what you've already got working if you're ssh'd in?
- darrenf 2y agoI mean you run that command locally. You aren’t ssh’d in, vim copies the file to a tmp location and you edit it, `:w` writes it back to the remote.
- throwaway314155 2y agongl didn't know vim supported that so conveniently
- freedomben 2y agoWow, I've been using Vim exclusively as my text editor now for 15 years and I did not know it could do this. Awesome!
- stvltvs 2y agoAlways learning something new with vim. For such a barebones looking editor, it's got a lot going on.
- akovaski 2y agoAlmost, down the page it says: vi Invokes gvim on your workstation, passing it an scp://... URL of the file(s) you wish to edit So it's just a more convenient way to launch local vim, doing something you could do manually. suvi is neat, and bcp seems like something that I'd actually use.
- cycomanic 2y agoSure, but that makes all the difference. I often work on an embedded remote machine with quite restricted vim (can't use a custom config, particularly no language packages). When I am on the remote machine (typically I have to run local commands), I often discover I have to edit a python file (typically just minor edits). So to use vim sftp://host/path/to/file I have to open a new terminal copy the path and then open using sftp. For me that interrupts enough of the workflow, that I just don't bother and instead just edit the file on the remote machine using the restricted vim.
- fwip 2y agoCan you install bcvi on that remote machine? (Genuine question - when I've been in similar situations, it also would have been a no-go to install a binary.
- cycomanic 2y agoIt depends, compiled binaries, no. If it's a shell script yes. Python or Perl maybe. But I agree ideally it would work by transferring a script (or aliases ...) across the ssh link and remove it afterwards.
- omoikane 2y agoLooks like it's all Perl: https://github.com/grantm/bcvi https://github.com/grantm/bcvi But it's not a single consolidated script.
- deleted 2y ago[deleted]