obsidian-switcher-plus
obsidian-switcher-plus copied to clipboard
Autocomplete filepaths
Is there any way to autocomplete the filepaths with a given hotkey?
For example, something similar to what was requested in the official forums:
https://forum.obsidian.md/t/auto-complete-path-parts-from-quick-switcher/34135
@Kamuish Thanks for the feature request. I'll take a look at that post.
Is there any update on the status of this feature request?
This is still in the backlog for possible future implementation, just haven't gotten to it yet.
Someone wrote a PoC and published it here. It is by far not perfect – again poc – and I am not sure which it interferes with Quick Switcher++ .
Thanks for the link! As far as I can tell that PoC just updates the search text prefix with the path from a specific user chosen suggestion. It doesn't seem to do what's being requested, the vault wide path completion using canonical path completion rules similar to a Linux shell. As is, I'm not sure how well it will work with Switcher++, but if it does part of work and it useful in your workflow then that's awesome 👍
Thank you for the follow-up, @darlal and @Syphdias . @darlal I am failing to see how that differs from a (simple) tab completion, but I will try to test it out and report back!
@darlal is right. The PoC is different than what the initial post suggested. There are multiple things different, but for example the PoC does no partial completion and just picks the next directory of the selected note or file. As an example you could have the note hay/stack/needle.md
and you search for "needle" and press tab to get "hay" (deleting "needle"). This is sufficient enough for my uses but indeed not what was suggested. I might even want to get "hay/stack/" after pressing tab, but this is my use case.
The PoC might be close enough for what you are after, too, @Kamuish. I was only searching for similar functionality in different Switcher plugins and stumbled over this issue. Later I found the PoC code and found it useful and thought I would mention it here. But it is different, has bugs (switcher does not update file list), and cannot be installed easily through the community plugins. Which is why I would prefer a project to implement is properly but this takes work of course.
Adding a hotkey to replace/insert the path of the currently highlighted suggestion into the Switcher textbox could be done, if that's would be helpful. A full implementation of path completion as described in the linked post likely won't be a near term item (though well-tested PRs are always welcomed!).