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
See the EditorConfig documentation for a detailed description of the .editorconfig
file format.
.editorconfig
file..editorconfig
file from within Atom),
EditorConfig evaluates the EditorConfig settings for the current file.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.
root
charset
end_of_line
indent_style
indent_size
/
tab_width
(indent_size
takes precedence over tab_width
)insert_final_newline
(setting this to false
strips final newlines)max_line_length
trim_trailing_whitespace
:bulb: Any malformed or missing property falls back to
unset
which leaves the control to Atom.
:warning: Atom does not support CR line-endings. When
end_of_line
is set tocr
, EditorConfig will respect the setting when saving files, but their contents will appear to be squashed onto a single line.
EditorConfig: Fix File
: Fixes indent_style
and end_of_line
issues for the current editor.EditorConfig: Fix File Quietly
: Same as Fix File
, except no feedback is displayed after fixing.EditorConfig: Show State
: Shows the current state of EditorConfig for your current editor.EditorConfig: Generate Config
: Generates an initial .editorconfig
for your project..editorconfig
fileindent_style
and end_of_line
issues.editorconfig
files (now with specification-like case insensitivity).editorconfig
file.editorconfig
file based on the current settingsShow State
command for you.editorconfig
file and reapplies all settings to all opened editor-panesroot = 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
See changelog.md
.
We're sorry to hear you're having trouble using atom-editorconfig
!
Please bear some caveats in mind:
EditorConfig: Fix File
command.indent_style
not working?soft
or hard
, this prevents EditorConfig from influencing the indentation style.
Set Atom's "Tab Type" to auto
to allow EditorConfig taking control over the indentation characters.whitespace
package) override the EditorConfig settings.
In these cases, we try to alert you about confirmed interferences and suggest that you try disabling the other package.
If you face any unreported issues, please let us know.: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 it displays a :mouse: in the status bar; clicking on it opens the state notification (like theShow State
command).
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