pjeby / pane-relief

Obsidian plugin for per-pane history, pane movement/navigation hotkeys, and more
223 stars 6 forks source link

Feature request: Ability to close pane from right to left like on browser #22

Closed nhan000 closed 2 years ago

nhan000 commented 2 years ago

Edit: TLDR is that I want the ability to close pane from right to left, or with the new number count, from highest → 1, when using hotkeys (default Ctrl w) to close the pane.

In my use case with Sliding Pane, I usually have one pane I use as a main reference on the left, and as I explore the connections, more panes are open to the right, when I'm done with referencing that line of thought, I close these newly open pane, get back to the main reference pane, and exploring another new line of thought by opening new different panes to the right.

The current implementation is that when I close a pane, the last visited pane become in focus, which usually is the main reference pane that I don't want to close, and I have to click to the pane that I want to close.

(I'm aware of the Close all other panes but it doesn't work for me because I usually have 2-4 panes that I don't want to close.).

pjeby commented 2 years ago

That's not quite how browsers work, as they usually go to the tab to the right first, if there is one. Your description is only accurate for browsers if you are starting at the last tab. Are you always starting at the last pane?

I ask because if I implement this, I'd prefer to make it (mostly) like the browser behavior. (Though with a browser there's the additional complication that sometimes closing a tab switches to the tab that opened it.) But I will consider other approaches if needed.

nhan000 commented 2 years ago

TLDR: Just make it like the browser behavior (the usual one, not the complication that closing a tab switches to the tab that opened it).

That's not quite how browsers work, as they usually go to the tab to the right first, if there is one.

You're right. Sorry I didn't even notice that ha ha.

Are you always starting at the last pane?

Yes. After reviewing around 8-10 panes I'll go to the rightmost one and then just close them down to 2-3 panes that I want to have open.

My thought process is that when I explore something I start at the reference pane and expand connections to the right. When I'm done exploring a branch I'll gradually close from the right most pane (the end of that branch of thought) until I found something else I want to explore and I'll expand a new branch to the right again. I hope this makes sense.

pjeby commented 2 years ago

Yep. Implemented in 0.2.6. Let me know if it does the trick.

nhan000 commented 2 years ago

Exactly as how I wanted it and how we've discussed. Thank you so so much!