Atom Packages Directory

a package directory for a text editor of the 21st Century

Editorconfig by Sindre Sorhus

Install with:
    apm install editorconfig

EditorConfig Build Status

EditorConfig helps developers maintain consistent coding styles between different editors.

“I will take a peanut butter sandwich on white bread” – Ralph S. Mouse


$ apm install editorconfig

Or, Settings → Install → Search for editorconfig

Getting started

See the EditorConfig documentation for a detailed description of the .editorconfig file format.

  1. Open a project containing an .editorconfig file.
  2. Whenever you open a file in the project (or change any .editorconfig file from within Atom), EditorConfig evaluates the EditorConfig settings for the current file.
  3. EditorConfig then applies these settings to your current editor pane. Any change you make from now on will follow the EditorConfig settings. EditorConfig won’t automatically fix older files that it considers to be malformed.
  4. You can always check your EditorConfig settings against the current file using the EditorConfig: Show State command. You can try to fix malformed files using the command EditorConfig: Fix File.

:bulb: If EditorConfig detects any issues which may prevent it from working properly a :mouse: will appear in the status bar; click on it to open the state notification.

:warning: EditorConfig will not automatically fix malformed files (e.g. change all soft tabs to hard tabs) – you need to use the EditorConfig: Fix File command on each malformed file. Keep in mind that malformed files (especially mixed tab characters) may lead to unexpected behaviour.

Supported properties

:bulb: Any malformed or missing property is set to auto which leaves the control to Atom.

EditorConfig commands


Example file

```ini root = true

[*] indent_style = tab indent_size = 3 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true

[*.{json,yml}] indent_size = 2

[*.md] trim_trailing_whitespace = false ```



We’re sorry to hear you’re having trouble using atom-editorconfig! However, please bear some caveats in mind:

:bulb: You can check how EditorConfig affects your current file by invoking the EditorConfig: Show State command. If EditorConfig detects any issues which may prevent it from working properly a :mouse: will be shown in the status bar; clicking on it also opens the state notification.

Help us get better

We would be happy to hear from you – please report any feedback, issues or ideas. Thank you! :gift_heart:

:gift_heart: We thank our contributors for their amazing work to make Atom support editorconfig!


MIT © Sindre Sorhus

Keywords: editorconfig, format, code, style, code-style Suggest keywords
Fork me on GitHub