🛠️ Tools for working with plain text files - My Plain Text Journey Part II
Tags: plaintext, bash, espanso, vim
Published: 2021-05-07 16:48:02

---
title: 🛠️ Tools for working with plain text files - My Plain Text Journey Part II
published: true
date: 2021-05-07 14:14:00 UTC
tags: 
- plaintext
- bash
- espanso
- vim
canonical_url: https://www.gozgeek.com/posts/2021/tools-for-working-with-plain-text-files-my-plain-text-journey-part-ii/
cover_image: https://cdn.collinsoft.com/file/cdn-collinsoft/gozgeek.com/img/2021/vim/vim-1024x.jpg
---

**This is an ongoing series:**

- [📃 My journey into the plain text life - Intro](https://dev.to/mrrcollins/tools-for-working-with-plain-text-files-my-plain-text-journey-part-ii-4803)
- [🛠️ Tools for working with plain text files - My Plain Text Journey Part II](https://dev.to/mrrcollins/my-journey-into-the-plain-text-life-intro-3082)
- [🗃️ Syncing my notes - My Plain Text Journey Part III](https://dev.to/mrrcollins/syncing-my-notes-my-plain-text-journey-part-iii-2kf)
- [📝 Journaling - My Plain Text Journey Part IV](https://dev.to/mrrcollins/journaling-my-plain-text-journey-part-iv-5b9)
- [✍ Keeping Notes My Plain Text Journey Part V](https://dev.to/mrrcollins/keeping-notes-my-plain-text-journey-part-v-1pec)
- [✔ Tasks and To Dos My Plain Text Journey Part VI](https://dev.to/mrrcollins/tasks-and-to-dos-my-plain-text-journey-part-vi-50bg)

* * *

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](https://espanso.org/) 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](https://telegram.org).

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](http://www.bernaerts-nicolas.fr/linux/75-debian/351-debian-send-telegram-notification). 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](https://github.com/plasticboy/vim-markdown)
- [freitass/todo.txt-vim: Vim plugin for Todo.txt](https://github.com/freitass/todo.txt-vim)
- [preservim/vim-pencil: Rethinking Vim as a tool for writing](https://github.com/preservim/vim-pencil)
- [junegunn/goyo.vim: Distraction-free writing in Vim](https://github.com/junegunn/goyo.vim)
- [djoshea/vim-autoread: Have Vim automatically reload a file that has changed externally](https://github.com/djoshea/vim-autoread)

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.