# Folder auto complete

**URL:** <https://community.silverbullet.md/t/folder-auto-complete/686>\
**Category:** Ideas\
**Created:** [July 19, 2024, 1:57am UTC](https://community.silverbullet.md/t/folder-auto-complete/686 "2024-07-19T01:57:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Maarrk](https://community.silverbullet.md/user_avatar/community.silverbullet.md/maarrk/32/56_2.png) [@Maarrk](https://community.silverbullet.md/u/Maarrk)\
**Post date:** [July 24, 2024, 10:11am UTC](https://community.silverbullet.md/t/folder-auto-complete/686/5 "2024-07-24T10:11:10Z")

</div>

> [@Trinkes](#):
>
> @Maarrk is there any particular reason to choose `shift + space` over `tab` for the autocomplete? is `shift + space` used for autocomplete in other contexts?

I didn’t use `Tab`, because besides auto-completion it is used to change focus between inputs. This is an accessibility feature, and I don’t have enough knowledge on the topic, nor someone to consult with, to risk breaking anything about it. There are already multiple requests for improving accessibility [#294](https://github.com/silverbulletmd/silverbullet/issues/294), [#295](https://github.com/silverbulletmd/silverbullet/issues/295), [#938](https://github.com/silverbulletmd/silverbullet/issues/938), that have had no progress for some time.

Regarding the choice of `Shift+Tab`: the previous shortcuts were `Enter` for “confirm”, `Shift+Enter` for “the other confirm”, `Space` for “complete folder”, so it seemed consistent to add `Shift+Space` for “the other complete folder”.

Also, some code editors use `Ctrl+Space` to open the autocomplete hint list, this seemed not far off. The only context where I found `Shift+Space` being used was to scroll the page up in web browsers (opposite of `Space`), but I decided that with the picker open it wouldn’t collide in any way.

> [@Trinkes](#):
>
> Another suggestion is to put the cursor at the end of the edit text after the auto complete. I also notice this behaviour when creating a new page and its name must be confirmed.

It is on the end for me after I press the shortcut, I can’t reproduce it. However I noticed that when using the up and down arrow to move around the list of suggestions the cursor jumps to beginning and end, respectively. Could this be what you are referring to?

> [@LumenYoung](#):
>
> That is pretty nice! But conversely I think it is also a possible solution (or more often used when I was using obsidian) is add command for moving an existing file to a folder (and allow folder completion here as well).

I see that it is related from the UX perspective, but for implementation this would be two different features:

- auto complete folder names in [Page Namer](https://silverbullet.md/Page%20Namer)
- auto complete folder names in `Page: Batch Rename Prefix` command (and maybe other prompts expecting a page name)

The complication here is that both of these places currently don’t have any list of options to select from (like Editor and Page Picker), so this would be a much bigger effort than just adding a shortcut. I’m not complaining, just explaining the reasoning why the feature seems “half-done” now

* * *

I noticed that I don’t have a way to do `Shift+Space` (or `Tab`) on the mobile, thinking about handling long press on an option the same way, just need to understand if that can be done reasonably easily.

---

_[View the full topic](https://community.silverbullet.md/t/folder-auto-complete/686)._
