Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

Reuse an empty leaf if available #26

Closed iamrecursion closed 2 years ago

iamrecursion commented 2 years ago

Currently the plugin will always open its output in a new leaf, even if the current leaf is empty. This implements a small quality of life change that will open the output in an empty leaf and focus it, if one is available.

Vinzent03 commented 2 years ago

Hey thanks for your contribution. I want the opening to feel native to the rest of the app. What about simply removing the true from app.workspace.openLinkText(outputFileName, "/", true) so it opens the file in the current pane. This would take care of pinned leafs as well.

iamrecursion commented 2 years ago

Definitely a possibility, but I feel like utility things like this aren't usually wanted to open on top of whatever is currently active. What if I added a settings toggle for it?