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.
This post contains affiliate links. Cult of Mac may earn a commission when you use our links to buy items.
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.