# Code Folding

> **TL;DR**
> `File | Settings | Editor | General | Code Folding` for Windows and Linux
>
>
>
> `CLion | Settings | Editor | General | Code Folding` for macOS
>
>
>
> `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)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.settings.svg)

Use this page to specify the default code folding settings. For shortcuts on how to expand or collapse code elements, refer to the [code folding](working-with-source-code.html#code_folding)  section.

| Item | Description |
| --- | --- |
|  Show code folding arrows |    Display code folding icons in the editor.     From the list, select the way in which the icons for unfolded areas should be displayed:       * Always: code folding icons are always displayed in the gutter.    * On mouse hover: code folding icons appear only when you hover over the gutter.                             ![Code folding](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_new_ui_code_folding.png)                     Show bottom arrows: display the bottom folding arrows in the gutter as well. Otherwise, only the top arrows are shown.    |
|  Fold by default |    Select the code fragments that should be folded by default, that is, when a file is first opened in the editor.      |

## How it works

*

* [Fold code elements](working-with-source-code.html#code_folding)

## See also

### Getting Started

[Editor basics](using-code-editor.html)

### Procedures

[Fold code elements](working-with-source-code.html#code_folding)

