Auto-complete for citing reference and at colleagues

This would be the biggest improvement to use TiddlyWiki for my daily work. After searching auto-completion in this forum, I found the plugin edit-comptext by @snowgoon88 in this link (Auto-complete in core), also notice the discussion with RefNotes (Refnotes and auto-completion).

I also imported all my references from Zotero into Tiddlywiki and create a page for each of my colleagues.

After configuring edit-comtext in $:/plugins/snowgoon88/edit-comptext/config, I can easily cite a reference and create a link to colleague in tiddler.

{
      "pattern": "//",
       "filter": "[tag[bibtex-entry]!is[system]!has[draft.of]]",
      "start": "<<ref ",
      "end": ">> "
}

Just typing two forward slashes, then last name of first author, I can easily find the reference and create the ref macro.

 {
      "pattern": "@",
      "filter": "[tag[Colleague]!is[system]!has[draft.of]]",
      "start": "[[",
      "end": "]]"
}

Now just typing @ and a few characters of my colleague to create a link.

Another useful tip is to quickly add snippet into tiddler with this configuration. All my snippets are defined with prefix $:/snippet/.

 {
      "pattern": "..",
      "body": "[tag[$:/tags/TextEditor/Snippet]]",
      "mask" : "$:/snippet/",
      "start": "",
      "end": ""
}

Animation2

10 Likes

Wow, these are great

I defined two more shortcuts for narrative and multiple references in RefNotes.

Just type // for normal reference, /n for narrative, /m for multiple reference and search for items.

refnotes

    {
      "pattern": "//",
       "filter": "[tag[bibtex-entry]!is[system]!has[draft.of]]",
      "start": "<<ref ",
      "end": ">>"
      },
     {
      "pattern": "/n",
       "filter": "[tag[bibtex-entry]!is[system]!has[draft.of]]",
      "start": "<<ref ",
      "end": " n>>"
      },
     {
      "pattern": "/m",
       "filter": "[tag[bibtex-entry]!is[system]!has[draft.of]]",
      "start": "<<ref ",
      "end": " m>>"
      }
2 Likes

Does this also work with CodeMirror plugin?

I think Edit-CompText plugin does not work with CodeMirror.
But if you have installed it, then you can follow instruction from Edit-CompText Demo — a demo of the Edit-CompText plugin for TiddlyWiki5 (snowgoon88.github.io)

in $:/ControlPanel -> Advanced -> Editor Type -> text/vnd.tiddlywiki you must chose comptext instead of text .