nothingislost/obsidian-hover-editor

Please make a shortcut control + file name clicking to open another file in default obsidian tab not in hover mode

Opened this issue · 11 comments

I have a file open in hover mode. Now I want to go another file from hover to a default obsidian tab. There is no way currently it is supported. Now proposed solution will be make a shortcut control + file name clicking to open another file in default obsidian tab not in hover mode.
Why is it needed?
I have table of contents that connect to database then it connect to md files. I want to open a file without opening database in default tab mode but hover mode. Then that database open in hover mode can open a file in default mode by just clicking control+ click.

So, I want a control + click md file name that will open it default in obsidian mode.
But control & Hover will open the file hover pop up mode.

pjeby commented

Have you tried turning off auto focus? (in the Hover Editor settings).

It doesn't help regarding autofocus.

pjeby commented

Then I don't think I understand what you're asking for. I thought you meant that when you mod-click you were getting the link opened in another pane of the Hover Editor.

I want control + click to be opened in another default tab of obsidian from hover editor not in another hover editor.

pjeby commented

Ah. I think I understand. I was confused because I thought you meant when you click a link that's not in a Hover Editor, but that already works.

While It makes sense to have an option to do what you're asking for, I don't know how we'd implement it -- the choice of where Obsidian opens links is complex, and many plugins have a say in it; there isn't any obvious way to tell Obsidian to look in the main area instead of the currently-active tab (which, when you click a link, is the Hover Editor).

So, if you want to open a link in a specific place, the easiest way to do that is to drag it to the place you want it to be. You can drag it to a specific tab, or you can drag it to the tab area to open a new tab. In the event you forget to drag the link and end up with a split hover editor, you can also drag the icon in the view header of the new pane to move it to a different tab, split, or window. (You can turn on the option to show the view header by default, or click the boxed-triangle icon in the hover editor's title bar.)

Second this. I would like to pin a hover editor (daily note) and then navigate from there as needed, but currently impossible to do with Hover editor as any file open / search command will just replace the daily note.

@catacgc I can't reproduce what you're describing. Are you using Obsidian's "Toggle Pin" command? Pinning the hover editor is not the same as pinning the content of the hover editor. Unfortunately, Obsidian's content pin status is not visible in a hover editor because it only appears on tab headers -- if you convert a tab to a hover editor and vice versa you can easily see the pinned status and change it by right-clicking. Unfortunately the option to pin no longer appears in the view header menu.

Probably your simplest workflow would be to 1) open daily note in new tab, 2) pin (right click tab, pick pin, or use toggle pin command) then 3) convert to hover editor (right click tab, or use "convert active tab to hover editor" command). Links you click will then open in the most-recently used unpinned tab (or hover editor).

Tested and it works. Would be cool if this had it's own shortcut (or ability to sync pin status for the hover editor with the pin status of the content)

Another option (no pun intended) might be to have an option in the settings to auto-pin the hover editor content, perhaps named something like, "Open hover editor links in most recent tab".

This would my preferred option, indeed