简体   繁体   中英

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM