# 提取常量对话框

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

> **TL;DR**
> `重构 | 提取常量`
>
>
>
> `Ctrl+Alt+C` (Windows), `⌘ ⌥ C` (macOS), `⌘ ⌥ C` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ C` (macOS System Shortcuts), `Ctrl+Alt+C` (XWin), `Ctrl+Alt+C` (GNOME), `Ctrl+Alt+C` (KDE), `Ctrl+Alt+C` (Emacs), `Ctrl+Alt+C` (Sublime Text), `⌘ ⌥ C` (Sublime Text (macOS)), `Ctrl+Alt+C` (VSCode), `Ctrl+Alt+C` (VSCode (macOS))

|  项目  |  描述  |
| --- | --- |
|  名称  |  输入新常量的名称。  |
|  替换所有出现的地方  |  选择此选项可自动替换所选表达式的每次出现（如果该表达式在方法中出现多次）。  |

## See also

### 外部链接

[https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/](https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/)

