Is there an Editor Toolbar Icon to access user's favorite macros?

I admit I have a hopeless memory so never remember the macro codes when I need them and waste a lot of time tracking them down. Of course, a user can make a list of favorite macros in a tiddler for reference.

I wondered whether there is a plugin to create an Editor Toolbar Icon that the user can populate with their favorite macros? Clicking the icon to present the favorite macros list and selection pastes the macro in the tiddler.

This may exist but searched Tiddlywiki forums, many Tiddlywiki plugin lists and Google searches and not found a solution.

If it exists it would be great to know about it and appreciate a useful link. If it does not exist then maybe someone will one day make such a plugin. I saw the insert signature discussion but suspect a bit beyond me to make the user populated list function adaptation.

You can do this using the “insert snippet” Editor Toolbar button (4th from the right, next to the “insert picture” button).

enjoy,
-e

2 Likes

I would recommend AutoComplete from @Maurycy.
It has trigger for macros autocompletion.

Oh such good advice!
Aslo a little embarrassment on my part! Been spending a lot of time on TW5 lately to make my own use TW5 file for basis of a number life subject tiddlywikis. I must have skipped checking out the snippet icon. Sort of missed the good tree in the vast forest of icons and tools.

Also very interested in the AutoComplete tool.

So thanks for your fast replies and now changing my ToDo list for today to get into those two tools.

I suppose I am working towards one but it takes a particular approach.

  • The following is what I am up to so let me know your thoughts @seasamin

So far my solution is a “Wrapper”, an Editor Toolbar button which you first select some “text” (optional) then click a button, you then type a macroname or select it from previously entered list eg; macroname. and click another button will result in <<macroname "text">>.

Snag_11827b

  • The list of macros builds in the wiki as you use it.

I have similar buttons for HTML and widgets
Snag_12a82f

However where I plan to take this includes the following;

  • Allowing the prefix to be substantially different from the suffix
    • eg <$list filter="">selection<$list> <$list filter="selection"><$list>
  • To do this I need to create a seperate tiddler for each “operation” to give it a full title, descriptions and possibly options.
    • Then we can develop and share the different wrappers.
  • Create a new item method like with the snippet tool

What do you think?

Thank-you for your interest TW_Tones.

At this stage I am using Snippet icon plugin via snippets icon in the Editor Toolbar as mentioned by EricShulman. I am just doing one liner simple macros for new snippet list item choices. When you click the icon and select “Add your own” it creates a system tiddler like the plugin installed shadow tiddler $:/language/Snippets/ListByTag. I give it a tiddler name like the shadows such as $:/language/Snippets/TiddlyTables for a Table macro and it takes same tag as the shadow tiddler $:/tags/TextEditor/Snippet. Then added the table macro in the text area and set the field caption to the last part of that tiddler name but as a phrase “Tiddly Tables”. This added the macro to the snippet list options and works fine. I also tag each snippet tiddler created this way as MySnippetMacro to keep track of them.

I am still looking also into the AutoComplete plugin.

I can see your idea would assist users to easily create additional Editor icons/buttons for other macros from tiddler text and perhaps faster as well. Perhaps it could assist even to make related groups of insertions to add to another icon/button to avoid the current risk of the snippet icon list getting overwhelming with long lists. I am sorry I am not much of a coder to help on coding design but happy to test a version when it is ready and give my feedback on usage.

1 Like

Hi @seasamin,
I built the wrappit-drowdown for this usecase. You can replace the snippet dropdown with a version where the buttons can wrap the selection with a macro.
The best is: you can put the macros into the button-tiddlers.

I think all macros are acturally Variables, so editor can list all accessible variables in a list, for user to click and place to the input.

Interesting idea but there are so, so many, yet at the same time many that will not be visible within the edit process. Perhaps as a way to nominate those we want included in a dropdown or add a search mechanism.

2 Likes

I found my question on GitHub discussion