Live data from Hacker News

Bcvi – run vi over a 'back-channel' (2010)

sshmenu.sourceforge.net

11–20 of 30 posts

Re: Bcvi – run vi over a 'back-channel' (2010)

#11
post #9

Earlier quoted context omitted.

does sftp require configuration beyond what you've already got working if you're ssh'd in?

I 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.

Wow, I've been using Vim exclusively as my text editor now for 15 years and I did not know it could do this. Awesome!

Re: Bcvi – run vi over a 'back-channel' (2010)

#12
post #9

Earlier quoted context omitted.

I 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.

Wow, I've been using Vim exclusively as my text editor now for 15 years and I did not know it could do this. Awesome!

Always learning something new with vim. For such a barebones looking editor, it's got a lot going on.

Re: Bcvi – run vi over a 'back-channel' (2010)

#13
post #6

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

Almost, 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.

Re: Bcvi – run vi over a 'back-channel' (2010)

#15
post #6

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

Sure, 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.

Re: Bcvi – run vi over a 'back-channel' (2010)

#16
post #5
post #3

Discussion at the time https://news.ycombinator.com/item?id=1406145

It's quite fitting as a vim using HAM (with a callsign username), that the top comment on that thread is also a HAM saying how you can also do this in emacs. The world changes all around us, and yet it's always the same.

Hams don't let hams upcase ham. :)

Re: Bcvi – run vi over a 'back-channel' (2010)

#17
post #3

Discussion at the time https://news.ycombinator.com/item?id=1406145

And the top comment is about Emacs. Yep, that's a vi post alright.

One of the reasons Emacs grew a fan base is that it had powerful features nothing else had. Sometimes decades before anyone else.

Re: Bcvi – run vi over a 'back-channel' (2010)

#18
post #6

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

Sure, 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…

Can 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.

Re: Bcvi – run vi over a 'back-channel' (2010)

#19
post #18

Earlier quoted context omitted.

Sure, 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…

Can 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.

It 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.
Post reply on HN