PhpStorm 2021.1 Help

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.

Set up line separators for new files

  1. Press Ctrl+Alt+S to open IDE settings and select Editor | Code Style.

  2. To configure line separators for new projects, go to File | New Projects Settings | Settings/Preferences for New Projects | Editor | Code Style.

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

    Line Separator for new files

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:

    current line separator

Change line separator for a file currently opened in the editor

  • From the main menu, choose File | File Properties | Line Separators and choose a line ending style from the list.

Change line separator for a file or directory selected in the Project view

  1. 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.

  2. From the main menu, choose File | File Properties | Line Separators, and then select a line ending style from the list.

Productivity tips

Last modified: 20 July 2021