Configuring Line Separators
WebStorm makes it possible to set up line separators (line endings) for the newly created files, and change line separator style for the existing files.
Setting up line separators for newly created files
To set up line separators for new files
In Settings, click Code Style.
From the Line separator (for new files) drop-down list, select the desired line separator style:
Apply changes and close the dialog.
Viewing line ending style for the current file
To view line ending style for the current file
Changing line separator for a file
To change line separator for a file, currently opened in the editor
Open the desired file in the editor, as described in the section Opening and Reopening Files.
- Do one of the following:
Click the line separator spin box in the Status bar, and choose the desired line ending style from the pop-up menu:
Chooseon the main menu, and then choose the desired line ending style from the sub-menu.
Changing line separator for a selection in the Project view
To change line separator for a file or directory, selected in the Project view
- Select a file or directory in the Project Tool Window.
Note that if a directory is selected, the line ending style applies to all nested files recursively.
Chooseon the main menu, and then select the desired line ending style from the sub-menu.