๐ ๏ธ Tools for working with plain text files - My Plain Text Journey Part II
By goz
This is part of a 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
To work with my files in plain text, I use the following tools. I’m not covering the sync part yet, but that’s coming. These are the tools I use at least once a day to manage my journal, notes, and tasks.
Espanso - text expansion
Espanso is a cross-platform text expansion tool which I use constantly. At the start of my journey, I was modifying or adding to my text editor ways to type things automatically, starting with journal entries. My journal is one text file per year, and each entry starts with a date & timestamp that looks like YYYY-MM-DD hh:mm
. This was easy enough to add to Vim and VS Code, but I wanted to play with more tools and didn’t want journal entries to hold me back. That’s when I found Espanso. Now I type ;je;
in to any app and I get a journal entry date.
Journal entry dates are probably my most used expansion, but I also have ;d;
which expands to the current date (YYYY-MM-DD
). There are several more that I use.
Keeping all of my expansions in a Git repo allows me to use them on any machine I have Espanso installed.
bash scripts
Bash scripts are used to automate certain tasks as they pertain to my journal and my to do list. I have a cron job that runs at midnight. It finds the to dos that I completed the previous day (the script runs at midnight, so it is already on the next day) and adds them to my journal. The script then adds a # header for the current day. My journal is in one file for the year, so the # header for each day helps separate out the different posts.
Finally, the script goes through my todo.txt file and finds any tasks that are due that day. These tasks are then set with a priority of (A) and all tasks with a priority are sent to me through Telegram.
I also have a new note (nn
)script that I talked about in my previous article. The nn
script automates the creation of notes.
Telegram
Telegram is my favorite instant messenger, and the ability to write bots is but one small feature that I can’t live without. I have two bots. One I use to send me notifications for tasks. The other is a bot that I’ve been writing. Unfortunately, it’s not polished enough for release, but I’m hoping to do that soon.
To send notifications, I use telegram-notify. It’s a bash script that I run to send notifications.
Brantley is my WIP Telegram bot for adding tasks, journal entries, and saving quotes to my plain text files. It runs on a virtual private server (VPS). To add a journal entry, I send a message to it. When I need to add a task, I prefix the task with a hyphen so the bot knows it’s a task. The final feature is saving quotes. I keep a quotes.md file in my Notes repository. If a send a message to Brantley that starts with a “, Brantley will add the message to my quotes file.
Using an instant messenger for management was one of my better ideas. Since I can run Telegram on anything, I can easily add items to my files.
Vim
My editor of choice is Vim, along with the following plugins:
- plasticboy/vim-markdown: Markdown Vim Mode
- freitass/todo.txt-vim: Vim plugin for Todo.txt
- preservim/vim-pencil: Rethinking Vim as a tool for writing
- junegunn/goyo.vim: Distraction-free writing in Vim
- djoshea/vim-autoread: Have Vim automatically reload a file that has changed externally
I do a lot of my note taking and writing at the command line. Why? Vim is an exceptional writing tool and I can use it from any device by connecting to my VPS.
Conclusion
Since my files are plain text, I can use other editors if Vim isn’t available. This is usually VS Code. But, the nice thing is I can use basically any editor I want.