first time asking question here. I have been using [N]VIM a lot over last few months and really enjoying it so far. But have been struggling to get a particular editor layout setup and starting to think it may not be possible in [N]VIM.
I have been reading up on Buffers, Windows, Tabs, Tab Pages on web and SO (a few of the references I read are below) and makes sense but missing answer I was trying to achieve which is why I am starting to wonder if possible.
What I would like is to be able to split on window to have "buffer_1" and "buffer_2" visible as splits. Then be able to switch to another buffer "buffer_3" (using :bn or :tabn or whatever works). When "buffer_3" is visible I should no longer see "buffer_2" as a split. But if switch back (using :bp or :tabp or whatever works) I would like to see "buffer_1" and "buffer_2" together as splits again.
To put it another way, I would like the window or viewport to be split for a single editing pair (in a tab page?) but not have every viewport split such that switching to other files are also showing the split.
The most desired use case for this:
- Step 1: I would like to open a source code file on left split and matching unit test file in right split (for TDD)
- Step 2: Then be able to switch to another file to look something up (ex: definition of a function). That switched view should not need to be split. Or if it was split it should be split with its' own matching unit test file, not the ones in Step 1.
- Step 3: Switch back to the original two files I was doing TDD and still see my original splits. Able to continue the TDD session.
Is this possible? Or am I just trying to go too far from "The VIM Way". It does seem like a decently useful workflow to be able to switch files and always have a companion split showing the related test file auto-magically.