scambier / obsidian-no-dupe-leaves

Automatically switch the focus to open notes instead of reopening them
GNU Affero General Public License v3.0
59 stars 5 forks source link

Override ctrl-click/middle-click #5

Closed felixchenier closed 1 year ago

felixchenier commented 1 year ago

Hello @scambier

Thanks for your plugin that keeps me sane :-)

However it seems to have stopped working on my Obsidian installation (version 1.1.9, macOS Monterey). Now, if I middle-click a link, it opens the page in a new tab even if it is already open in another tab, which is Obsidian's default behaviour. I tried disabling then re-enabling the plugin, but it didn't work.

Is it only on my computer?

Thank you and keep up the good work!

scambier commented 1 year ago

Well that's actually the intended behavior (as illustrated in the readme) 😅

But I might add this as an opt-in setting

felixchenier commented 1 year ago

Oh, you're totally right! Now I am super puzzled, because this was my initial need (no duplicate tab on middle click) and I really feel that the plugin fulfilled this exact need for a long time up to now (I didn't have duplicate tabs anymore). I must be wrong, but I'm so confused.

Yes, I think this would be a very interesting opt-in setting (at least for me, because it's the only feature I'm looking for). Thanks for the reply!

distbit0 commented 1 year ago

I'd def appreciate this feature as well! :) I rarely use my mouse so I almost always open links with ctrl+enter, which even with this plugin still opens them in a new tab regardless of whether they are already open.

Would be awesome to have this customisable or to make default behaviour for ctrl+enter to not create a dupe tab.

many thx

nevertoday commented 1 year ago

when I cmd + click any file , same name file still re-new tabs

scambier commented 1 year ago

Unfortunately, I can't differentiate between an explicit "right click > open in a new tab" and a "ctrl+click". Both events have the same outcome, which is signaling that the user wants to open in a new tab (the newLeaf option here). Sorry.