Skip to content

Instantly share code, notes, and snippets.

@timmyha
Last active October 3, 2023 12:15
Show Gist options
  • Select an option

  • Save timmyha/3ab8bfd65c65e1fb10b8b96dba1edcfd to your computer and use it in GitHub Desktop.

Select an option

Save timmyha/3ab8bfd65c65e1fb10b8b96dba1edcfd to your computer and use it in GitHub Desktop.
new daily note zsh function
daily_note() {
cd ~/Documents/notes
if [ -e "$(date +%F).md" ]
then
echo "opening daily note"
nvim "$(date +%F).md"
else
echo "creating new daily note, opening"
cp ./templates/daily_note.md "$(date +%F).md"
nvim "$(date +%F).md"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment