首页 > 代码库 > sublime搜索和替换-单文件搜索
sublime搜索和替换-单文件搜索
Searching
To open the search panel for the active file, press Ctrl + F. Someoptions and actions available through this panel can be controlled from thekeyboard:
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 is bound to Ctrl + I. The only differencewith the regular search panel lies in the behavior of theEnter key: inincremental searches, it will select the next match in the file and dismissthe search panel for you. Choosing between this panel or the regular searchpanel is mainly a matter of preference.
Replacing Text
To open the replace planel, press Ctrl+ H. Some actions available throughthis panel can be controlled from the keyboard.
Replace All | Ctrl + Alt + Enter |
Tips
Other Ways of Searching in Files
Goto Anything provides the # operator to search in the active file. Thesearch term will be the text following the operator.
Other Search-Related Key Bindings
These key bindings 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 in multiline search patterns into search panels. To enter newlinecharacters, pressCtrl +Enter. Note that search panels are resizable.