Skip to content

feat(notes): create a note from the List Notes search - #99

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

dionmunk merged 1 commit into
masterfrom
feat/list-notes-create

Conversation

@dionmunk

@dionmunk dionmunk commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Typing a name in Notes: List Notes (Alt+L) that wasn't a note left an empty list where Enter did nothing (#34).

Changes

  • Create from the list. When the typed text isn't a note's name, a Create '<name>' entry is added at the end of the list. If nothing else matches it's the only entry, so Enter creates and opens the note. If something matches, Enter still opens the top match. With Workspace Notes there's one Create entry per section. No Create entry is offered when a note already has the typed name (with or without its extension).
  • Notes in folders are listed. Before, only the top level of each location was listed. Notes in folders now show with their folder next to the name (and their section when there are two), and the folder can be searched too. Hidden files are left out, and files whose extension isn't allowed are left out like in the tree.
  • One way to create a note. New Note and List Notes both use createNote, so both keep a typed extension (feat(notes): keep an extension typed with a new note's name #96) and only give Markdown notes a heading. It writes with the exclusive flag, so an existing file is never overwritten.

Testing

  • npm test: 30 passing, 1 new test for matching a typed name to a note.

  • End to end in VS Code 1.140 on macOS, with animals.md, ideas.txt, sub/more.md and a hidden .hidden.md:

    Scenario master this branch
    open the list animals.md, ideas.txt animals.md, ideas.txt, more.md (sub)
    type brand new idea, Enter empty list, nothing happens note created with # brand new idea and opened
    type anim, Enter animals.md opens, Create entry last, no file created
    type animals only animals.md, no Create entry
    type mo more.md first, Create entry last
    type query.sql, Enter query.sql created, empty
    with Workspace Notes, type kickoff Create in Workspace Notes / in Notes; choosing Workspace Notes creates .notes/kickoff.md
    type, then Escape nothing created
  • New Note from both sections, the "where should it go" question, New Note with a note selected, and the typed extension rules from feat(notes): keep an extension typed with a new note's name #96 were re-run with the same results.

Closes #34.

Typing a name in List Notes (Alt+L) that wasn't a note left an empty list
(#34). The list now offers to create a note with the typed name, so Enter
creates it when nothing matches, and still opens the top match when something
does. With Workspace Notes there is one Create entry per section. No Create
entry is offered when a note already has the typed name.

The list also includes notes in folders, with their folder next to the name;
before, only the top level of each location was listed.

Creating a note is now one function used by both New Note and List Notes, so
both keep a typed extension and only give Markdown notes a heading. It writes
with the exclusive flag, so an existing file is never overwritten.
@dionmunk
dionmunk merged commit 2e1482c into master Oct 7, 2026
1 check passed
@dionmunk
dionmunk deleted the feat/list-notes-create branch October 7, 2026 06:48
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.

Combine search for notes and create new notes

1 participant