# Extract Constant dialog

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

> **TL;DR**
> `Refactor | Extract Constant`
>
>
>
> `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))

| Item | Description |
| --- | --- |
| Name | Enter the name of the new constant. |
| Replace all occurrences | Select this option to automatically replace every occurrence of the selected expression (if the expression appears more than once in the method).  |

## See also

### External Links

[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/)

