noMAD
noMAD

Reputation: 7844

Can I make vim replicate file changes over ssh?

What I am trying to ask here is, say I have a repo cloned in a virtual machine and in my local machine. When I open a file from the repo in my local machine, edit it and save it, can I replicate that file state in the repo in my virtual machine as well? Basically, when I press :w I want to see the changes in my other repo without having to push my local changes to remote and then pull them in my virtual machine. I know some IDE's can do this but was not able to find if its possible via vim.

Upvotes: 0

Views: 53

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172608

My DuplicateWrite plugin hooks into :write to save the file to another location(s), too. If you mount your remote location or use the built-in netrw plugin via scp://hostname/path/to/file, you can therefore achieve this.

Upvotes: 1

Vitor
Vitor

Reputation: 1976

I think the feature you are looking for is "collaborative editing" and the only plugin I know of is CoVim. But I have not tested it, so can't vouch for it.

Upvotes: 0

Related Questions