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

Overview

Trilium-FindWidget

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

Video

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

Features

  • Works on code and text notes.
  • Whole word and case sensitive flags.
  • 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

Configuration Attributes

In the Text Note

  • noFindWidget: Set on the text notes you don't want to show the ToC for

In the Script Note

  • findWidgetDelayMillis: Number of milliseconds to wait from the time a key is pressed until the search is performed. Prevents stalls typing the first chars search word in long notes. Set to negative to force enter to be pressed in order to search. Default is 250
  • debugLevel: Enable output to the javascript console, default is "info" (without quotes):
    • "error" no javascript console output
    • "warn" enable warn statements to the javascript console
    • "info" enable info and previous levels statements to the javascript console
    • "log" enable log and previous levels statements to the javascript console
    • "debug" enable debug and previous levels statements to the javascript console

Todo

  • Refactoring, code cleanup
  • Regexp search.
  • Find & Replace

Discussions

zadam/trilium#2806

You might also like...

Tesodev-search-app - Personal Search App with React-Hooks

Tesodev-search-app - Personal Search App with React-Hooks

Tesodev-search-app Personal Search App with React-Hooks View on Heroku : [https://tesodev-staff-search-app.herokuapp.com/] Instructions Clone this rep

Nov 10, 2022

Instant spotlight like search and actions in your browser with Sugu Search.

Instant spotlight like search and actions in your browser with Sugu Search.

Sugu Search Instant spotlight like search and actions in your browser with Sugu Search. Developed by Drew Hutton Grab it today for Firefox and Chrome

Oct 12, 2022

An efficient (and the fastest!) way to search the web privately using Brave Search Engine

Brave Search An efficient (and the fastest) way to search the web privately using Brave Search Engine. Not affiliated with Brave Search. Tested on Chr

Jun 2, 2022

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* 1kb). It can help you create instant search and/or facilitate n

Jun 16, 2022

Node starter kit for semantic-search. Uses Mighty Inference Server with Qdrant vector search.

Node starter kit for semantic-search.  Uses Mighty Inference Server with Qdrant vector search.

Mighty Starter This project provides a complete and working semantic search application, using Mighty Inference Server, Qdrant Vector Search, and an e

Oct 18, 2022

Allows users to quickly search highlighted items on Wikipedia. Inspired by the "search Wikipedia" function on the kindle mobile app.

Allows users to quickly search highlighted items on Wikipedia. Inspired by the

wikipedia-search Allows users to quickly search highlighted items on Wikipedia. Inspired by the "search Wikipedia" function on the kindle mobile app.

Aug 15, 2022

A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

A plugin for Obsidian (https://obsidian.md) that adds a button to its search view for copying the Obsidian search URL.

Copy Search URL This plugin adds a button to Obsidian's search view. Clicking it will copy the Obsidian URL for the current search to the clipboard. T

Dec 26, 2022

🟢 Music player app with a modern homepage, fully-fledged music player, search, lyrics, song exploration features, search, popular music around you, worldwide top charts, and much more.

🟢 Music player app with a modern homepage, fully-fledged music player, search, lyrics, song exploration features, search, popular music around you, worldwide top charts, and much more.

Music-player-app see the project here. 1. Key Features 2. Technologies I've used Key Features: 🟢 Fully responsive clean UI. 🟢 Entirely mobile respo

Nov 16, 2022

JqTree - Tree widget for jQuery

JqTree - Tree widget for jQuery

jqTree JqTree is a tree widget. Read more in the documentation. Features Create a tree from JSON data Drag and drop Works on ie9+, firefox, chrome and

Dec 22, 2022
Comments
  • Responsiveness

    Responsiveness

    Thanks for this feature Antonio!!

    When using this widget, I do notice lagging when trying to type/delete a keyword.
    Is there any plan to improve this in the future?

    enhancement 
    opened by finzzz 3
  • Not showing any search results if the

    Not showing any search results if the "Editable" property of a note is set to "Auto" and its length exceeds the automatic readonly size

    Peek 2022-06-07 21-32

    When a note's "Editable" property is set to readonly, your FindWidget does not respond to theCtr+F shortcut at all (which I don't blame you for), but if its "Editable" property is set to "Auto" and it is so long that Trilium puts it into readonly mode automatically, your FindWidget does show up upon pressing Ctrl+F but it does not show any search results, which may confuse users.

    I tried to find a specific segment in a very long set of lecture notes this way and was surprised that while Trilium's global search bar has picked up the relevant keyword but your FindWidget did not show any search results in the corresponding note. I began to think I was crazy until I noticed it was just a bug.

    opened by abstractionmage 1
Owner
Antonio Tejada
Antonio Tejada
Omnichannel Live Chat Widget UI Components offers a re-usable component-based library to help create a custom chat widget that can be connected to the Dynamics 365 Customer Service experience.

Omnichannel Live Chat Widget UI Components @microsoft/omnichannel-chat-widget is a React-based UI component library which allows you to build your own

Microsoft 14 Dec 15, 2022
TikTokLive-Widget: A socket client/server program that exposes a widget with alerts (such as gifts, followers ...) for a specific user streaming on Tik Tok Live platform

TikTokLive-Widget: A socket client/server program that exposes a widget with alerts (such as gifts, followers ...) for a specific user streaming on Tik Tok Live platform

null 3 Dec 3, 2022
Discard stdin input except for Ctrl+C

stdin-discarder Discard stdin input except for Ctrl+C This can be useful to prevent stdin input from interfering with stdout output. For example, you

Sindre Sorhus 13 Dec 17, 2022
"Jira Search Helper" is a project to search more detail view and support highlight than original jira search

Jira Search Helper What is Jira Search Helper? "Jira Search Helper" is a project to search more detail view and support highlight than original jira s

null 41 Dec 23, 2022
Bootstrap5-tags - Replace select[multiple] with nices badges

Tags for Bootstrap 4/5 How to use An ES6 native replacement for select using standards Bootstrap 5 (and 4) styles. No additional CSS needed! Supports

Thomas Portelange 75 Jan 9, 2023
Replace ansi escape sequences with tokens indicating what they are

Replace ansi escape sequences with tokens indicating what they are

Lily Scott 3 Mar 7, 2022
Easily add emoji support to your website! Replace keywords with emoji's :yum:

Emoji-Parser.js ?? A emoji parser to easily add emoji support to your website Show your support! Features: Use's the same style GitHub does! TON's of

Marketing Pipeline 13 Sep 9, 2022
It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm and toast with the library.

asteroid-alert It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm with the library. It has also e

Khan Md Sagar 4 Mar 12, 2021
A map for 1337 Khouribga's new labs clusters. This tool will help 1337 students find available posts, and search for other students in the cluster by name or login.

1337KH Labs Clusters Map Hellow. This tool is made by 1337 Khouribga students for 1337 Khouribga students to help make their lives at the school easie

Oussama 18 Aug 8, 2022
A personal semantic search engine capable of surfacing relevant bookmarks, journal entries, notes, blogs, contacts, and more, built on an efficient document embedding algorithm and Monocle's personal search index.

Revery ?? Revery is a semantic search engine that operates on my Monocle search index. While Revery lets me search through the same database of tens o

Linus Lee 215 Dec 30, 2022