PyCharm 2016.1 Help

Configuring Line Separators

PyCharm makes it possible to set up line separators (line endings) for the newly created files, and change line separator style for the existing files.

In this section:

To set up line separators for new files

  1. In Settings, click Code Style.
  2. From the Line separator (for new files) drop-down list, select the desired line separator style:
    lineSeparatorForNewFiles
  3. Apply changes and close the dialog.

To view line ending style for the current file

  1. Open the desired file in the editor, as described in the section Opening and Reopening Files.
  2. View the Status bar: the current line endings style is denoted by the dedicated icon with the specified style, for example, uiStatusLineEnding.

To change line separator for a file, currently opened in the editor

  1. Open the desired file in the editor, as described in the section Opening and Reopening Files.
  2. 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:
      lineSeparatorPopup
    • Choose File | Line Separators on the main menu, and then choose the desired line ending style from the sub-menu.

To change line separator for a file or directory, selected in the Project view

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

  2. Choose File | Line Separatorson the main menu, and then select the desired line ending style from the sub-menu.
    lineSeparatorMenu_non_ij

Tips and tricks

See Also

Reference:

Getting Started:

Last modified: 20 April 2016