Recently I have been spending more and more time in the terminal, especially since I've started to get more used to Vim keybinds. I use them in Niri to navigate between windows, inside various code editors to quickly jump around, and obviously in Neovim to edit text files quickly.
So while jumping around various terminals and code editors, I have unintentionally picked up the habit of creating a simple todos.md for the daily tasks I need to do, instead of opening a GUI-based application which takes some time to open and needs a bit more maintenance.
Simplifying the process
Instead of manually creating a file with an appropriate date for my daily todos, I have created some small ZSH functions to automate this:
today() {
cd "$TODO_DIR" || return 1
nvim "$(date +%d-%m-%Y).md"
}
yesterday() {
cd "$TODO_DIR" || return 1
nvim "$(date -v-1d +%d-%m-%Y).md"
}
tomorrow() {
cd "$TODO_DIR" || return 1
nvim "$(date -v+1d +%d-%m-%Y).md"
}
relday() {
if [[ -z "$1" ]]; then
echo "Usage: relday +2 or relday -3"
return 1
fi
cd "$TODO_DIR" || return 1
nvim "$(date -v"${1}"d +%d-%m-%Y).md"
}
With these functions, I can easily jump around my TODO files relative to today. I specifically didn't choose to add a function for absolute dates, since at that point I could just type the file name out manually.
That's the whole workflow. Dead simple, just one markdown file per day to track some todos and notes. It syncs nicely through Nextcloud or Syncthing, and it removes lots of friction that opening another app introduces.