Keeping a logbook with vim
There’s a lot to be said for embracing basic tools for getting stuff done. Keeping track of notes is a great example of where some basic tooling can achieve the same result as paid services.
My setup
- Vim, some aliases and templates
- Dropbox, for sync
- Grep, for search
File Structure
I keep a single file for each day of the year, using the date format: YYYY-MM-DD
.
This makes search easy. Terminal completions in zsh
shell work well with this format.
|
|
All files are formatted in markdown and I use the vim-markdown plugin for syntax and section collapsing.
File Content
I find it increasingly useful to use checklists to manage my work. This ensures I don’t have to manage the cognitive load of remembering things.
I start the day with a simple checklist:
|
|
It’s a simple 3 point list of what’s important to focus on. If I start doing something that’s not on the list, then it helps me to check myself and ensure I am doing valuable work. Also if something more important comes up, it becomes a conscious decision to drop something from the list and replace it.
I have the equivalent checklist for the end of the day:
|
|
It’s important to capture the information, and context that you have at the end of the day before you go home. This makes picking back up in the morning much easier
For all other information I create sensble headers for the sections and then just write.. sometimes freeform, often bullets.
|
|
Keeping everything for one day in one file makes it much easier to see what I acheived and worked on in that day. Markdown plaintext makes searching very easy with:
|
|
Aliases
To reduce the overhead and automate the tasks that I do most when interacting with the logbook files I’ve created a series of zsh
aliases.
Create a new logbook entry:
|
|
Usage:
|
|
Breaking this down, it uses the $EDITOR
env var (set to vim) to create a new logbook entry in the dir ~/logbook/
.
The offset passed is in days, allowing easy access to yesterday’s and tomorrow’s notes.
Templates:
I have some alises for inserting the checklists into logbook files.
All aliase templates are stored in ~/.vim/templates
.
|
|
Sync
There are many ways to sync the files, they are just plaintext files. For a while I tried storing them in git, but the overhead of needing to commit changes was a little too high.
Instead the ideal sync system just runs in the background and syncs across devices and backs up logbook entries.
I am currently using Dropbox to sync the files. It has good cross device support and “just works”.
I symlink /home/zak/logbook -> /home/zak/Dropbox/logbook
so that dropbox can handle all it’s stuff and logbook can have a nice top level dir.
5 months on…
|
|
So far there are 117 entries, which when accounting for weekends is roughly 5months.
It’s going very well, and the tooling reduces the amount of effort requried.