Search For Carriage Returns/Tabs In Documents [OS X Tips]

Search For Carriage Returns/Tabs In Documents [OS X Tips]

Sometimes within an OS X application you might want to search and replace all single tabs with two tabs, for example, or remove double carriage returns. However, if you type a Tab or hit Return in the search field of an app, it won’t have the desired effect. There’s a simple trick that can be used.


Here’s another tip from Mac Kung Fu, which contains over 300 tips, tricks, hints and hacks for OS X. It’s available from Amazon as well as other bookstores, and also as an eBook for all eReaders.

Open the search box as usual (i.e. within TextEdit by hitting Command + F), then hold Option while hitting Tab or Return. Doing so in most OS X apps will insert an “invisible” tab or carriage return character, allowing you to search for tabs and carriage returns within the document. You won’t see a symbol for each. Rather you’ll literally insert a tab or line break into the search field–and you can use the Up cursor key to return to the previous line in the case of a line break.

The ‘invisibles’ can be combined with any other search term. To search for a tab preceding the word “the”, for example, you would hold Option, then hit Tab, then type the.

Related
  • bshirley

    Pages 5.0.1 no longer supports inserting carriage returns in the search box with alt-return. #broken

About the author

Keir ThomasKeir Thomas (http://keirthomas.com) is the author of Mac Kung Fu, which contains over 300 tips, tricks, hints and hacks for Mac OS X Lion. He's also the author of over 10 other computing titles.

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in Mac, OS X, Tips & Tricks | Tagged: , , , , |