Searching Everywhere随处搜索
You can find any item in the project or outside of it by its name. 您可以通过名称在项目中或项目外部找到任何项目。You can search for files, actions, classes, symbols, settings, UI elements, and anything in Git from a single entry point.您可以从单个入口点搜索Git中的文件、操作、类、符号、设置、UI元素和任何内容。
Refer to Search for a target within a file for more details about searching text within your project.有关在项目中搜索文本的详细信息,请参阅在文件中搜索目标。
Search everywhere搜索任意位置

-
From the main menu, select All, Classes, Files, Symbols, and Actions tabs.从主菜单中,选择“导航”|“随处搜索”,或按Shift键两次以打开包含“所有”、“类”、“文件”、“符号”和“操作”选项卡的搜索窗口。 or press Shift twice to open the search window with theBy default, the All tab opens and WebStorm displays the list of recent files.默认情况下,“所有”选项卡打开,WebStorm显示最近文件的列表。To open the tab you need, use the following shortcuts:要打开所需的选项卡,请使用以下快捷方式:-
File or folder- Ctrl+Shift+N, CamelCase and snake_case are supported.文件或文件夹-支持Ctrl+Shift+N、驼峰大小写和蛇形大小写。Note that WebStorm does not search for excluded files and directories, see Excluding files and Configuring folders in a content root for details.请注意,WebStorm不会搜索排除的文件和目录,有关详细信息,请参阅排除文件和在内容根目录中配置文件夹。 -
Class类- Ctrl+N. -
Symbol符号- Ctrl+Alt+Shift+N. -
Action操作- Ctrl+Shift+A.You can find any action even if it doesn't have a mapped shortcut or appear in the menu.您可以找到任何操作,即使它没有映射的快捷方式或显示在菜单中。For example, Emacs actions, such as kill rings, sticky selection, or hungry backspace.例如,Emacs操作,如杀死环、粘性选区或饥饿退格。
-
-
Start typing your query.开始键入您的查询。WebStorm lists the results grouped by scoped where your query is found.WebStorm列出了按查询所在范围分组的结果。Press Ctrl+Up or Ctrl+Down to jump between sections.按Ctrl+Up或Ctrl+Down可在节之间跳转。Click单击to list the search results in the Find tool window.
以在“查找”工具窗口中列出搜索结果。
-
Press Tab to switch the scope of your search to classes, files, symbols, or actions.按Tab键将搜索范围切换到类、文件、符号或操作。When the Files scope is selected, WebStorm shows only matching project files.选择“文件”范围后,WebStorm仅显示匹配的项目文件。To show matching libraries and files from other projects, select the Include non-project items checkbox or again press Shift twice.要显示其他项目中的匹配库和文件,请选中“包含非项目项”复选框,或再次按Shift键两次。 -
To narrow down your search, click the Filter icon要缩小搜索范围,请单击窗口工具栏上的“过滤器”图标on the window toolbar and select the appropriate option.
,然后选择相应的选项。
For example, you can have only recently opened files shown.例如,只能显示最近打开的文件。 -
To see the results of your search in the Find tool window, click the Open in Find tool window icon要在“查找”工具窗口中查看搜索结果,请单击窗口工具栏上的“在查找工具窗口中打开”图标on the window toolbar.
。
This icon is disabled when you search in the Actions scope.在“操作”范围中搜索时,此图标被禁用。
Search for files and folders搜索文件和文件夹

-
Press Ctrl+Shift+N and start typing your query, CamelCase and snake_case are supported.按Ctrl+Shift+N并开始键入您的查询,驼峰大小写和蛇形大小写都受支持。The list shrinks as you type.键入时,列表将缩小。 -
Select the file or folder you need and press Enter.选择你想要的文件或文件夹,并按下Enter。If you selected a file, WebStorm opens it in a new editor tab.如果您选择了一个文件,WebStorm将在新的编辑器选项卡中打开它。If you are searching for a folder, WebStorm opens the Project tool window with the cursor at the selected folder.如果正在搜索文件夹,WebStorm将打开“项目”工具窗口,光标位于选定文件夹。
Search for commands搜索命令
You can search for commands that control the settings related to appearance and behavior of WebStorm. 您可以搜索控制与WebStorm的外观和行为相关的设置的命令。For commands, you can turn the corresponding settings on and off straight from the search window. 对于命令,可以直接从搜索窗口打开和关闭相应的设置。For actions WebStorm gives you quick access to the Settings/Preferences dialog.对于操作,WebStorm允许您快速访问“设置/首选项”对话框。

