Discovering Search and Replace
Search and Replace is one of the common actions for any text editor. Sublime Text has two main search features:
Single file
Multiple files
Before covering these topics, let's talk about the best tool available for searching text and especially, patterns; namely, Regular Expressions.
Regular Expressions
Regular Expressions can find complex patterns in text. To take full advantage of the Search and Replace features of Sublime, you should at least know the basics of Regular Expressions, also known as regex or regexp. Regular Expressions can be really annoying, painful, and joyful at the same time!
We won't cover Regular Expressions in this book because it's an endless topic. We will only note that Sublime Text uses the Boost's Perl Syntax for Regular Expressions; this can be found at
Tip
I recommend going to http://www.regular-expressions.info/quickstart.html if you are not familiar with Regular Expressions.
Search and Replace – a single file
Let's open the Search panel...