Cover photo by Bram Naus on Unsplash
This is an ongoing series:
- π My journey into the plain text life - Intro
- π οΈ Tools for working with plain text files - My Plain Text Journey Part II
- ποΈ Syncing my notes - My Plain Text Journey Part III
- π Journaling - My Plain Text Journey Part IV
- β Keeping Notes My Plain Text Journey Part V
- β Tasks and To Dos My Plain Text Journey Part VI
Iβve been using plain text for my notes since 2014, and for a journal since 2017. In that time Iβve experimented with the different ways I could use plain text to not only automate my life, but to also help me stay productive. And by productive I mean working on my productivity system instead of doing actual tasks. Be warned, once you start tweaking itβs really easy to procrastinate by βworking on your systemβ.
Please keep in mind, much like Frodo, this was my journey. And much like The Lord of the Rings Trilogy, it took me years to get to this spot. Your adventure with plain text will be different. Play around, try different things. As long as you got backups, what do you have to worry about?
Why plain text?
Plain text is simply a text file. Nothing more, nothing less. Itβs about as sexy as going clothes shopping with your mother. You can edit a plain text file on just about any device you have. I have written some of my notes using my Atari 800 as the ultimate no-distraction writing device. Text files have been with us since the dawn of time, and will outlive any other format.
I keep my notes and a journal using Markdown for formatting. My tasks or to dos are also in plain text files using the Taskpaper format. Iβm currently investigating the todo.txt format because I like the idea of having all the information for a task in the same line.
By using Markdown I can export my notes in a wide variety of formats, such as html or pdf. Just because I can doesnβt mean I do. Itβs rare that I would need a paper copy.
Getting started
You know how you get started? You create a folder on your desktop called notes and start saving your notes into the folder. No fuss, no muss. To create or edit your notes, you can use any editor that can save as plain text. VS Code has many fans, along with Sublime Text, but I recommend the best editor ever, Vim.
Once you get more than a handful of notes youβre going to want to have some sort of organizational structure. Or not, Iβm sure someone out there worships chaos theory when it comes to file organizing.
Here is how I have it set up:
.
βββ Archive -> I create a folder for each year
β βββ 2014 When I no longer need a note
β βββ 2015 or file, I put it in the
β βββ 2016 archive for that year
β βββ 2017
β βββ 2018
β βββ 2019
β βββ 2020
β βββ 2021
βββ BlogPosts -> My drafts of BlogPosts
βββ Book Ideas -> Working on book ideas.
βββ Books -> Reviews of books of read and notes
βββ Journal -> Each year gets a journal - 2021.md
βββ Lists -> My to do lists in .taskpaper format
βββ Notes -> All of the notes I write.
βββ Projects -> When I need to organize notes by project
βββ Research -> Folders of data that I am using for research
How I create and name my files
I originally started out naming my files with YYMMDD-.markdown, but after reading a blogpost by Tyler Hall, I switched the naming to YYYY-MM-DD-.md. It does look better. I also add some YAML front matter to each note:
--------
Title: My Great Post
Author: gozar
date: 2021-04-23T12:14:00-04:00
Slug: my-great-post
Category:
Tags:
...
To automate this, I have the following script:
#!/bin/bash
## New Drafts
if [$# -eq 0]; then
echo "NewNote v.02"
echo "Enter the name of the note as the argument"
exit
fi
TITLE="$@"
AUTHOR="`whoami`"
DATE=`date +"%Y-%m-%d %H:%M"`
EDITOR="vim + +startinsert"
DEFAULTFOLDER="."
EXT="md"
#PREPEND="`date +%Y-%m-%d`-"
PREPEND=""
SLUG=$(echo -n "${TITLE}" | sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z)
if [["${TITLE:0:1}" == "2"]]; then TITLE=${TITLE:11}; fi
if [[! -f ${DEFAULTFOLDER}/${PREPEND}${SLUG}.${EXT}]]; then
echo -e "---\nTitle: ${TITLE}\nAuthor: ${AUTHOR}\nDate: ${DATE}\nSlug: ${SLUG}\nCategory: \nTags:\nStatus: draft\n...\n\n" > "${DEFAULTFOLDER}/${PREPEND}${SLUG}.${EXT}"
fi
${EDITOR} "${DEFAULTFOLDER}/${PREPEND}${SLUG}.${EXT}"
Under Windows I run this in Windows Subsystem for Linux, and under macOS or Linux, you can use it in a terminal window.
I named it nn
, and to create a new note I navigate to the destination folder and enter the following when I want to add the date to the front:
nn 2021-04-23 This is my note
But sometimes I donβt want the date, so Iβll just use:
nn This is my note
If the note doesnβt exists, it creates a note, otherwise, the note is opened in my preferred editor. The script creates a slug for the note and also names the note with the slug. My two examples above would result in the files 2021-04-23-this-is-my-note.md
and this-is-my-note.md
being created.
Stay tuned
Part II is now online
This is just the beginning of my plain text journey, more is to come!! I still need to share the tools I use, such as Git for syncing and espanso for text expansion. There are a few more scripts I use too because I force Bash into everything.
Top comments (0)