# 运行任何内容

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> 按两次 `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS))

运行任何内容   是一种快速启动 [运行/调试配置](run-debug-configuration.html)、应用程序、脚本、命令、任务以及打开最近 projects 的方式。 它还通过在您键入时生成建议来帮助您使用正确的命令语法。 当您调用命令时，   运行任何内容   会将后续工作委托给适当的工具。

![运行任何内容弹出窗口](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run_anything_mvn.png)

## 打开运行任何内容弹出窗口

Procedure:

* 按两次 `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS))。

> **Tip:**
> 您可以为此操作使用 [自定义快捷键](#customize_shortcut)。

还可以将   运行任何内容   ![运行任何内容](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.runAnything.svg) 图标添加到工具栏。 为此，请打开   设置   对话框（ `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))），转到  `外观与行为 | 菜单和工具栏` ，展开   主工具栏   节点，并添加   运行任何内容   操作，例如，在   随处搜索   下方。

或者，从主工具栏的上下文菜单中选择   自定义工具栏  ，然后添加   运行任何内容   操作，例如，在   随处搜索   下方。

有关更多信息，请参阅 [菜单和工具栏](customize-actions-menus-and-toolbars.html)。

## 启动运行/调试配置

Procedure:

* 开始键入 run/debug 配置名称，然后从建议列表中选择：

![从运行任何内容弹出窗口启动运行/调试配置](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run-anything-rc.png)

* 要对运行配置进行 [调试](debugging-code.html)，请在选择运行/调试配置时按住 `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (NetBeans), `Shift` (Eclipse), `Shift` (Eclipse (macOS))。

## 运行命令

Procedure:

* 开始键入命令名称，并使用方向键导航建议列表。 当您按下 `Space` (Windows), `Space` (macOS), `Space` (IntelliJ IDEA Classic (macOS)), `Space` (macOS System Shortcuts), `Space` (XWin), `Space` (GNOME), `Space` (KDE), `Space` (Emacs), `Space` (Sublime Text), `Space` (Sublime Text (macOS)), `Space` (Visual Studio), `Space` (Visual Studio (macOS)), `Space` (NetBeans), `Space` (Eclipse), `Space` (Eclipse (macOS)) 时，您将接受当前建议并获得特定于此命令的进一步建议。

![运行任何内容：输入软件包管理器的名称](https://resources.jetbrains.com.cn/help/img/idea/2026.3/ws_run_anything_npm.png)

![在 Run Anything 对话框中运行命令](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run_anything_mvn.png)

* 要获取所有可用命令的列表，请键入  `?` 。 命令列表取决于已安装/启用的插件。 如果命令不在建议列表中，它将在终端中执行。

默认情况下，工作目录取决于您当前所在的项目或模块。 要将当前文件的位置用作工作目录，请在运行命令时按住 `Alt` (Windows), `Alt` (macOS), `Alt` (IntelliJ IDEA Classic (macOS)), `Alt` (macOS System Shortcuts), `Alt` (XWin), `Alt` (GNOME), `Alt` (KDE), `Alt` (Emacs), `Alt` (Sublime Text), `Alt` (Sublime Text (macOS)), `Alt` (Visual Studio), `Alt` (Visual Studio (macOS)), `Alt` (NetBeans), `Alt` (Eclipse), `Alt` (Eclipse (macOS))。

您可以在对话框的右上角配置工作目录：

![在 Run Anything 对话框中配置 Context](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run-anything-configure-context.png)

## 打开一个最近的项目

您还可以通过   运行任何内容   弹出窗口快速重新打开一个 [最近的项目](null)。 搜索 project，通过名称或输入  `open`  来缩短建议列表，然后从列表中选择所需的项目，并按 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)):

![从运行任何内容弹出窗口打开最近的项目](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run-anything-project.png)

## 发送 HTTP 请求

如果在 [编写 HTTP 请求](http-client-in-product-code-editor.html)时指定了其名称，您可以从   运行任何内容  弹出窗口找到并发送此 HTTP 请求。

Procedure:

* 开始输入 HTTP 请求的名称，并从建议列表中选择它：

![发送 HTTP 请求](https://resources.jetbrains.com.cn/help/img/idea/2026.3/run_anything_http.png) 如果您的请求包含 [环境变量](http-client-variables.html#environment-variables)，请在选择请求时按 `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (NetBeans), `Shift` (Eclipse), `Shift` (Eclipse (macOS))。 这将打开弹出菜单，您可以在此选择用于请求的环境。

## 更改运行 Anything 快捷键

Procedure:

如果需要自定义为   运行任何内容   分配的快捷键（按两次 `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS))），请按照以下步骤操作：

1. 按 `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) 打开设置，然后选择  `按键映射` 。

2. 在搜索字段中，输入   运行任何内容  。

3. 为   运行任何内容  快捷键打开上下文菜单，并选择操作：添加、移除或编辑快捷键。 然后点击   OK  。

> **Tip:**
> 你可以完全 [禁用按两次修饰键的快捷键](configuring-keyboard-and-mouse-shortcuts.html#doublekey-disable_steps)。

