I have seen these examples before. I give a try! I see 1.0.12 has macro example
But yes, scanning the macro tiddlers is a bit complex as there are flexibilities in defining macros.
So as I explained above I thought to use data tiddler.
Your color: example is a good point to start. We can use the same strategy for example typing << or macro: triggers macro autocompletion and selecting list-links inserts <<list-links tiddler:"" field:"" emptyMessage:"" type:"ul" subtype:"li" class:"" itemTemplate:"">>
Thank you, sir. I can confirm mouse operation is as expected and advertised. I have made the decision to start using your plugin day-to-day instead of edit-comptext. The biggest selling point for me is the ease of configuring additional triggers. Very well done. Looking forward to seeing more of your work!
Thank you from another former edit-comptext user! I doubt it was one of your intended use cases, but I’m also seeing a lot of potential for building a custom autocorrect. I use a handful of proper nouns with non-keyboard characters, and I’m really looking forward to never needing an alt-code again.
Indeed, a lot of the palettes have terrible contrast in certain circumstances – I talked a little about it in this Issue I raised. I can’t really do anything about it, my best suggestion is to tweak the colors of the palette…
… Or I guess I could also add an option to toggler between using background color for selection and maybe outline CSS property. Hmm.
Thank you! I also have another plugin that’s as polished as this one called Task List which I am particularly proud and fond of, but its usability is not as general as this.
I didn’t but that’s why I made it so generic – so that it can be used for wild purposes! A word of warning: typing might slow down a little if you have hundreds of triggers, particularly if you use Code Mirror, and the options UI isn’t really suited for that many triggers. I hope you plan to either have only a handful of them or have a generic one that uses a dictionary as a data source and is triggered by something like fancyword: or something
@Zheng_Bangyou
I remember you adopted autocomplete from TW5-extendedit for Refnotes.
What do you think to switch from TW5-extendedit to Auto Complete which is much easier to configure for intermediate users?
@Maurycy Is it possible to configure the popup so that it automatically closes (without making a selection) when I type ]]? I’ve been doing a moderate amount of linking to tiddlers that don’t exist yet, and it’d be very handy if the popup could just get out of my way once I’ve closed a link.
I can’t hardcode it to react to ]] as the cancel statement because that wouldn’t be very flexible but I’ve been pondering this issue for a while. I’ve been thinking about these possible solution:
Distance from last valid suggestion: basically you define a number, and if you type that number of characters since getting “No results” then it automatically closes.
Cancel Triggers Filter: A filter that returns a list of triggers that, if detected, will cancel Auto Completion. This way one could define something like: [[ ]] [<rb>addsuffix<rb>] to automatically close suggestion if a space or ]] is typed (I’d expose <lb> and <rb> as variables that contain [ and ] respectively)
Perhaps both of them should be implemented.
A small hack you can use for now is if there are no results typing enter will (should!) just stop auto completion without anything being changed or inserted.
Fixed a bug where navigating through auto completion would still trigger TW’s keyboard widgets eg. navigating auto completion in sidebar search would also change selected search result
The list of suggestion can now be scrolled down using the keyboard.
Added caption to triggers to improve how they are displayed in the settings
Both were suggestions from @Mohammad posted on Github here and here.
Oh man, this is great! Encapsulate all snippets as Auto Complete This saves users from many scrolls up and down and or opening the editor menus and search.!
I am thinking we can also have a trigger for inserting images instead of clicking the image button on the editor toolbar…
This is very useful for new users. If these snippets were all included in the empty/basic edition it would help the onboarding process significantly.
Without understanding how this works under the hood, would it be possible to create table of content style or hierarchical pop-ups similar to how context menus can be created in this thread.
You know, one feature I was thinkin about was adding a context to the trigger – a filter that receives the type of the input in a few variables, <tag>, <classes> maybe something else. This could potentially be used without a trigger defined so you could use this to detect that you’re in Advanced Search and make it such that if you manually trigger auto complete even with nothing input it would open the relevant trigger.
Unfortunately hierarchical menus aren’t really possible with how things are written right now and I think it goes beyond the scope of this plugin.
It’s time to add a Roadmap/Future plans tiddler to my showcase and write down all those great ideas!