Search in note

Article Image

Local search allows you to search within the currently displayed note. 

Alternatives

  • Pressing Ctrl+F while in a browser while not focused in a Text or a Code note will trigger the browser's native search. This will also find text that is part of Trilium's UI.
  • Pressing Ctrl+F in a Text note will reveal CKEditor's search functionality.
  • On desktop, pressCtrl + F.
  • From the Note menu, select Find in the row of icons at the top.
  • In Quick edit, both open a search bar at the bottom of the popup, for the note in the popup.

Interaction

  • Finding:
    • Fill in the Find in text… with the text to search for.
    • The search will be executed automatically in the background.
    • Use up and down arrows of the text box to navigate between results.
  • Replacing:
    • Fill in the Find in text… field with the text to replace.
    • Fill in the Replace with… field the text to replace it with.
    • Press Replace to replace only the current result.
    • Press Replace all to replace all of them at once.
  • Options:
    • Case sensitive – the search will distinguish upper case characters from lower case (e.g. searching for Hello will not match hello).
    • Match words - the search will find only exact word matches (e.g. searching for Java will not match JavaScript).

Results on the scrollbar

In a Text note, the scrollbar marks with a line where each result is, as long as the search has results, also when the note is short enough not to scroll. The line of the current result is thicker. The lines show in the desktop layout only.

  • Clicking a line goes to that result and makes it the current one. While the results are out of date, as after an edit of the note, the click only goes to that result, and the next Enter searches again.
  • The handle of the scrollbar shows the part of the note on screen, so the lines of the results on screen are under it. Shift+clicking the scrollbar brings that part of the note into view.

Included notes

In a Text note, the search also finds the text of the notes included with Include Note, in the order they appear in the note.

  • The text of included text and code notes, of embedded code files, such as a .js or .txt attachment, and of drawing canvases is searched. The title of an include and the content of other notes, such as a collection or an included Canvas note, are not.
  • A result in a drawing canvas is highlighted on the drawing. The canvas moves only to show a result outside its view, and moves back once the search moves on, unless it was moved in the meantime. In a note being edited, closing the search on such a result leaves the canvas there and, while the canvas is editable, selects the text of the result.
  • The up and down arrows move through the results of an include as through the rest of the note.
  • A result in a collapsed Expandable include expands the include while that result is the current one, and collapses it again once the search moves on.
  • Replace and Replace all change an included note only while its Editable button is on. While the current result is in an include that cannot be edited, Replace is disabled, and Replace all leaves such results unchanged. The text of a drawing canvas is never replaced.