obsidian-emoji-shortcodes
obsidian-emoji-shortcodes copied to clipboard
Better ordering of Emoji suggestions
First of all, I and very thankful for this plugin :star: . I enjoy using emojis in my notes as the small images make some content more easily communicated.
However, during usage of the plugin, I noticed, that the order of the suggesting emojis when starting a shoartcode :
is sub-optimal.
Consider these shortcodes: star
, heart
, x
and right
When using the first three, I expect, that after typing it out, the top-most suggestion is the most specific one corresponding to it.
e.g. for star
I expect the star
:star: suggestion to be top-most. However, we see a different list:
The same problem also appears with the other shortcodes.
This is less helpful, as sometimes we need to scroll down a lot to see the right emoji.
For the prefix right
, we get these suggestions:
However, I think it's better, when shorter completions such as arrow_right
, fist_right
and copyright
are higher prioritised than the other ones. Generally, if the suffix needed to complete the shortcode is short, then the emoji should be higher on the list.
And for the case of x
, if the emoji is short alltogether and has a relatively large matching with the prefix shortcode, then it should be also higher on the list.
Most other existing emoji shortcode suggestion lists seem to return, what I would intuitively expect. For instance, when writing an issue comment, the github emojis suggest this:
Could we have the shortcodes prioritised differently?
What do you think? :star:
If there is need, I could provide some help.
This issue relates to: https://github.com/phibr0/obsidian-emoji-shortcodes/issues/31
Also relates to https://github.com/phibr0/obsidian-emoji-shortcodes/issues/33, as one could also potentially list recently used emojis first.
i agree with this!
i think it should order the suggestions based on how close to start of the string is the query: (example)
query => :sta
sta
r
custa
rd
eight_pointed_black_sta
r
@phibr0 What do you think about all of this?