Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open file in a new tab #118

Closed
tristone13th opened this issue Mar 10, 2023 · 15 comments
Closed

Open file in a new tab #118

tristone13th opened this issue Mar 10, 2023 · 15 comments

Comments

@tristone13th
Copy link

When opening a new file, it will replace the original file in the current tab, is there an option to open the URI in a new tab?

@Vinzent03
Copy link
Owner

You can use the openmode parameter https://vinzent03.github.io/obsidian-advanced-uri/concepts/navigation_parameters#open-mode

@tristone13th
Copy link
Author

You can use the openmode parameter vinzent03.github.io/obsidian-advanced-uri/concepts/navigation_parameters#open-mode

Got it, many thanks!

@tristone13th
Copy link
Author

@Vinzent03 During playing around openmode option, I found an issue when I'm using the following URI:

'obsidian://advanced-uri?vault=_posts&openmode=true&filepath=' + filepath + '&heading=' + heading

that it will open the file even the file is already opened, which is not consistent with the description in the documentation:

true opens file in a new pane if not already opened

@Vinzent03
Copy link
Owner

You are right, I've fixed the documentation now and fixed more openmode issues. I hope it works now more like you expect.

@tristone13th
Copy link
Author

You are right, I've fixed the documentation now and fixed more openmode issues. I hope it works now more like you expect.

Thanks for your contribution! I think the original documentation is ok, what needs to be fixed is to make the behavior consistent with the documentation, that is, open the file in a new pane only if the file is not opened, otherwise just focus on the pane will be ok, what do you think? :-)

@Vinzent03
Copy link
Owner

Previously it was inconsistent with writing and just opening. Theoretically there are two different open mode needed. For when the the file is already opened and for when it's not. I'm currently unsure how to handle that.

@Vinzent03
Copy link
Owner

Okay I've changed it now again, so that true uses the existing pane if possible and if you it to always to open in a new tab use tab.

@tristone13th
Copy link
Author

Okay I've changed it now again, so that true uses the existing pane if possible and if you it to always to open in a new tab use tab.

Many thanks! I found in the latest release that if the file is already opened, then the heading parameter won't work and it simply focuses on the file without focusing on the specified heading.

@Vinzent03
Copy link
Owner

Should be fixed now 😂 Thanks for reporting all these issues!

@tristone13th
Copy link
Author

Should be fixed now 😂 Thanks for reporting all these issues!

Thanks for your great work!

@distbit0
Copy link

Hi wrt "You can set a default value in the plugin's settings. The value from the setting gets overwritten by specifying it in the URI." from the documentation, how can this setting be configured? I can not see any such option in the obsidian advanced URI plugin settings. many thx! :)

@tristone13th
Copy link
Author

The openmode=true doesn't work again, @Vinzent03 could you check what's going wrong? Thx!

@Vinzent03
Copy link
Owner

@tristone13th What exactly doesn't work? Please share your uri and a minimal setup of your tabs. Works fine for me in a quick test.

@tristone13th
Copy link
Author

I use this URI: obsidian://advanced-uri?vault=tristone13th.github.io&openmode=true&filepath=Virtualization%2F2023-07-22-EPT.md&heading=EPT%20PTE%20bits%20illustrated%20%2F%20EPT%20format to open a tab in my local vault but each time I visit this URI, it will always open a new tab even if there is an existing one opened.

@Vinzent03
Copy link
Owner

Sorry for the late reply, but for me, it's working fine. Are you on the latest version v1.42.0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants