1

Emacs has the scroll-all-mode, which scrolls two buffers synchronously.

I would like to edit about 8 files on 8 different hosts synchronously. This can be achieved by running vi in cssh. Is the same possible with Emacs using Tramp?

By editing files synchronously I mean that I type one word and the word gets inserted in 8 different files opened in 8 different buffers. And when I move the cursor, the point in 8 different buffers are moved. And when I mark a word, 8 words in 8 buffers are marked. And when I kill a region, 8 regions in 8 different buffers are killed. And when I save one buffer all 8 buffers are saved.

I know that I can copy the files with scp, but the files are not identical. Just some parts at different positions are equal.

  • 1
    How about using moccur to extract those common lines to edit and then C-o to occur-edit that buffer with multiple cursors? – Emacs User Mar 3 '17 at 16:28
  • 3
    It's not very clear what you are requesting. But if you just want to edit two different files, from different (remote) systems, that's what Tramp is for. You can use ediff-buffers to compare them. You can use Dired to visit a remote directory, etc. And what does your question have to do with scrolling? Why mention that at all, if you just want to know how to edit two files? – Drew Mar 3 '17 at 16:53
  • There is also emerge-buffers to merge them interactively. – NickD Mar 3 '17 at 19:27
  • @drew Editing multiple files means: I type one string and it gets added to multiple files. And when I delete one line it gets deleted from multiple files. – ceving Mar 7 '17 at 11:28
  • Put that information in your question. That is NOT what is usually meant by "editing two files". The question as it stands is unclear, and so risks being closed. And keep in mind that comments can be deleted anytime, so put relevant info in the question itself. Thx. – Drew Mar 7 '17 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.