Skip to content

On Text Editing: Getting to Know Your Notepad

I started this series with a story about the time I color-coded myself, and some poetic language about the value of color-coding in a text editor. I also mentioned “Notepad” as a text editor, but that was probably unnecessarily misleading.

I’m not talking about Microsoft’s built-in Notepad tool, here. I’m not even talking about Wordpad, which can handle bigger documents. I’m talking about advanced text editors — generally designed for use by programmers — that offer a handful of critical editing tools. For our purposes, the most important are syntax coloring, and powerful search and replace features.

Syntax Coloring

I mentioned syntax coloring, describing it as a dynamic software tool that tries to track what you’re doing in a text document and displaying that to you in a visual way. As a rough example, it might notice when you open a pair of parentheses “(” and use some sort of symbol or color code to remind you that you haven’t closed it.

In practice…well, it depends on the file type. As I said, these features are intended mainly for programmers working with code, but we’ve got to work with code too — HTML and CSS even if we’re not learning Python and writing macros in VBA.

HTML uses tags like <a href=””>this</a> and <em>this</em> buried in the middle of a bunch of words to do what it does. Syntax coloring picks up those tags and makes them a lot easier to see within the block of text.

Here’s an example of what that same paragraph would look like in my favorite text editor:

HTML uses tags like <a href=“”>this</a> and <em>this</em> buried in the middle of a bunch of words to do what it does. Syntax coloring picks up those tags and makes them a lot easier to see within the block of text.

The coloring makes the special code stand out from the text it’s embedded in so you can more easily edit it. Whether you’re looking to change the words around the HTML tag, or the URL within it, the syntax coloring makes it easy to make sure you’ve got your cursor in the right spot.

Search and Replace

On top of that, a good text editor — like a good word processor — makes it easy to search large documents for key phrases and replace them either one a time (when you need to verify each instance) or all at a single click. Word processors can be fickle with their search or limited in their options, though, and their biggest strength can also be a pretty big weakness: word processors try to do your work for you.

That means sometimes they’ll interpret your instructions in a way you don’t want. More often, they’ll add extra formatting you don’t really need, so a lot of times you’ll be working with some text in WordPress or some other environment, and copy it into Word just do a Find-and-Replace, and end up with curly quotes and other symbols inserted and your spaces all messed up and inexplicable tables where you wanted blocks of text.

By contrast, the strength of text editors is in their simplicity. If you copy and paste something into a text editor, all you’re going to get is the text. You’ll lose your italics (which can be a big problem), but you’ll also lose whatever phantom code it is that’s giving you extra space between paragraphs or making all your body text 9.43-point Courier no matter how many times you tell it to be Times New Roman.

On top of that, appealing to the programmers again, advanced text editors tend to add Regular Expression support to their search and replace tool. If you’re familiar with wildcards in Word, you’ll know how handy it can be sometimes to search for a pattern instead of just a fix set of characters or words.

Regular expressions are like search wildcards on steroids. It’s essentially a programming language of its own, dedicated just to search and replace functionality. With a good regular expression it’s pretty easy (just as an examples) to copy a page full of HTML source code, and do one search and replace that strips out all of the HTML tags altogether, leaving you with nothing but the actual text of the page.

How to Modify HTML and CSS in EditPad Pro

If you’ve ever dabbled in any of this stuff, I’m sure some of the things I’ve mentioned above have left you drooling. It’s impossible to tell you how to do them, though, without focusing on a specific piece of software.

So that’s what I’ll do. I’ll name a handful of programs I’ve experimented with or heard recommended, but I’m going to get into details on how to do these things with my personal favorite. So come back tomorrow for a tutorial on text editing with EditPad Pro.

Comments are closed.