view:unsplit semantics #287
Replies: 1 comment 1 reply
-
No, there is no way to remove just view 1, leaving views 2 and 3 in your scenario. Splitting a view replaces it with a new "node" that contains the original view and a new view. This results in something like a tree structure. Unsplitting a given view only removes the other "node" from the tree.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
eric1234
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand how view:unsplit works. Lets say I have the following layout:
Basically I have hit
<ctrl>-<alt>-v
to split in half. Then on the right half hit<ctrl>-<alt>-v
to split again giving me a total of three views. For each of these views how would I remove that view? My testing shows:_VIEW[1]:unsplit()
- this will close both view 2 and 3 leaving just view 1_VIEW[2]:unsplit()
- this will close view 3 leaving view 1 and 2_VIEW[3]:unsplit()
- this closes view 2 leaving 1 and 3The general logic that seems to be merging is whatever other pane is paired with the view I ask it to unsplit is what is removed. That other pane may just be a single view or it could be a whole tree of views.
In the above example is there a way to remove view 1 while leaving 2 and 3 (without just doing something like removing all views and rebuilding the layout without view 1)?
Beta Was this translation helpful? Give feedback.
All reactions