Repository navigation
feat(notes): fill in the name of a new note from a template - #104
Merged
Merged
Conversation
Every new note needed a name typed in, even when it was a quick note to rename later (#61). The new notes.newNoteName setting is a name template using VS Code's snippet date and time variables, like ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}-${CURRENT_MINUTE}. New Note fills it in, selected, so Enter creates the note and typing replaces the name. It's empty by default, which keeps the empty name box. Both ${NAME} and $NAME work, month and day names follow VS Code's display language, and anything else in the template is kept as typed.
This was referenced Oct 7, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every new note needed a name typed in, even a quick one meant to be renamed later (#61).
Changes
notes.newNoteName: a name template using VS Code's snippet date and time variables, for example${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}-${CURRENT_MINUTE}for2026-10-07 14-35.Alt+N, the command palette) fills the name box with it, selected, soEntercreates the note with that name and typing replaces it.CURRENT_*variables from the VS Code docs are supported, as${NAME}or$NAME. Month and day names follow VS Code's display language. Unknown variables and other text are kept as typed, as in snippets.-between time parts::isn't allowed in file names on Windows, and New Note already removes it.A daily-note command (open today's note, creating it if needed), also mentioned in #61, was left out as too specialized for Notes.
Testing
npm test: 47 passing, 6 new tests for the template (each date and time variable with padding, short year and milliseconds, month and day names,$NAMEwith the longest name winning, unix time, unknown variables kept).End to end in VS Code 1.140 on macOS, at about 10:25 local time:
2026-10-07 10-25, all selected2026-10-07 10-25.mdwith# 2026-10-07 10-252026-10-07 10-26, all selectedcustom name.md${CURRENT_HOUR}:${CURRENT_MINUTE} call10:27 call1027 call.mdAlt+N2026-10-07 10-27, all selected2026-10-07 10-27.mdCloses #61.