visini / obsidian-icons-plugin

Add icons to your Obsidian notes – Experimental Obsidian Plugin
188 stars 9 forks source link

Allow alias for icons #3

Closed minhthanh3145 closed 3 years ago

minhthanh3145 commented 3 years ago

Hi, first of all I think this is a nice plugin :).

I am using Obsidian to do all sorts of product-related tasks, one of which is user interviewing. I am thinking of using this plugin to quickly capture the context (emotions such as happy, sad) and their life (goals, obstacles, problems, workarounds) during user interviews.

For each of these I associate an icon, like this:

image

However, when I take notes during interview I probably will think of the term "background", instead of arrow up (which I associate with "background"). So I'd like a way that I can find/insert icons with their aliases. I believe this would simplify the learning curve so that I can adopt this plugin in my practice more easily.

Although most likely I'll just create mental shortcuts to deal with this, and in time I will no longer have a need for this particular feature, I think it's a value worth adding.

Thank you for your time and effort !

visini commented 3 years ago

Interesting use case, many thanks for going in detail. I will think about this some more - customizing both definition (e.g. defining a custom label for a button for referencing it in edit mode) and/or lookup (e.g. defining an alias for a particular icon to retrieve it more easily by searching for alias in the icon picker view) would require some additional config, but it would not be too difficult to implement.

visini commented 3 years ago

See new release

In your settings, add the following alias mappings (example, one per line, in the following format):

excited=ris:EmotionHappy
angry=ris:EmotionUnhappy
embarrassed=ris:EmotionNormal

Then, you can directly type (within single backticks) the respective alias, like so:

`excited`

For your workflow you can even abbreviate further, e.g.:

ex=ris:EmotionHappy
an=ris:EmotionUnhappy
em=ris:EmotionNormal

And the corresponding icon will be rendered in preview mode. Hope this is useful!