Skip to content

Gemini CLI 键盘快捷键

¥Gemini CLI Keyboard Shortcuts

本文档列出了 Gemini CLI 中可用的键盘快捷键。

¥This document lists the available keyboard shortcuts in the Gemini CLI.

一般的

¥General

捷径

¥Shortcut

描述

¥Description

Esc

¥Esc

关闭对话和建议。

¥Close dialogs and suggestions.

Ctrl+C

¥Ctrl+C

取消正在进行的请求并清除输入。按两次即可退出应用程序。

¥Cancel the ongoing request and clear the input. Press twice to exit the application.

Ctrl+D

¥Ctrl+D

如果输入为空,则退出应用程序。按两次确认。

¥Exit the application if the input is empty. Press twice to confirm.

Ctrl+L

¥Ctrl+L

清除屏幕。

¥Clear the screen.

Ctrl+O

¥Ctrl+O

切换调试控制台的显示。

¥Toggle the display of the debug console.

Ctrl+S

¥Ctrl+S

允许完整打印长响应,禁用截断。使用终端的回滚功能可查看完整输出。

¥Allows long responses to print fully, disabling truncation. Use your terminal's scrollback to view the entire output.

Ctrl+T

¥Ctrl+T

切换工具描述的显示。

¥Toggle the display of tool descriptions.

Ctrl+Y

¥Ctrl+Y

为所有工具调用切换自动批准(YOLO 模式)。

¥Toggle auto-approval (YOLO mode) for all tool calls.

输入提示

¥Input Prompt

捷径

¥Shortcut

描述

¥Description

!

¥!

当输入为空时切换 shell 模式。

¥Toggle shell mode when the input is empty.

\(在行尾)+Enter

¥\ (at end of line) + Enter

插入换行符。

¥Insert a newline.

Down Arrow

¥Down Arrow

向下浏览输入历史记录。

¥Navigate down through the input history.

Enter

¥Enter

提交当前提示。

¥Submit the current prompt.

Meta+Delete/Ctrl+Delete

¥Meta+Delete / Ctrl+Delete

删除光标右侧的单词。

¥Delete the word to the right of the cursor.

Tab

¥Tab

如果存在,则自动完成当前建议。

¥Autocomplete the current suggestion if one exists.

Up Arrow

¥Up Arrow

向上浏览输入历史记录。

¥Navigate up through the input history.

Ctrl+A/Home

¥Ctrl+A / Home

将光标移动到行首。

¥Move the cursor to the beginning of the line.

Ctrl+B/Left Arrow

¥Ctrl+B / Left Arrow

将光标向左移动一个字符。

¥Move the cursor one character to the left.

Ctrl+C

¥Ctrl+C

清除输入提示

¥Clear the input prompt

Esc(双击)

¥Esc (double press)

清除输入提示。

¥Clear the input prompt.

Ctrl+D/Delete

¥Ctrl+D / Delete

删除光标右侧的字符。

¥Delete the character to the right of the cursor.

Ctrl+E/End

¥Ctrl+E / End

将光标移动到行尾。

¥Move the cursor to the end of the line.

Ctrl+F/Right Arrow

¥Ctrl+F / Right Arrow

将光标向右移动一个字符。

¥Move the cursor one character to the right.

Ctrl+H/Backspace

¥Ctrl+H / Backspace

删除光标左侧的字符。

¥Delete the character to the left of the cursor.

Ctrl+K

¥Ctrl+K

从光标处删除到行尾。

¥Delete from the cursor to the end of the line.

Ctrl+Left Arrow/Meta+Left Arrow/Meta+B

¥Ctrl+Left Arrow / Meta+Left Arrow / Meta+B

将光标向左移动一个单词。

¥Move the cursor one word to the left.

Ctrl+N

¥Ctrl+N

向下浏览输入历史记录。

¥Navigate down through the input history.

Ctrl+P

¥Ctrl+P

向上浏览输入历史记录。

¥Navigate up through the input history.

Ctrl+Right Arrow/Meta+Right Arrow/Meta+F

¥Ctrl+Right Arrow / Meta+Right Arrow / Meta+F

将光标向右移动一个单词。

¥Move the cursor one word to the right.

Ctrl+U

¥Ctrl+U

从光标处删除到行首。

¥Delete from the cursor to the beginning of the line.

Ctrl+V

¥Ctrl+V

粘贴剪贴板内容。如果剪贴板包含图像,则会保存该图像并在提示中插入对图像的引用。

¥Paste clipboard content. If the clipboard contains an image, it will be saved and a reference to it will be inserted in the prompt.

Ctrl+W/Meta+Backspace/Ctrl+Backspace

¥Ctrl+W / Meta+Backspace / Ctrl+Backspace

删除光标左侧的单词。

¥Delete the word to the left of the cursor.

Ctrl+X/Meta+Enter

¥Ctrl+X / Meta+Enter

在外部编辑器中打开当前输入。

¥Open the current input in an external editor.

建议

¥Suggestions

捷径

¥Shortcut

描述

¥Description

Down Arrow

¥Down Arrow

向下浏览建议。

¥Navigate down through the suggestions.

Tab/Enter

¥Tab / Enter

接受选定的建议。

¥Accept the selected suggestion.

Up Arrow

¥Up Arrow

浏览建议。

¥Navigate up through the suggestions.

单选按钮选择

¥Radio Button Select

捷径

¥Shortcut

描述

¥Description

Down Arrow/j

¥Down Arrow / j

向下移动选择。

¥Move selection down.

Enter

¥Enter

确认选择。

¥Confirm selection.

Up Arrow/k

¥Up Arrow / k

向上移动选择。

¥Move selection up.

1-9

¥1-9

按编号选择一个项目。

¥Select an item by its number.

(多位数字)

¥(multi-digit)

对于数字大于 9 的项目,请快速连续按下数字以选择相应的项目。

¥For items with numbers greater than 9, press the digits in quick succession to select the corresponding item.

IDE 集成

¥IDE Integration

捷径

¥Shortcut

描述

¥Description

Ctrl+G

¥Ctrl+G

查看从 IDE 收到的上下文 CLI

¥See context CLI received from IDE