Skip to content

feat(notes): search notes with VS Code's search - #97

Merged
dionmunk merged 1 commit into
masterfrom
feat/search-notes
Oct 7, 2026
Merged

dionmunk merged 1 commit into
masterfrom
feat/search-notes

Conversation

@dionmunk

@dionmunk dionmunk commented Oct 7, 2026

Copy link
Copy Markdown
Owner

There was no way to search inside notes (#17). VS Code's Find in Files only covers the workspace, and notes usually live outside it.

Changes

  • Notes: Search Notes in the command palette opens VS Code's Search view limited to your notes: Workspace Notes and Notes when the workspace has notes, otherwise Notes.
  • A search button in each section's title bar searches that section (title bars now read New Note, New Folder, Search, Refresh).
  • Search in Folder in a folder's right-click menu searches that folder.

The folders go into "files to include", so everything Search offers works on notes: regex, match case, replace across notes, and results grouped per folder.

What I checked before building it

A probe extension ran workbench.action.findInFiles in VS Code 1.140 with the notes folder as filesToInclude. VS Code searched it when it was outside the workspace, when no folder was open, and when it was a .notes folder listed in the project's .gitignore, so ignore files don't need turning off (doing that adds an "exclude settings and ignore files are disabled" notice). Two folders separated by a comma were searched together.

Testing

  • npm test: 29 passing (no new unit tests; the change is command wiring around VS Code's search).

  • End to end in VS Code 1.140 on macOS, searching for a word that is in three notes and in a project file:

    Scenario Files to include Files found
    Notes: Search Notes, with Workspace Notes .notes, my-notes project.md, animals.md, more.md
    Notes title bar search my-notes animals.md, more.md
    Workspace Notes title bar search .notes project.md
    Search in Folder on sub my-notes/sub more.md
    no folder open my-notes animals.md, more.md
    no storage location Search not opened, "You need to select a location to store your notes."

    The project file with the same word was never in the results.

  • Not handled: a notes path that contains a comma, braces or brackets would be read as part of a pattern by VS Code's include field. Not tested on Windows or Linux.

Closes #17.

There was no way to search inside notes (#17), and Find in Files only covers
the workspace, while notes usually live outside it.

- Notes: Search Notes opens VS Code's Search view limited to Workspace Notes
  and Notes
- a search button in each section's title bar searches that section
- Search in Folder in a folder's right-click menu searches that folder

The folders are passed as files to include. VS Code searches folders named this
way even outside the workspace, with no folder open, or when they are listed in
.gitignore, so ignore files don't need turning off.
@dionmunk
dionmunk merged commit e686454 into master Oct 7, 2026
1 check passed
@dionmunk
dionmunk deleted the feat/search-notes branch October 7, 2026 06:12
@dionmunk dionmunk mentioned this pull request Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Req] Search notes

1 participant