Since the early days, I’ve been using Find and Replace to take care of small issues in scripts. For example, I change the location in a series of scene headers. Or I’ll search for two spaces and replace them with one, because I’m now a one-spacer.
Today, I came upon a new use for Find and Replace.
In Fountain, you can leave notes for yourself by surrounding them in double brackets [[like this]]. These notes don’t show up when you print or export, so it’s fine to leave them in your script.
But sometimes, you want the notes to print. David Wain wrote me this afternoon:
I’d love to be able to send a PDF of my Fountain script that looks like a screenplay, but still has the bracketed notes inline so the reader can see all info in the document.
A super-simple way to do this is to get rid of the closing brackets on those notes. That way, they’ll print as action lines.
Just do a Find/Replace. Search for ]], and replace them with nothing. If you don’t want the opening [[, just search for those and replace them with nothing — or maybe something like “Note: “
This technique works in any text editor. But if you’d like a little more power, there’s now a better way.
Highland 1.7 has new find-and-replace talents that can do much more sophisticated matching.
Using the pattern above, you can change out double brackets for double asterisks all in one pass. Your notes will print in the script as bold action lines.
Here’s how to do it.
First off, save your document. Better saved than sorry, and you’ll want a version that keeps your notes all note-like.
Do a Find (⌘F).
The pattern you’re looking for is [[(any random text)]]. The brackets are easy. Matching the text between them has traditionally been more difficult.
Highland now has a wildcard token called (Any). You can find it by clicking the magnifying glass and choosing Insert Pattern from the menu.
In the next menu, choose “Any Characters.”
Your find field should now be [[(Any)]].
Tick the Replace checkbox on the right. In the next field, you tell Highland what you want it to put in place of what you found.
Let’s start with two asterisks. Then put another (Any) token. You can get it from the same Insert Pattern menu, or just copy-paste it from the line above.1 Finally, put another two asterisks so the whole line gets bold formatting.
Click the All button to replace all of the notes in the script. Those bracketed notes are now bolded action lines.
The options in the magnifying glass are useful for other things as well.
- By unchecking Ignore Case, you can match TOM versus Tom. To swap out a character’s name, do one pass for TOM, another for Tom.
- Use Full Word in order to match “ant” but not “antagonize.”
- The find menu lists recent searches, saving you a step.
Finally, one of my favorite features in Highland 1.7 is the faceless Find Again. Even when the Find field is closed, ⌘G will repeat your last search. It’s a handy way to hop through your script.
Almost all of this functionality comes for free with Mac OS. It’s one of the reasons it’s not easy to port Highland directly over to Windows or Linux or a web-based application.
- Behind the scenes, this is done with regular expressions. If you copy-and-paste this (Any) token, you’ll find it works in many Mac apps, even ones that use older Find dialog boxes. ↩