Configuring Line Separators
With IntelliJ IDEA, you can set up line separators (line endings) for newly created files, and change line separator style for existing files.
Set up line separators for new files
Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style.
To configure line separators for new projects, go to
.From the Line separator list, select the line separator style you want to apply.
Check line separator style for the current file
The line separator style applied to the current file is indicated in the status bar, for example:
Change line separator for a file currently opened in the editor
From the main menu, choose
and choose a line ending style from the list.
Change line separator for a file or directory selected in the Project view
Select a file or directory in the Project tool window Alt+1.
Note that if a directory is selected, the line ending style applies to all nested files recursively.
From the main menu, choose
, and then select a line ending style from the list.
Productivity tips
Use multiple selection in the Project view.
Changing line separator is reflected in the Local history of a file.
Run the inspection 'Inconsistent line separators' to find out, which files use line separator different from project's default.