Inspired by this fantastic article by fellow RC alum Peter Lyons, I’ve started a log to keep small notes about anything work-related. The idea being that it becomes a central repository for all the little tasks/notes that I’d normally write down on a daily basis.

Reducing barrier to entry

When I first started the log, it was a dotfile kept on my root directory that I would open in a separate buffer using :e ~/.daily_log. This was not ideal and I would often forget to open the log to write stuff down as it was easier to just use a nearby pen and paper. Being a vim user I figured there must be some way to programmatically do this, and ultimately I came up with a quick-and-dirty vimscript function that fulfilled all my requirements:

function! AppendToLog()
  let time=strftime('%x %X (%Z)')
  sp ~/.daily_log
  call append('$', ['', time, ''])
  execute "normal! Go* "

The function above will open the daily log in a horizontal split, append newline-timestamp-newline, followed by an asterisk, and put the user in INSERT mode. I mapped the function call to a leader key:

" Quick-edit daily log
nnoremap <Leader>l :call AppendToLog()<CR>

A call to AppendToLog() would effectively open the log like so:

01/22/2018 19:52:51 (CST)

* Previous note

01/24/2018 11:25:25 (CST)

* █

Having now greatly reduced the amount of overhead to open the log to a mere 2 buttons, I found myself using it much more often!

Update (2019-03-24): I’ve been using this method for more than a year now, but sometimes I’ve found myself not in vim and still wanting to write a log entry. I’ve added a bash alias that opens vim and calls the above function immediately:

alias note="vim '+call AppendToLog()'"

Realized benefits

I’ve now been keeping a daily log for approximately a month and I’ve noticed some tangible benefits (in no particular order):

1. Easier to get into, and maintain, the “flow”

When switching between tasks, it was sometimes difficult for me to maintain a rhythm and continue working – I would have to stop for a bit and recollect my thoughts. Having this easily accessible log “bridged” the gap a bit as I can look through it to see where I last left off in my previous task. This of course means that I was appending my progress on a task as I switch over.

2. A single repository for my notes

This ties back to the first point, but having a “single source of truth” for all my notes/musings/ramblings meant that I did not need to fumble around looking for a piece of paper or post-it note somewhere (which was often left at home). I could go about whatever I needed to more efficiently and with less distraction. I’m also version controlling my log on github so that I can scan through it when necessary even when I’m not on my computer.

3. Tracking progress

At the end of the week, I often write a report for work (also an idea from here) and being able to look back into the log to see what I’ve done has been tremendously helpful. No longer do I have to spend a long time trying to remember what I’ve done the past week.


Keeping a log – and making sure that access to this log is incredibly simple – has been such a great boon for me that I often now find myself using it to jot down anything programming-related that comes to mind that I’d like to note for later. This is still a relatively new practice for me, and I’m excited to see how it will grow and morph as I spend more time with it. A big thanks to Peter Lyons for this great idea.