Search and Replace - Single File¶
Warning
Development of Sublime Text has moved on to version 3.
As a result,
this branch for Sublime Text 2
will not be updated any more.
Please select the latest
branch
in the panel on the bottom left
and consider updating Sublime Text.
Searching¶
To open the search panel for buffers, press Ctrl + F
. Some options in
the search panel and search actions can be controlled with the keyboard:
Toggle Regular Expressions | Alt + R |
Toggle Case Sensitivity | Alt + C |
Toggle Exact Match | Alt + W |
Find Next | Enter |
Find Previous | Shift + Enter |
Find All | Alt + Enter |
Incremental Search¶
The incremental search panel can be brought up with Ctrl + I
. The only
difference with the regular search panel lies in the behavior of the Enter`
key: in incremental searches, it will select the next match in the buffer and
dismiss the search panel for you. Choosing between this panel or the regular
search panel is mainly a matter of preference.
Tips¶
Other Ways of Searching in Buffers¶
Goto Anything provides the operator #
to search in
the current buffer, see Goto Anything directives.
Other Key Bindings to Search in Buffers¶
These keybindings work when the search panel is hidden.
Search Forward Using Most Recent Pattern | F3 |
Search Backwards Using Most Recent Pattern | Shift + F3 |
Select All Matches Using Most Recent Pattern | Alt + F3 |
Multiline Search¶
You can type a multiline search pattern. To enter a newline character, press
Ctrl + Enter
in the search panel. Note that the search panel is resizable
too.