Autocomplete Menu for {{Variables}}
in the Command Field
#32
Replies: 10 comments 23 replies
-
Nice idea! In programming, these kind of context menus are generally called autocomplete menus. (Edit: Whoops, it's autocomplete, not autocomple) This is a good addition, and I'll have to see what it take to implement something like this. The best thing would be to find a ready made JavaScript component for this. And I can check if Obsidian's autocomplete menu can be invoked by plugins - but I'm not sure if it's public API or not. Things to consider:
Making something like this to work flawlessly and to feel natural, can require quite a bit finetuning. I'm willing to start thinking on this, but it won't be a quick addition. 🙂 Added 2021-11-23: In addition to autocomplete variables, a later version could also support a custom autocomplete list. That would be a file where a user can list what ever they want to be able to autocomplete, e.g. shell command names ( |
Beta Was this translation helpful? Give feedback.
-
Hello @Taitava !!!! Thank you so much for the reply and I’m glad that you liked!
Great!!!!! Now I learn how to write about this kind of feature. Thank you very much for this info (I’m always learning ....)
100% agree. It’s impressive to me the amount of details that needs to be considerate in a feature like this to run flawlessly.
I can imagine! ( I don’t even had courage to define this a Feature Request!) Totally agree with you. This a secondary feature that just improve a feature this works perfect right now!!! I’m pretty confident that finding good workflows for #17 and #16 is the best path at this moment. Because it has a groundbreaking impact for our community. I’m gonna change the title description to autocomplete menus :) Thanks again and have a great day!!!!!!!!! |
Beta Was this translation helpful? Give feedback.
-
Thanks! 🙂
Eventually, it will be converted to an issue, so it becomes a FR. It's useful, now it's only about the timing and implementation technique, that are yet unknown.
Yes, those plus #11 and #5 should be the top priorities for now. Which one of these four gets handled first, is just a matter of which one I happen to find a solution first. Then there are light workload issues like #27 and #30 that don't take too much time from the bigger ones even if they get implemented first. I just came across a plugin named Autocomplete. I haven't tried it yet, I just wanted to write it down here. I'll check how it handles the autocomplete menu and if there's any ideas I could borrow (with referencing the source, of course). |
Beta Was this translation helpful? Give feedback.
-
Actually, I'll create an issue for this now. I created today a project board here in GitHub, and it seems that there's no way to include discussion topics there. 🙁 Still, let's keep converstation here (if GitHub lets me convert this to an issue so that the this topic won't get locked), the issue will be a placeholder where I'll later add concrete decision when it's finally time to implement it. |
Beta Was this translation helpful? Give feedback.
-
Now that #43 is done, I think it also makes it a bit easier to make the autocomplete menu to suggest static arguments for certain variables, e.g. when a user is typing file_p, suggest |
Beta Was this translation helpful? Give feedback.
-
Obsidian
At this point it's an insider build, so it takes a few weeks until it's available to users who haven't bought Catalyst (including me). I might consider buying the Insider level Catalyst at some point, but not sure yet.
|
Beta Was this translation helpful? Give feedback.
-
I added one more idea to my first post:
|
Beta Was this translation helpful? Give feedback.
-
You are absolutely right @Taitava ! The tab will disappear and that way that is now is the best for the user :)
Absolutely ! I use the Variables section for two reasons:
So for the daily usage the autocomplete will fill 90% of our needs for the Variable Section :)
After reading all of your comment in this section I 100% agree with you. The meaning for SC autocomplete in very different from autocomplete in a .md note We just need to make it simple doing just like you described :)
After using VC is just feel that we could have in SC only this feature without any users setting :
Will be amazing !!!!! Just like we use the https://help.obsidian.md/Index when we have some doubt about a feature ! Let's keep talking !!!! Have a great day!!!! |
Beta Was this translation helpful? Give feedback.
-
I've now spent a few hours just by finding out what libraries there are that could be used for the autocomplete.
The library: kraaden/autocompleteBy a quick glance, this seems like something than maybe suits for this need. I'm not gonna explain it long, I'll rather give you a demo link: https://kraaden.github.io/autocomplete/ It even has grouping, so pay attention in the demo that when you type The layout of the autocomplete list will of course be different - mainly the colors will be based on the theme selected in Obsidian. This library requires me to program the actual text matching and replacing parts myself, which is good so that I'll have a lot of control over things. This is to say that if you'd like have the autocomplete feature changed somehow after you've had an opportunity to use it yourself, there should be plenty of room for me to make improvements based on feedback. |
Beta Was this translation helpful? Give feedback.
-
ReleasedJust for the record in case discussion continues, this is the point the feature was released. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@Taitava , It’s just an idea for us to talk :)
Add a feature that open a context menu when the user is writing
{{
in the command field{{variables}}
available in Shell Commands for an easy selection;}}
will be placed in the Command Field and the user continues to type.Beta Was this translation helpful? Give feedback.
All reactions