obsidian-another-quick-switcher
obsidian-another-quick-switcher copied to clipboard
FR: Also include current file name in recent search
Hi, thanks for this great plugin!
For this feature request, first refer to https://github.com/tadashi-aikawa/obsidian-another-quick-switcher/issues/31.
Now, when I create a new note, I usually use "Another Quick Switcher : Recent search" (which I have bound to CTRL+SHIFT+O) and then type some words (and use Up and Down to select) and then type "TAB" from the quick switcher popup window to copy an existing title into the input text field of the switcher, then modifies the title slightly (using e.g. keyboard shortcuts like CTRL+Backspace or CTRL+Delete to delete words, and CTRL+Left, CTRL+Right, Home, End to navigate between the words. When the new note title is correct I press SHIFT+Enter to create a new note.
Often I want to create a new note with a similar name as the one I am currently editing. The problem is that the current file name (the one that I was editing when I opened the switcher) does not show up in the suggestion list in the switcher. So I cannot use TAB to copy it into the input text field at the top of the switcher. So in this case I need to remember the title of the current note (I usually have long note titles) and then manually enter the words of the new note (or paste them from clipboard) into the input text field.
It would be much simpler for me if the current file name showed up at the top of suggestion list, and I could use TAB to copy it like I am used to. What do you think about this?
if the current file name showed up at the top of suggestion list
I realized now that this might not be the best idea since "Recent search" would probably be used more frequently to open an existing file (than to create a new file). Then in that case it might be distracting to have the current file name pop up at the top of the suggestion list. So I consider some other ideas:
- the current file name is at the end of the suggestion list initially. The user needs to narrow down the candidate list by typing in the input text field, for it to show up, or
- the current file name does not appear in the suggestion list, but instead a special keyboard shortcut will paste the current file name into the input field, or
- a separate switcher is created for the purpose of creating a new file name (as opposed to opening an existing file). For example "Recent search (create file)". In this switcher, the current file name could appear at the top of the suggestion list. Then one can use one keyboard shortcut (bound to "Recent search") to open existing files, and another keyboard shortcut (bound to "Recent search (create file)" to create a new file.
Thank you for your FR, @hakonhagland :)
It would be possible to add the "Show current file" option to settings in "Search commands" 👍
It would be possible to add the "Show current file" option to settings in "Search commands"
@tadashi-aikawa Good idea! If "Show current file" option is active, should the current file name initially be at the end of the suggestion list? Or should it be at the beginning? If it is at the beginning it would conflict with using the switcher to open an existing file. Since then the user will not want to see the current file at the top of the list. On the other hand, if the user want to use the switcher to create a new file, it could appear at the top of the list. I think the user will use the switcher more often to open existing files (compared to create new files), so the file name should not be at the beginning. What do you think?
If "Show current file" option is active, should the current file name initially be at the end of the suggestion list? Or should it be at the beginning?
Depending on the setting of "Search commands". If you use "Recent search" (preset), it should be at the beginning.
I think the user will use the switcher more often to open existing files (compared to create new files)
I think so, too.
so the file name should not be at the beginning.
Unless users change the new option, "Show current file", it should not be at the beginning. So there should not be any problems.
My suggestion is similar to the following suggestion.
a separate switcher is created for the purpose of creating a new file name (as opposed to opening an existing file). For example "Recent search (create file)". In this switcher, the current file name could appear at the top of the suggestion list. Then one can use one keyboard shortcut (bound to "Recent search") to open existing files, and another keyboard shortcut (bound to "Recent search (create file)" to create a new file.
+1 on this