Vim selection piping

In this post I would like to show a Vim1 trick I use often to do some repetitive editing tasks in a programmatic way. This is best explained by discussing an example. Think that you have a long list of values with duplicates and your task is to remove the duplicates and get the set of unique values. In my case, this kind of editing requirement is something which frequently comes up at work with data analysis queries....

February 28, 2021

Bulk search and replace with ripgrep and sed

Following a post on a couple of neat tricks I learned while bulk changing links in org-mode text files. I keep scanned hand written notes in PDF format in the main notes directory with org-mode files. Then I link them as appropriate on daily notes I might keep while working on tasks etc. Scanned notes were dumped in a single directory before the start of this year. This was soon getting quite messy as notes got accumulated over the months and with the new year, I wanted a better organisation structure for the notes....

January 17, 2021

Using sdkman to simplify development

Oftentimes you find that there are different SDK requirements for different projects. A classic example would be that your Scala project might be stuck at JDK 8 level1, but Java projects themselves might be using later versions, such as JDK 11. It would be cumbersome to switch between different JDK versions manually, having to make sure to correctly setup JAVA_HOME when you switch between projects. sdkman is there to address this problem and the same class of problems for other types of development setups as well....

January 16, 2021

Book Review - Tiny Habits

This is a short review and discussion on one of the more helpful books I read on the topic of habit formation - Tiny Habits by BJ Fogg. Book starts by giving you a framework for understanding behaviour formation with the Fogg behaviour model, as shown below. B = M A P M = Motivation A = Ability P = Prompt -------------- B = Behaviour Motivation, ability and prompt are the parameters which you can tweak to form a new behaviour....

December 15, 2020

Trying Iron Gall Inks - Rohrer and Klingner, Scabiosa

A bit of history Iron gall ink is a purple-black or brown-black ink made from iron salts and tannic acids from vegetable sources1 As a fountain pen enthusiast, it was pretty interesting to learn about the history and modern incarnations of this particular type of inks. Both Leonardo’s notebooks and Isaac Newton’s notebooks seemed to have contain writing primarily with iron gall inks, such as the following image from a Leonardo’s notebooks2....

October 31, 2020