You may have noticed that I try to use this static website as a journal. But, you know, not everything I want to write down is really ready (or appropriate) to put here.

Some of these things end up in actual physical notebooks–there’s no beating the tactile experience of writing on paper for some kind of thinking.

But I also spend a lot of time on my laptop, and at the command line in some form or another. So I have a directory of time stamped Markdown files stored on Dropbox, for example:

...
/home/ed/Dropbox/Journal/2019-08-25.md
/home/ed/Dropbox/Journal/2020-01-27.md
/home/ed/Dropbox/Journal/2020-05-24.md
/home/ed/Dropbox/Journal/2020-05-25.md
/home/ed/Dropbox/Journal/2020-05-31.md
...

Sometimes these notes migrate into a blog post or some other writing I’m doing. I used this technique quite a bit when writing my dissertation when I wanted to jot down things on my phone when an idea arrived.

I’ve tried a few different apps for editing Markdown on my phone, but mostly settled on iA Writer which mostly just gets out of the way.

But when editing on my laptop I tend to use my favorite text editor Vim with the vim-pencil plugin for making Markdown fun and easy. If Vim isn’t your thing and you use another text editor keep reading since this will work for you too.

The only trick to this method of journaling is that I just need to open the right file. With command completion on the command line this isn’t so much of a chore. But it does take a moment to remember the date, and craft the right path.

Today while reflecting on how nice it is to still be using Unix, it occurred to me that I could create a little shell script to open my journal for that day (or a previous day). So I put this little file j in my PATH:

#!/bin/zsh

journal_dir="/home/ed/Dropbox/Journal"

if [ "$1" ];
then
  date=$1
else
  date=`date +%Y-%m-%d`
fi

vim "$journal_dir/$date.md"

So now when I’m in the middle of something else and want to jot a note in my journal I just type j.

Unix, still crazy after all these years.