-1

It's nice to edit the same file from two different views. I use a vsplit for this, as described here, and it works well.

However, I'd like to have the two views open in different terminal windows, because I use a tiling window manager, and I've already got the muscle memory to switch between two open vims using the window manager's hotkeys. Also, it's easier to tell which one is focused, because I've set un-focused windows to become transparent.

I can open the same file twice, but then changes don't propagate from one process to the other until I save.

1
  • You might be able to get away with autoread and such, but it's unlikely to be perfect. You'll have fewer issues with a single Vim instance, or with one write and one readonly instance.
    – D. Ben Knoble
    Nov 3, 2022 at 13:41

1 Answer 1

0

Interpreting the linked Question & that Answer , we can see more about what you want :

Summary:  
   A buffer is the in-memory text of a file.  
   A window is a viewport on a buffer.  
   A tab page is a collection of windows.  

In your Case , the two terminals are 2 GUI Processes (eg xterm) , running 2 Shells (eg bash) which are running 2 vi Processes.
The 2 vi Processes DO NOT SHARE the in-memory text of a file.

Hence what you want is currently not Possible.
It may become Possible if (& when) vi gets the functionality to share the in-memory text of a file , eg through some IPC or memory mapping , though that would be buggy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.