Writing Power Tools: Text Editors

Vim screen shotOne of the recent themes on ProfHacker has been the virtues of using plain text to do your work, especially your writing. For me there is one big advantage: I write in plain text so that I can use a text editor to do my writing.

By text editor, I mean a program that is meant to edit code—the type of tool that programmers use. My text editor of choice is Vim, but there are many similar programs: BBEdit, Emacs, Notepad++, TextMate, TextWrangler, and SciTE are just a few of the options. These all share features that are intended to help you write code. They are not primarily software for word processing, like Microsoft Word or Libre Office.

So why would someone want to write using software that is meant for writing code rather than writing words? I’ve found that thinking about my words as if they were code has improved my process of writing. There are the specific reasons:

  1. Text editors let me leave comments in my writing. If you look at well written source code for a computer program, you’ll find many comments that do not affect how the program is run, but which do explain how it works. In the same way, I leave comments to myself about my writing. If I leave a gap between sections, a comment reminds me what remains to be written. I leave comments evaluating paragraphs or sections: “rework this paragraph to take into account argument X” and the like. The most important use I have for the comment function is cutting text. Most writers have a hard time bringing themselves to cut the words over which they’ve labored. Instead, I comment out text which I need to cut. For example, when writing this post the first reason I listed was my irrational hatred of MS Word ever since it killed my puppy, which I got the satisfaction of writing and you got the satisfaction of not reading, because it’s now a comment. This technique has the twin virtues of sparing me the psychic pain of deleting text, and of leaving the text in its context in case I later want to revise it.
  2. Text editors use color to highlight syntax. Text editors color code the syntax of programing languages: one color for a function, another for a variable, and so on. This feature can be very powerful for writing. For example, I wrote this post in Markdown. The syntax of various parts of the document were highlighted for me as I wrote, such as the links, the ordered list, and the headings. My text editor also highlights the words I search for. Which brings us to the next point …
  3. Text editors have amazing find and replace. Any useful text editor has some version of regular expressions built in. You’ll have to read Konrad’s excellent posts on regular expressions to learn why these are useful, but text editors have an ability to search that far exceeds that of any word processor.
  4. Text editors keep your fingers on the keyboard, because they have good keyboard shortcuts. In a word processor, if you want to move to the start of the next sentence, you’ll have to take your hand off the keyboard, use the mouse to click on the start of the next sentence, then put your hand back on the keyboard. In Vim, I type one character ‘)’, which takes me to the next sentence without ever taking my hands off the keyboard. This doesn’t seem like it would matter until you get used to it. Now when I do have to use Word, I feel like I’m running through water.
  5. Text editors are more stable. Text editors are the tool programmers use most, and unsurprisingly they have taken care of themselves by making text editors highly reliable. For example: I currently have 52 documents open in my text editor (some are writing, a lot are code). But if I were to open even 10 documents in Word, my computer would grind to a halt. I haven’t restarted my text editor in several weeks; it’s more likely that my Mac will crash than that my text editor will.

Using a text editor is not the easiest hack to get started with, since there is a steep learning curve. Text editors are power tools, and they’ll save you lots of work only if you learn to use them properly. If you’re on a Mac, you might try TextWrangler, and if you’re on Windows you might try Notepad++ and using the tutorials they provide. For me, at least, using a text editor has been the most useful hack I’ve ever done.

Have you used a text editor for writing? Which do you prefer, and why?

Return to Top