Plain Text Primer: nvALT 101

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 lightening 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.

NvALT Search and Create Field

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*

NvALT Storage Settings

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:

NvALT Dropbox Folder Settings

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.

35 Responses to Plain Text Primer: nvALT 101

  1. Thanks, this is a nicely detailed post. So many folks I admire use NV and NValt that I feel like I’m really missing out. But I can’t quite see the need. First, I do like using folders, and second, doesn’t Spotlight (or maybe a tag app like TagIt) make it just was easy to find files as NV? Can you elaborate a bit, maybe in a later post, on just how NV is superior to the Finder plus TextEdit (or Byword or whatever) plus Spotlight? Thanks.

    • I mean, to be honest, it just may not be a fit (or may not work for everything). If you’re happy with folders and it works for you there’s no need to change just because it’s popular. Hell, I hate breaking things that are working.

      That said here’s my quick pitch. This is an app that is open most of the day for me and the speed of moving through my notes and creating new ones when needed is far greater than anything Spotlight, Finder and TE can can offer even when optimized to work together. I can certainly ellaborate, basically consider it Spotlight and TextEdit combined (along with some slick preview and MD support) for your notes. Since I keep every bit of text I create (with the exception of emails and larger writing pieces that live in Scrivener), I have my own personal wiki of the posts, reference materials, conversation logs, ideas, thoughts, instructions, and project notes that I create. Since I work with text for a tremendous amount of my day, it just makes more sense to have the benefits of Spotlight and TextEdit in one place.

      If you’re really curious, try it for a week and see what you think. If you’re already happy with what you have, why change?

      • Thanks, Michael. Maybe your comment could be the seed for a longer full post? I guess one hesitation I have is that I’m usually looking among all my notes created over the years, and that would mean converting everything, thousands of rtf and other files, over to .txt and then getting them into NVA. Otherwise, I’m gonna have to run a spotlight search anyway for the old files in addition to typing in NVA. In another post comment, I asked about batch converting all my old rtfs over to txt, but haven’t been able to get that terminal command to work (it doesn’t find the directory i.e. folder I designate for conversion). Assuming I can figure that out and pull the massive batch conversion off, will NVA then be able to see all my text files? Anyway, as you say, my current solution works pretty well and I’ll probably stick with it. On the rare occasions Spotlight fails, I use EasyFind, a free search utility that for some reason pulls up files Spotlight misses or buries in the results. I’ve also thought about tagging my files with TagIt but frankly haven’t seen the need yet. Thanks for the interesting site. I’ll look into Byword soon, though I’m happy with iaWriter at the moment. I usually do my blog formatting in the wordpress browser window and the other web client I have to use, so at the moment, MD isn’t such a big deal for me; if it becomes so, I might try Byword or another MD ready editor, Writing Kit.

        • I agree, this probably isn’t the solution for you until there is an easier method for converting files. As for Byword, if you’re happy with iA writer, I wouldn’t bother. They are very comparable apps. It sounds like you’re happy with what you have. So why change?

  2. one really odd thing about your series on plain text is that you use Markdown, which is a markup language and, therefore, your notes are not plain text. HTML is just as plain text as Markdown, as is RTF for that matter. Rather than plain text, you use a minimal-markup language that you find easy to use. But it is no more transparent than LaTeX without the preamble, and is considerably limited when compared to HTML or LaTeX or some other minimal-markup.

    You have chosen a solution that works for you, and I like it, but personally I find Markdown limited in what it can do. Markdown is typical of open-source projects in being created by a coder for his (John Gruber in this case) own uses, and then left as ‘done’ as soon as it met those uses. HTML (my own preference here) on the other hand (though open-source) is created as part of a vast give and take between developers and users.

    I wish Gruber would just grant his blessing to a revision of Markdown that permitted, for example, alignment code, and paragraph styles. Other Markdown users have other wishes including better table support, and there have been forks, best known of which is MultiMarkdown from Fletcher. But most software that deals with Markdown is limited to Gruber’s canonical version, and Fletcher is unwilling to fork Markdown too far.

    • I may be getting the distinction wrong. In my mind, plain text is anything where the characters or formatting involved do not require a file format change. You’re right that HTML falls into this (although it would be far more difficult to read every day writing). RTF is a bit different as the formatting requires a different file type (again this is not my area of expertise, so I may be misunderstanding here). In all honesty, I see plain text + MD as the best possible way for web writers doing traditional work to store their work. It’s certainly more limited than other options, but I believe its the easiest way for the average user to get into this kind of a workflow. I think things like HTML and LaTeX scare them off. I could be wrong, but let’s face it, MD has done more for plain text than either HTML or LaTeX.

      Like anything, I think we all inevitably land on the right solution for us. For many that will be MD, for others, it will not be enough and deeper down the rabbit hole they will go. I see the value in HTML, just not the accessibility. This is meant to remain simple and I think that simplicity is why it’s seeing the adoption it has. I commend them for not loading it down. It keeps it easy to learn, easy to read and handles most of what the every day web writing audience would need. And when it doesn’t there are plenty more options to learn. This was 101 for a reason!

  3. Hi, I moved my notes to my Dropbox folder as mentioned above but now when I open nvALT all my notes are gone and I can’t open the file saved in Dropbox in nvALT. Any idea on how I can restore/fix this? Thanks.

    • Hey Christopher, if the file is in a single flat folder (with no sub-folders) and the prefrences are set to point to that folder, you should have to open the files, they should just show up in the app. I’m assuming these were notes that were once in nvALT and are plain text files? If so, it just may be that the path is off for the file storage.

  4. I wish I found this article the first time I’ve started using nvALT. It would save me a lot of time. Hence I had to go through personal transition… Love the Dropbox sync. Tagging conventions are useful, although I tag with #hashtags instead of “x”. Equally good, first thing is a habit of mine.

    • Like you mine was a lot of trial and error to get to here. I also don’t think the X matters nearly as much as the ability to segment out your notes. Hopefully new arrivals will have an easier time than we did :)

  5. Excellent post as usual. I know that android users are a huge part of the demographic here, but I found an app called notational acceleration that is a spiritual successor to nvALT for Android. The app has simplenote syncing too.

  6. One thing I’m struggling with – My notes often morph from just some randome thoughts into a full fledged markdown document I want to export to HTML and share with my team at work. When I do this, I want the first line in the file to be a proper markdown heading that serves as the title of the document.

    But unless I’m missing something, nvAlt will always use that first line as the title of your note. So now my note title is whatever I wanted to use in the h1 tag. Any way around this?

    • You’d have to check with Brett, the developer of nvALT (his site is BrettTerpstra.com, he’s super nice and helpful), but my understanding is that the file has its name and then the title for HTML would be separate. In most cases I have my title and my document. so if something was named: Blogx – Test – 12-11-12, this should not show up when pulling HTML, but the header # My Test Document would.

      I do this so that my naming scheme can remain, but the finished output won’t be impacted by it.

  7. A quick note on the Blogx, Workx idea. It doesn’t feel very nice and makes us plain text people look more geeky that we already are! The problem that it solves should really be solved by nvAlt, SimpleNote and similar tools. Their searches should prioritise keywords in the title over keywords in the body of notes. Secondly they shoulld prioritise the results based on left to right position in the title, with words furthest left having higher priority. Then, if your note is “Blog – Blah Blah 1″, “Blog Bling Bling” then a search for Blog will always show those notes first and we can drop our x. I did contact Brett Terpstra on this and he agrees, but it needs changing in the core Notational Velocity code. Perhaps readers who agree could add their comments here https://github.com/scrod/nv/issues/282 as it hasn’t drawn a response. SimpleNote appeared similarly unimpressed with my suggestion!

    • That would be nice. I know Brett’s a big fan of tagging, but I doubt I’d change. This makes it easy for me to filter and create searches when using it in apps like Evernote. However you’re right that this would lower the barrier to entry for those who think we are crazy people :)

      • Thanks Mike for the helpful post. I should blog about this myself as I refine it, but thought I would chime in on this thread with something that I’ve come across as a happy accident of my own legacy of auditioning note tools and workflows.

        I’m new to nvALT but, like many of us, I’ve tried a lot of systems over time. One of them that I’ve come back around to a few times is Trunk Notes for iOS, a Markdown wiki with Dropbox sync. So far nvALT is turning out to be a pretty great companion to it, and brings me to the note naming topic. Trunk Notes has a convention for namespacing wikiword links with a colon, like Work:SomeProject. This page is actually saved as a file called Work:SomeProject.markdown (n.b. for any long-time Trunk users who may want to edit notes in desktop tools: in the past the file extension was not automatically applied. I found a support thread where the author said you can simply add the extension to your old pages through Dropbox and the app would pick it up seamlessly, which I did. It also recognizes .mkd, .md and .txt if you want to migrate old notes and you’re lazy).

        The notable part, even if you’re not interested in Trunk, is that when I set nvALT to use my Trunk Notes Dropbox folder, it automatically renders the note titles with a slash in place of the colons, like Work/SomeProject, and if you create a new note like Work/AnotherProject, it creates a file on disk with a colon, keeping the flat folder structure. Two swell things about this:

        • It keeps some of familiarity of the hierarchical file path abstraction while also having benefits of a flat structure. The namespace itself can be a note with content, i.e. you can create Work.markdown. I might often start with Work/SomeProject when prospecting a client, and end up breaking up its content into sub-pages when I win a bid and the project becomes detailed.

        • Following from that, it addresses your search disambiguation need like Blogx, at least in nv. Type “blog” and you’ll get all the noise of other notes that contain the term, but tack on the “/” for the same effect as “x”. It’s pretty sensible and it’s easier to type than dashes, at least on qwerty.

        I know Mike that you’ve already adopted your scheme across other tools, and this one may not work so coincidentally well everywhere. But it might be worth a try for others, and could also be by nv users to other tools where some customization is possible, such as GitHub’s Gollum wiki system which also uses a flat structure (but not the colon convention by default).

        Also noteworthy for Trunk users: the happy coincidences go both ways. Trunk also uses [[Development]] syntax for internal links, but the namespacing lets you use bare Development:ObjC if the second part is a WikiWord. It turns out as an undocumented feature that you can change this to [[Development/ObjC]] and the link is then clickable both in nv and in Trunk! It renders as a red link in Trunk as though the page doesn’t exist yet, but the link does indeed work.

    • Thisis not happening for me, you may want to check with Brett Terpstra, one of the developers. He’s super responsive and this may just be a bug. Are you on the latest beta version?

  8. Why do you call your use of affiliate likes shameless? This post alone provides extraordinary value, not that clicking on one of your links is going to cost anyone anything. Many affiliate marketers are absolutely shameless (and worse) but your use of affiliate links here is perfectly appropriate, responsible, and honest – honest even if you didn’t call attention to your use of them.

    But all that is entirely off-topic. Again, your suggestions were very helpful. I poked my toe in the notational velocity waters a while back and couldn’t begin to understand why anyone would be so impressed with the app. That was because I hadn’t been primed with a good workflow. Now, thanks to your post, I have and I won’t be surprised if a combination of the apps you mentioned above plus Scratch for iPhone won’t displace my use of evernote for capturing thoughts and Scrivener for composing blog posts.

    • I was being a little bit sarcastic :) Probably should have been “shameless”. I only include them when I believe they fit the piece but always like to note that when relevant. I guess my somewhat silly way of putting it may actually cast doubt…

      Hope the app proves useful for you. It was a gamechanger for me. I look at it more as a file library you can write in than a true writing application. I can scratch down some notes quickly, but then expand on them in a nicer enviornment. As for Evernote, I love it, but not for writing. Store just about everything else in there, but it’s easier to keep the words in nvALT, you can do a lot more with them. If you feel like Scrivener is a bit too heavy for blogging (I do for anything but much longer posts like this one), you may want to look at some of the options like MultiMarkdown Composer or Folding Text which make it possible to have a collapsable document structure or a way to move around without the full outline/document structure of Scrivener.

  9. Thanks for this helpful post. Unfortunately, before I read this I tried to move the database to dropbox, then switch to plain text files. I did something wrong (possibly deleted something I shouldn’t have), and the conversion to plain text wouldn’t occur. So then I compounded things by just trying to delete the app from Applications, and it’s support folders in ~LibraryApplications Support, and reinstall. (I could find no separate prefs file in Preferences.) To my amazement, the newly reinstalled nvALT remembered the new data location, but there were no files in it so I don’t have the little help files that came with the default installation. QUESTION: How on earth can I do a clean, new installation that installs the default “how-to” files? (I didn’t have any important data of my own yet.) And why does it act as if it has a preferences file stashed somewhere? Thanks in advance for any help!

    • Well, I’ve gotten the how-to files I wanted by installing in a different user account and moving them over, and moved the database to dropbox and converted to text files. If anyone wants to explain where OS X remembers aliases to the old data after the app and all its files have been deleted, so that a clean reinstall isn’t possible, that’d be neat and I’d appreciate it. But that would just be gravy at this point. Thanks either way!

  10. The “everything in one folder” is such an app killer. The reason is you’ve locked down the user to doing things the nvAlt way. For example, if you want to use iAWriter or Byword or whatever on your phone via Dropbox sync’ing, where you don’t have the ability to use tags, you’re screwed. Nesting via naming convention in filenames as you’ve suggested above is certainly a personalized approach, but that really doesn’t work for everyone.

    Unfortunately, this single feature is the only thing stopping me from jumping off the Evernote boat… bummer.

  11. Thanks for this post, it’s awesome! I had already started using nvALT, and when I tried the step one of making it so that it stores files individually (except I had it sync with Google Drive instead of Dropbox) it got rid of all my old files, and now I can’t find them! I look in my Time Machine but I don’t see any folder under application support… any ideas of where or how I can look?

Leave a reply