GET STARTED

BBEdit: A Writer’s Secret Weapon

This app excels at both code and prose.

BBEdit

Legendary text and code editor

View

BBEdit started as a coding and development environment but quickly gained a following as a writing app, especially among online writers. As it turns out, tools that are useful for coding—from syntax highlighting to text manipulation to live web previews—are also great for writing.

Here are seven tips that will make BBEdit your new favorite writing and coding app.

Use the preview window

Whether you’re writing in Markdown, HTML, or XML, choose Markup > Preview in BBEdit to open a separate window displaying your writing as it would appear on a website, instantly updated as you make edits.

The Preview feature (top) lets you see how your HTML or Markdown file will appear when rendered; the Inspector (bottom) gives you detailed information about that rendering.

Compare with a previous version, or compare two files

BBEdit and macOS work together to preserve versions of your documents—you don’t have to do a thing. To see a list of saved versions of your current document, choose Search > Find Differences > Compare Against Previous Version; choose a version and click Compare to view them side by side.

To compare versions of two other documents, choose Search > Find Differences, then drag the documents into the Left and Right fields; click Compare.

In either case, BBEdit lists all differences at the bottom of the window; select a difference to see it highlighted in both documents.

Take advantage of Notes

BBEdit’s Notes feature gives you a convenient place to store ideas and other text you want to keep handy.

View your notes by choosing Window > Notes; click the plus sign in the Notes Browser to create a new note. Notes are automatically saved, and there’s no limit to how many you can have. (If your list is getting out of hand, Collections let you group related notes.)

Pro tip: To create a new note pre-filled with text from an existing BBEdit document, simply select the text, Control-click, and choose New Note (with Selection). Or select text in any other app on your Mac, Control-click, and choose Services > New Note in BBEdit.

Dig into BBEdit’s text-manipulation features

Few apps can munge text like BBEdit, and the app’s Text menu hosts a slew of handy text-processing actions. To get a feel for the possibilities, make a copy of a document so you can experiment without worry.

Here are some to try:

To convert selected text to formal title case, choose Text > Change Case > Make Title Case. Or to indent each line and insert a quoting character (>) in front of it (à la email quoting), choose Text > Increase Quote Level.

Another useful option is Text > Zap Gremlins, which deletes or replaces non-ASCII, null, and control characters that might be lurking in your text but not visible, just waiting to wreak havoc.

Perform multiple actions at once using a Text Factory.

Automate your copyediting

If you find yourself regularly straying from your publication’s style guide, or making the same spelling or capitalization errors over and over, the Canonize feature (Text > Canonize) can help.

Create a “style guide” text file, with each line listing a common word you type incorrectly (for example, “BBedit”) followed by a tab and the correct version (“BBEdit”). When you’re done writing, choose the Canonize command, select your style guide file, and BBEdit will comb through your document and magically fix any errors.

You can also use sophisticated regular-expression searches with Canonize, letting you quickly make complex find-and-replace substitutions (see “Read the manual,” below).

Build a Text Factory

While Canonize is great for fixing common errors, what if you need to regularly run a sequence of text-processing commands, or run them on multiple files at once? Maybe you need to tweak your documents to match a publication’s specific formatting rules, or finesse mangled text into something you can work with. Enter BBEdit’s powerful Text Factory feature.

Choose File > New > Text Factory, add an action by double-clicking it in the list on the left, then configure the action’s options. (For example, Educate Quotes converts straight quotes and apostrophes into the nicer-looking curly kind.) Add as many actions as you need—you can even include an AppleScript or shell script as one of your actions. Drag actions up or down the list to change the order they’re applied; when you’re done, save the Text Factory.

Now go to Text > Apply Text Filter and choose your custom Text Factory to apply it to the current document, or open the Text Factory itself to apply it to an entire folder or even drive of files.

Read the manual

“Read the manual” may not sound like much of a tip, but few apps have one as great as BBEdit’s. (Parts of the manual were written by respected Mac writer John Gruber.) In addition to clear, in-depth explanations of the app’s myriad features, it has one of the best tutorials you’ll find for learning regular-expression searching—a feature that’s especially useful for writers who need to find and replace not just simple words but complex phrases.

Just choose Help > User Manual.