Is there any way to use an instance of vi/vim on a remote server to edit a local file?
Something along the lines of:
cat $local_file | ssh -t $remote_server "vim -" > $local_file
[I’m using the code above only to simplify and illustrate the intent of the question]
I know that I can go the other way and edit the file from the remote_server using vim + scp, but I was curious if it could be done in this direction as well.
You can use this kind of command :
vim copy the file in local /tmp in a file like
/tmp/v7MZ6yF/0in the background.