I do something similar for daily notes for work. I have a shell alias `tdw` for `TODO work` which opens a YYYY-MM.md file in vim. Inside of that markdown file I use a vim macro that generates a date similar to what is shown in calendar.txt, where I take notes about what I am working on and what I have worked on. Here's ane example of what it looks like: ## 2025-02-27 W09 Thursday - Team standup - Looking up flights t…
Most of my notes are write-only for a day or so but I keep the old ones around just in case I need to grep through everything (and I've saved myself doing this a few times).
function notes {
THIS_MONTH="$(date '+%Y-%m')"
mkdir -p "$NOTES_FOLDER/$THIS_MONTH" # create folder if it doesn't exist.
cd "$NOTES_FOLDER/$THIS_MONTH"
if [ -z "$1" ]; then
return 0
fi
vim $1
cd -
}
Running `notes` will take you to today's directory to poke around, and `notes file.md` will open file.md in the appropriate dir.