Minimalist personal cross device notes

For quite some time now, I have been trying to optimize my note taking setup. In the end it took me longer than I expected, since I was looking for

  • plain text format, preferably markdown
  • robust sync between Android and OSX
  • no cloud of any form

Finding a solution that fit all my needs was surprisingly hard. In particular, the no-cloud requirement seems to be somewhat exotic in the age of connected scales and connected toothbrushes.

Alas, the solution itself is quite simple: use a proven editor on either platform (vim on OSX, jotterpad on Android) and sync files via git. Getting this setup to work robustly however took some time. In this post, I want to sketch my solution.

On Android, the main complication was finding a markdown editor that could read from and write to directly the device memory. After some research I settled on jotterpad, a clean, minimalist writing app. Jotterpad has both a base and premium version, the latter being fully worth its price: you get markdown preview, syntax highlighting, and the extended keyboard, that makes typing pure text bearable on android.

For OSX the choice was much easier, since I have been using vim as my editor of choice for quite some time now. When looking into possible plugin support, I stumbled upon the Swiss army knife of vim-note-taking plugins, vimwiki. Fully feature packed, it supports for example table editing, navigation, and rendering. In the end, I shied away from it, since vim's markdown support is pretty great already and I prefer unix-style tools, that do one job and do it well.

The only feature I truly missed was the ability to follow links. After discovering follow-markdown-links lacked some features, most notably support for reference-style links, i.e., [...][...], I created mdnav. mdnav is is designed to work nice with local markdown files (opened in vim), external URLs (opened in the OS browser), and non- markdown files, such as PDFs (opened via open on OSX). For a full list of what is supported, please look at the Readme.

With editors on both platforms in place, only sync is missing. Initially, I tried resilio-sync, hopeful its drop box like interface would simplify operations. After some research, however, I was completely underwhelmed by its conflict management. Last write wins is simply not good enough for files such as to-do lists, that often change on both devices at the same time. In general, a tool that silently overwrites my changes is not an option.

The decidedly less user friendly, but much more reliable option is git. On OSX, the command line was the obvious choice. On android, I went with mgit. While its user interface takes some time getting used to, it does offer reliable git support on a mobile phone - what more can I ask for? Since git is decentralized, one question is always which system is the main copy. Here, I use my laptop as the copy to which I push my changes from mobile. While using this system, I found two details quite helpful: My home router is mapping MAC addresses to fixed IPs, so I do not have to change the repository URL repeatedly on my phone. Also, nowadays, you can push into a checked out branch, after adapting the repository configuration:

$ git config receive.denyCurrentBranch updateInstead

This way I can push and pull my notes from my phone to my laptop at will, when inside my flat.

I had this setup now running for about a month and am quite happy with the results. While there are some moving parts, each part individually is simple enough to understand and tweak if necessary. Currently, I started experimenting with other tools built on top of my notes, e.g., a simple tag cloud created by a python script or reading out tables for tracking habits. Since the content is a collection of plain text files on disk, writing tools around them becomes quite easy.

All in all, I can whole-heartedly recommend this setup: it is simple, robust, and extremely flexible, not to mention there is no lock-in whatsoever.