# Configure line separators

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

With GoLand, you can set up line separators (line endings) for newly created files and change the line separator style for existing files.

<a id="separator_settings"></a>

Procedure: Configure line separators for new files

1. Press [Settings… shortcut](https://www.jetbrains.com/help/go/llms-keymap-index.md "ShowSettings") to open settings and then select `Editor | Code Style`.

> **Tip:**
> To configure line separators [for new projects](https://www.jetbrains.com/help/go/configure-project-settings.html.md#new-default-settings), go to `File | New Projects Setup | Settings for New Projects | Editor | Code Style`.

2. Select the code style Scheme that you want to modify: the [Project](https://www.jetbrains.com/help/go/configuring-code-style.html.md#project-scheme) scheme or one of the [IDE-level scheme](https://www.jetbrains.com/help/go/configuring-code-style.html.md#default-scheme).

3. From the Line separator list, select the line separator style you want to apply.

* System-Dependent: select this option to use the separator default for your OS.

* Unix and macOS ( ): select this option to use the Unix and macOS line separator.

* Windows ( ): select this option to use the Windows line separator.

* Classic Mac OS ( ): select this option to use the `\r` line separator, which was used in [Classic Mac OS](https://en.wikipedia.org/wiki/Classic_Mac_OS) (up to Mac OS 9).

4. Apply the changes and close the dialog.

![Line Separator for new files](https://resources.jetbrains.com/help/img/idea/2026.3/lineSeparatorForNewFiles.png)

<a id="change_line_ending"></a>

Procedure: Change line separators for the current file

The line separator widget appears in the [status bar](https://www.jetbrains.com/help/go/guided-tour-around-the-user-interface.html.md#status-bar) of the IDE window when a file is open in the editor.

* Click the widget and select another line separator style.

![current line separator](https://resources.jetbrains.com/help/img/idea/2026.3/uiStatusLineEnding.png)

* Alternatively, select another ending style in `File | File Properties | Line Separators`.

Changing the line separator style is reflected in the [Local history](https://www.jetbrains.com/help/go/local-history.html.md) of a file.

> **Tip:**
> If you cannot see the line separator widget in the status bar, go to `View | Appearance | Status Bar Widgets` in the main menu and enable the Line Separators option.

<a id="change-line-separators-for-a-file-or-directory"></a>

Procedure: Change line separators for a file or directory

1. In the    Project  tool window ([ActivateProjectToolWindow shortcut](https://www.jetbrains.com/help/go/llms-keymap-index.md "ActivateProjectToolWindow") or `View | Tool Windows | Project)` , select a file or a directory.

If you select a directory, the new line-ending style will be applied to all nested files recursively.

2. In the main menu, go to `File | File Properties | Line Separators`, and then select a line-ending style from the list.

> **Tip:**
> Run the Inconsistent line separators inspection to find out which files use line separator that differs from the project's default   . Learn more about running inspections from [Run a single inspection](https://www.jetbrains.com/help/go/running-inspections.html.md#run-one-inspection).

## See also

### Procedures

[EditorConfig](https://www.jetbrains.com/help/go/editorconfig.html.md) [Code style schemes](https://www.jetbrains.com/help/go/configuring-code-style.html.md) [Reformat code](https://www.jetbrains.com/help/go/reformat-and-rearrange-code.html.md)

### Reference

[Settings | Code Style](https://www.jetbrains.com/help/go/settings-code-style.html.md)

