`Go NEWTAB` value to move already open tab next to current tab if found

I have the following File Displays > Mouse preference enabled:


("Single middle click to trigger file and folder")

The issue I'm having is that I'll sometimes middle-click a folder in a file display and seemingly nothing will happen because the tab is already open but simply out of view due to the number of tabs I have open.

My File Types > All folders > Events > Middle double-click is set to Go NEWTAB=findexisting,nofocus which is fine for me in all other circumstance, but the issue is that I have no clue of the pre-existing tab's tab bar position so I must scroll to find it.

Instead of being confused as to why nothing happened, trying again to ensure you did actually click it, then realising it's probably already open but it's just out of sight, then having to scroll to find it, provide a new Go NEWTAB value such as nexttocurrent. I couldn't find a pre-existing value which tackles this, or maybe there's something I've yet to think of. I'd prefer not to have to use a modifier key in this situation, but even with one, it'd still create a duplicate tab.

Assuming I've understood things correctly, I could then simply define Go NEWTAB=findexisting,nofocus,nexttocurrent. This would mean that whenever an existing tab is found, it will be moved next to the current tab, effectively resulting in the same behaviour as if opening a tab using middle-click which doesn't already exist. In other words: Since non-existing tabs open next to the current tab anyway, this value would just force all tabs to open like that. Depending on how Opus works, nexttocurrent and OPENINDEST/OPENINDUAL combined might be an issue.


Opus v13.0.49b

It should be possible to do that via scripting. Set the tab you want to move as a Command object's source tab and run Go TABMOVE on it with the appropriate index to move it next to the active tab.

1 Like

Not sure why I didn't think to try that. I'll give it a go!