Trilium-FindWidget

Find in note Trilium widget to replace the crappy ctrl+f search.

Features

  • Works on code and text notes.
  • Hardcoded keys:
    • F3/ctrl+f, to start a search (you will need to disable ctrl+f shortcut in Trilium shortcut dialog box so the widget can receive it).
    • F3/enter shift+f3/shift+enter to go to the next/prev occurrence
    • esc or click on note to end the search and go back to the note
  • Doesn’t work on readonly notes, no firm plans to make it work there.
  • Tested on Trilium Desktop 0.50.3

Installation

  • Create a code note of type JS Frontend with the contents of FindWidget.js
  • Set the owned attributes (alt-a) to #widget
  • Set the owned attributes of any note you don’t want to enable finding to #noFindWidget
  • Disable Ctrl+f shorcut in Trilium options
  • Debugging output can be enabled setting the label #debug on the script code note.

Todo

  • Refactoring, code cleanup
  • Regexp, case, whole word search.
  • Find & Replace

Discussions

zadam/trilium#2806

Video

sandbox.-.Trilium.Notes.2022-04-22.15-41-19_rescaled.mp4

GitHub

View Github