Auto Complete plugin 1.0.15 - Complete tiddlers, fields and your dreams

Couldn’t the dumpvariables macro be of any help ?

Fred

Internally the dumpvaraibles macro uses the variables filter operator to list all variables and macros, and then the getvariable filter operator on each variable to retrieve its contents.

Links:

Fred

Is this compatible with $:/plugins/tiddlywiki/codemirror-closebrackets?
I prefer to use Auto Complete , so Can Autocomplete also cover what $:/plugins/tiddlywiki/codemirror-closebrackets does?

1.0.6 is out:

  • If you use Auto Complete in a text area that is scrolled, Auto Complete window will now be correctly positioned.
  • If you use framed editor but the main window was scrolled, Auto Complete window will now be correctly positioned
  • Fixed incorrect placeholder for description field
  • Changed the default trigger slightly
  • Also: Showcase features a bunch new trigger examples

You absolute could, but keep in mind that’s 120 variables and macros inside an empty tiddlywiki. It might be easier to just manually list the macros…

… Or you can try using this new complicated trigger I wrote using the power of regular expression :slight_smile:.

Can you be a bit more specify where the pain point is? From what I see, close bracket just adds the closing brackets, as such if you for example want to have [[ as a trigger to insert [[$option$]] all you need to do to work with this plugin is to replace the template with [[$option$, though one thing it doesn’t solve is positioning the caret which is a bummer.

You got me thinking though - another feature that could be implemented would be an option for the trigger to have a “Delete Suffix Filter” which would be a filter that generates a list of options and if any of those options is found directly after the insertion point then they are removed. Probably needs a catchier name, Appendix Gobbler Filter perhaps?

Oh no, all the money I could’ve had D:

Fyi, the latest update contains two example triggers that use dictionary tiddlers as data source and a super complex filter that pulls the macros from your own custom global macros.

I guess I’m not doing something correctly as I’m getting

Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
TypeError: $tw.keyboardManager is undefined

Well this is embarassing. Can you tell me the following:

  • Did you get this error on the showcase site or after installing the plugin?
  • When did it happen/what did you do?
  • Which version of TiddlyWiki are you using?
  • Are you using some special setup like TW Bob? What other plugins are you using?

There is only one place where $tw.keyboardManager is used, when you hit ctrl+enter and checks if the keyboard shortcut matches. $tw is generally globally defined but it might not be the case in certain circumstances that go beyond my off-the-top-of-my-head knowledge.

1 Like

Well, if you type [ then the $:/plugins/tiddlywiki/codemirror-closebrackets will insert ] and for [[ you get [[]]. This prevent Autocomplete to trigger.

I check your proposal by replacing the template [[$option$ and back to you.

What I said is can we have only Autocomplete installed and abandon the $:/plugins/tiddlywiki/codemirror-closebrackets?

That’s curious, I assume you mean it prevents the automatic autocomplete triggering but if you hit Ctrl+Space it works? I’ll play around with it this evening and come back with solution.

I don’t think I can make this plugin cause closebrackets to be fully redundant since their purpose is different, but I am sure I can make them play nice together.

Hi @Maurycy, thanks for your comments… in the order you asked

  • I installed the plugin into my TW – click drag and drop the link from Evidently Cube TiddlyWiki5 Plugin Showcase — All the TW5 plugins developed by me!
  • Just now - within the last 20 minutes or so
  • Version 5.2.3
  • I’m not useing TW Bob, just open the .html file on my computer in Firefox. Plugins are pinboard, BibTex, Core, FieldSearch, JSZip, KaTeX, Refnotes, Sidebar Resizer, Timelines, Twitter, Uni-Link, XLSX-Utils

I did, try it in a clean new version of 5.2.3 and everything seemd fine with out the JavaScript error so maybe there’s a conflict somewhere…

Many thanks, I hope this helps.

No it does not! I can repeat the test in an empty.html with CodeMirror + CloseBracket + Autocomplete

I see Autocomplete manual trigger works with CodeMirror + CloseBracket on empty.html
I investigate to see what other plugin on my side cause the issue!

By the way automatic triggering does not work when Close Bracket plugin is in use.

That helps a lot. I know it’s a lot to ask for, but if would be possible for you to send me a copy of your TW (even with all the tiddlers removed) it would speed thing up a lot for me. Feel free to attach it here or mail me at skellus@gmail.com. I’ll manage without if its impossible or would be too much work.

Now that’s weird. I’ll figure it out later today, thanks for reporting it.

I was wrong! ignore this!

Autocomplete manual trigger works with CodeMirror + Close Bracket!

I realize I need to press ctrl+space in [[]], what I did was to press ctrl+space for entries like [[B]], and I expected autocomplete for manual triggering filter entries started with B

I’ll work on this and remove the more private tiddlers… bear with me…

@Maurycy I’ve sent an email to you with my TW attached.

@Maurycy, Interesting behavior when Autocomplete is used with the Side Editor plugin. I get two selection windows (see screenshot), one position correctly and one off to the left. Note that they each have different fonts. The one on the left has the font my TW uses and the correctly postioned one doesn’t.

Prior to one of your latest releases, only the left selection window was present. I would like to the see right one only and it using the TW’s font.

Thanks again for a wonderful plugin!

It’s because there is no special logic for telling the auto complete window in which context it should appear, it’s just Show or Do Not Show. I don’t promise I’ll change this behavior, it’s harmless enough and it might prove to be a big pain to fix. I’ll take a look if I can get it fixed fairly easily.

I am more interested about this one though, I tried and couldn’t replicate it. The editor seems to always use the font I have defined in Control Panel → Appearance → Theme Tweaks → Font Family:

Are you perhaps defining custom CSS somewhere that could affect the font? Because in your screenshot the font used in window’s auto complete and in the header is the same:

1.0.8 is out:

  • Auto Complete now works gracefully with codemirror-closebrackets plugin
  • Auto Complete now only opens in the window in which it was invoked when using Side Editor plugin or just opening a tiddler in a new window

Should now be fixed in 1.0.8.

And so should this.


Man, working on this is FUN!.

5 Likes

Thanks @Maurycy. That fixed the positioning issue for sure. As far as the font goes, you’re right about what you polinted out. I may have a style somewhere that I’ve forgotten about or it’s a side editor thing. I’m going to look into that out of curiosity.

The only thing I notice now is that in the normal edit window, I can use the mouse to select a title, but I can’t in the side editor. The selection list disappears when I click the mouse. The mouse behavior is fine.

1 Like

Wonderful! Works like charm!