DEV Community

Cover image for How default.nanorc saved my life
Ryan Westlund
Ryan Westlund

Posted on • Updated on

How default.nanorc saved my life

Despite the prevalence of Nano's reputation as primitive, I still use it and I'm not sure I'll ever switch away. It has a lot more power than it gets credit for. I want to talk about how I used its custom syntax highlight modules to create the most precious productivity tool I've ever had. Yes, even more precious than shell aliases.

I make heavy use of thoughts files, for almost everything I need to think about. It almost feels like I can't think without Nano anymore. Well, necessity is the mother of innovation, or whatever that saying is. Some time after I started making heavy use of them, I evolved an informal syntax for arranging thoughts. The first rule was: thoughts are placed tab-indented on the line below what they're a response to. So if I had a problem I needed to solve, I'd put a description of the problem on one line, a potential solution on the line below it, and an issue I noticed with the solution indented below that. A second potential solution would be on line 4, indented under the original problem description.

This was really helpful on its own. But it wasn't long before I got more sophisticated. The next informal standard was to prefix problems and disadvanteges of proposed solutions with -, and solutions and advantages thereof with +. My files read like conversations, rather than a single man's solitary ideas, and giving each side of the debate a uniform helped me keep track of what things I needed to think about, find all the 'endpoints' at a glance, quickly count the pros and cons of an idea, etc.

Not long after that, I wrote default.nanorc, a syntax highlighting module for it. At first, it was simple: ++ lines were blue and -- lines were red. Colors made things even easier to see.

And then came the other categories. Thoughts starting with >> were bold green and weren't solutions or answers themselves but thoughts that might hold insight and that I wanted to explore. :: lines were bold yellow and represented the top-level questions I needed to answer, distinguished from the red downsides.

I can't describe how much this has improved my productivity. I use it for files on everything from plotholes in the VN I'm writing, what improvements I should make next to my website, and philosophy.

It's also visually pleasing. I used to change my terminal color scheme periodically for aesthetic novelty, but since the rise of default.nanorc, I just leave it on white.

default.nanorc evolved rapidly in the months since its creation, and the modern version has other categories, such as .. in non-bold green, which represents a settled thought, something I'm sure of but want to keep in mind so I don't want to remove it from the file. I'm still letting experience teach me what the best way to use such a thing is, and the stated rules don't always encompass how I end up using the classifications. The full file is here if you'd like to see it. I bet lots of other people could benefit from this or something like it, but I'd never heard of anyone doing such a thing before I did it myself.

Discussion (0)