I wanted to offer up a basic starting point for bloggers and web workers who use a Mac and are looking to get started with plain text (if you’re not sure why you might want to do this, start here). This will not be a comprehensive dive into the myriad apps you can use. It will be a focused and targeted approach for:
- Storing and Accessing Your Plain Text Files
- Naming and Tagging Your Files
- Formatting Your Files For The Web
- Exporting HTML For The Web
- Learning A Few Tricks
This may sound like a lot, but these will be brief overviews that give you just enough to get you started, while offering everything you would ever really need. For those looking for power user tricks, I will also be linking to more comprehensive sections on naming and formatting files.
Storing and Accessing Your Plain Text Files
The best practice for getting started with plain text files starts with a single step: Download nvALT (I strongly suggest the public version of the latest beta). nvALT is a free note-taking tool with some great features for plain text and markdown editing. It serves as the foundation for my plain text workflows. It stores all of my text files in an environment that is lightning fast for creating and searching through notes. I use nvALT as a repository for everything. It holds small reference notes, conversation logs with essential clients, random quotes, thoughts and ideas as well as serving as the home for every draft and post I’ve created for this site over the past two years. Creating and finding files is easy. Start typing in the field at the top of the app and nvALT will automatically start filtering out documents that match what you’ve entered. If nothing matches, simply hit enter to create a new document.
Now the stock settings of nvALT are great on a single machine, but considering many of us have multiple computers and almost all of us would like access to our files on our iOS or Android devices, its best to start by making a few quick changes.
Step 1: Store Your Notes As Plain Text Files
When you first download the app, everything is stored as a single database. This makes it impossible for you to access and use individual notes in spotlight searches, in other applications and on your mobile devices. Changing this is simple:
- Go into the preferences (you can access this from the menu or by hitting CMD-,)
- Go to the “Notes” tab
- Change “Store and read notes on disk as:” from Single Database (Allow Encryption) to Plain Text Files*
Step 2: Move Your Notes To Dropbox
Next we want move our files to Dropbox so that they are being redundantly stored in the cloud and so that they are accessible on our mobile devices. We will need to remain in the same “Notes” tab in the preferences. Once you’re there:
- If you haven’t already, install Dropbox
- Select “Other” from the “Read notes from folder:” drop down menu
- Go to your Dropbox Folder
- Create a new folder inside Dropbox for your notes
- Select that folder for your nvALT notes
I suggest calling your new folder inside of Dropbox “Notes” and that you not place it inside of another folder. This way it’s easy to find all of your notes when you attempt to use it along with an iOS or Android text editor. If you’ve done this correctly, it will look like this:
If you don’t already have a Dropbox compatible text editor for your iPhone or iPad, I suggest you swing by Brett Terpstra’s searchable list of iOS Text Editors. My app of choice is Notesy for the iPhone.
From here, you’re all set. Your plain text files now live in a Dropbox folder and your entire library is setup in a way that can be used with Spotlight, other apps and devices.
Naming and Tagging Your Files
Now this next part may take some getting used to, especially for those who are used to putting all of your documents into specific folders, but stick with me. nvALT keeps everything in one folder. As your library of notes grows, this can be intimidating, but I’ve found a very lightweight system that make it exceptionally easy to store and locate your files.
Naming Your Files
I use a naming convention that is effectively stolen from Merlin Mann (and by that, I mean it is entirely stolen from Merlin Mann). My file names include one of several category keywords, a one-to-five word description (this should be whatever you’re most likely to type when searching for this file) and the creation date. I know this sounds confusing, so here are a few of my own examples:
- Blogx — Blog Post Title — 11–05–20
- Workx — Any work meeting or writing project — 11–05–20
- Ideax — Actionable idea — 11–05–20
- Thoughtx — Tangent for blog or idea — 11–05–20
- Runx — Running lists of books, unprocessed to-dos, calls, etc (no date)
For those who are wondering why I place the x at the end of the category keyword, it is so that when I search for files, I don’t pull up everything that includes that word (another Merlin tip). I also use TextExpander to speed up the creation of the titles, for a deeper look at naming your files in order to avoid folders and easily find exactly what you’re looking for, click here.
Tagging Your Files
Everyone uses tags differently, but I tend to use a very limited number of them in nvALT. The category keyword in the naming convention above serves as a tag and use is limited as these tags do not carry over into most iOS and Android text editors. Regardless of this limitation, I find tags useful for logging the current status of my various writing projects while on my Macs. Drafts are tagged as @Working; completed, yet unposted pieces are tagged as @Editing; published posts are tagged @Posted and abandoned ideas are tagged as @Killed. Since I also capture ideas for posts and leave these untagged, I can always search for Blogx (my category keyword for posts), sort by tag and see all of my unused ideas (this is also helpful for reviewing and killing the bad ones). When storing your notes as individual plain text files (as discussed in the section above) the tags will be searchable in Spotlight, which can also save you time when searching for your files. You can experiment with how to use these, but I’d tread lightly.
Formatting Your Files For The Web
As I discussed in my initial plain text primer post, Markdown is an easy and very readable way to format plain text with bold, italics, headers, block quotes, links, lists and images in a way that can be quickly exported to HTML. While the latest version of nvALT has some really nice Markdown support, I prefer to write and format anything longer than a short note in a text editor called Byword. It’s just a nicer environment for writing (nvALT while functional, is not the sexiest of apps) and it has great Markdown support.
So how do we make this work? Well one of the things I love best about nvALT is the built in external editor support. You can set it up so that by hitting a single keyboard command (CMD-Shift-E), the file you are currently working on will be opened in another text editor of your own choosing. Upon saving or closing that text editor, the changes are saved back to nvALT. You can set your external text editor by going back to the preferences (through the menu or by hitting CMD-,) and setting your “External Text Editor:” of choice from the drop down menu in the “Editing” tab.
Rather than doing a deep dive into external editors and Markdown, I encourage you to review my post on integrating nvALT and Byword, John Gruber’s Markdown page and my post on using two of my favorite applications, TextExpander and Keyboard Maestro, to speed up the creation of Markdown syntax.
Exporting HTML For The Web
Last but not least, you want to be able to take your Markdown document and extract the HTML for posting your content to the web. While working in a document, you can toggle the preview window from the menu (or just hit CTRL-CMD-P), this will show you what your formatted text will look like. You can then hit “View Source” at the bottom of the window to see the HTML and copy out exactly what you need. From there you’re ready to paste this directly into your content management system of choice (although newer CMS platforms such as Squarespace allow you to post directly in Markdown).
If you’re looking for a more advanced way to preview your files, I strongly suggest you check out Brett Terpstra’s Marked app (Brett’s also one of the two developers who created nvALT, so it’s a nice way to support him as well). It offers great export options including PDF versions of the formatted file, the ability to use custom templates for previewing your text and a slew of power user features. I have one that mimics the CSS of my website, allowing me to see exactly what the final text will look like as I write.
Learning A Few Tricks
I’m not going to go crazy here (even though I could), but consider learning the following keyboard shortcuts as you use nvALT:
- Press CMD-L at any time while in the app to “Search or Create…” your files
- Press CMD-R while working in a note to rename the file
- Press CMD-Shift-T to tag the file you’re working in or to bulk tag multiple selected files
- Press CMD-Shift-E while working in a note to access your external text editor of choice
- Press CTRL-CMD-P to open the Preview window
- Press CMD-Shift-R if you ever need to access the file you’re working on in the Finder
- Press CMD-, to access the preferences
There’s way more than that, especially when it comes to some of the Markdown formatting magic that has recently been added to nvALT, but learning these basic keyboard commands will help you move around the app a lot faster.
This should be more than enough to get you started. It may seem like a lot, but once you dive in, I think you’ll find nvALT to be a fast and easy way to manage a tremendous amount of text files. And considering the combined cost of nvALT (which is free), Byword and Marked is $9 (normally this would be a whopping $14, but Byword is currently 50% off), I think you’ll agree that it’s an affordable approach as well.
If you have any questions about how to best get started with plain text files using nvALT, please let me know. It’s a great app that has changed the way I capture and expand of my thoughts.
Update: This post includes affiliate links, because I’m shameless and stuff.