Configuring Line Separators
With PhpStorm, you can set up line separators (line endings) for newly created files, and change line separator style for existing files.
Setting up line separators for newly created files
In the Settings/Preferences dialog Ctrl+Alt+S, go to .
From the Line separator list, select the desired line separator style.
View line ending style for the current file
Open the desired file in the editor.
View the status bar: the current line endings style is denoted by the dedicated icon with the specified style, for example, .
Change line separator for a file currently opened in the editor
Open the desired file in the editor.
-
On the status bar, click the line separator spin box and choose the desired line ending style from the list:
Alternatively, go to
from the main menu, and then select the desired 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, go to
, and then select the desired 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.