-
Press Shift twice to open the search window and type按Shift键两次以打开搜索窗口并键入/
./
。WebStorm lists the available groups of settings.WebStorm列出了可用的设置组。 -
Select the relevant group of settings and press Enter.选择相关的设置组,然后按Enter键。WebStorm shows the available commands related to the selected group.WebStorm显示与选定组相关的可用命令。 -
To toggle the status of a setting, select it in the list and press Enter.要切换设置的状态,请在列表中选择该设置,然后按Enter键。
Search for actions搜索行动
WebStorm lets you search for actions and run some of them straight from the search window.WebStorm允许您搜索操作,并直接从搜索窗口运行其中一些操作。

For actions that control WebStorm settings, the corresponding page in the Settings/Preferences dialog opens.对于控制WebStorm设置的操作,将打开“设置/首选项”对话框中的相应页面。

If the action invokes a popup, this popup is shown instead of the Settings /Preferences dialog.如果该操作调用弹出窗口,则会显示该弹出窗口,而不是“设置/首选项”对话框。

-
Press Ctrl+Shift+A to open the Actions tab.按Ctrl+Shift+A打开“操作”选项卡。Start typing the name of the action to find, then select the required action and press Enter.开始键入要查找的操作的名称,然后选择所需的操作并按Enter键。WebStorm either runs the selected action or opens the page with the corresponding settings.WebStorm运行所选操作或使用相应设置打开页面。 -
Alternatively, press Shift twice to open the search window and switch to the Actions tab or just start typing the action name and select the action in the Actions group.或者,按Shift键两次以打开搜索窗口并切换到“操作”选项卡,或者只需开始键入操作名称并在“操作”组中选择操作。
Search for abbreviations搜索缩写
With WebStorm, you can assign an alias to an action and then use this alias to find and quickly access the action. 使用WebStorm,您可以为动作指定别名,然后使用此别名查找并快速访问该动作。The example below shows how you can find and invoke the Close Active Editor action by a previously assigned abbreviation.下面的示例显示了如何通过先前指定的缩写查找和调用“关闭活动编辑器”操作。

-
In the Settings/Preferences dialog Ctrl+Alt+S, go to .在“设置/首选项”对话框中Ctrl+Alt+S,转到键盘映射。In the right-hand pane, select Add abbreviation from the context menu.在右侧窗格中,选择“其他”|“关闭活动编辑器”,然后从关联菜单中选择“添加缩写”。 , and then selectIn the dialog that opens, specify the abbreviation you are going to use, for example,在打开的对话框中,指定要使用的缩写,例如cae
, and click OK.cae
,然后单击“确定”。 -
Press Shift twice to open the search window, select the All scope, and type按cae
in the search field.Shift
键两次以打开搜索窗口,选择“所有”范围,然后在搜索字段中键入cae
。WebStorm shows the Close Active Editor item to which you've assigned this abbreviation.WebStorm显示您已指定此缩写的“关闭活动编辑器”项。Press Enter to close the current editor tab.按Enter键关闭当前编辑器选项卡。
Evaluate mathematical expressions计算数学表达式
You can quickly type and evaluate simple mathematical expressions.您可以快速键入和计算简单的数学表达式。
-
Press Shift twice to open the search window.按Shift键两次以打开搜索窗口。 -
Enter an expression you want to evaluate, WebStorm will display the answer in the search results.输入要计算的表达式,WebStorm将在搜索结果中显示答案。You can use basic arithmetic operators —可以使用基本算术运算符-+
,-
,*
,/
, as well as^
for power — and basic math functions:sqrt()
,sin()
,cos()
,tan()
.+
、-
、*
、/
,以及对于幂函数,使用^
,对于基本数学函数,使用:sqrt()
、sin()
、cos()
、tan()
。
Search Git搜索Git
You can search for Git branches, commits, tags, messages, and so on.您可以搜索Git分支、提交、标记、消息等。
-
Press Shift twice to open the search window.按Shift键两次以打开搜索窗口。 -
Click the Git tab and enter your search query.单击“Git”选项卡并输入搜索查询。WebStorm displays the search results in the scope of Git.WebStorm在Git范围内显示搜索结果。