Developments in Digital
Developments in Digital

Setting Atom default line endings

You can change the default line ending setting for new files within Atom.

Atom version 1.0.8 introduced the line ending selector package which allows you to change the line ending setting for the current file by selecting LR (Unix based) or CRLF (Windows based) within the Atom status bar.

This is useful for existing files, but by default for new files the package will use the OS default (LF on Unix, CRLF on Windows). It is recommended in general that you use LF line endings throughout. To change the default line endings for new files, follow these steps:

  • Select File->Settings
  • Select 'Packages'
  • Under Core Packages->line-ending-selector, select 'Settings'
  • Under the 'Default line ending' setting, choose 'LF' in the dropdown

You new files will now use LF as the default line ending setting. You can confirm this in the Atom status bar.