e01.org

EditorConfig

EditorConfig is an open specification and file format for syntax highlighting, text editors and integrated development environment (IDEs) that aims to maintain a consistent coding style, particularly aimed at groups working together. It can help keep multiple editors as well as individuals using the same conventions. It stores configurations in a file which can be shared by multiple people or used in multiple editors (by the same person or by many). It defines rules for how to format different programming languages or other structured text files with conventions such as what character to end a line with and how to manage indentation.

EditorConfig is an open specification and file format for syntax highlighting, text editors and integrated development environment (IDEs) that aims to maintain a consistent coding style, particularly aimed at groups working together. It can help keep multiple editors as well as individuals using the same conventions. It stores configurations in a file which can be shared by multiple people or used in multiple editors (by the same person or by many). It defines rules for how to format different programming languages or other structured text files with conventions such as what character to end a line with and how to manage indentation. ==Concept== The project web site states "EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems." ==Specification== Source: The configuration is typically stored in a UTF-8 encoded text file: . Some tools allow saving their style preferences as an EditorConfig file. Each line: May be blank (only whitespace characters) A comment that begins with ; or # A section header, which starts with a square bracket [, and ends with a square bracket ]. A section header may not have any non-whitespace characters outside of the brackets It may contain any characters between the brackets including whitespace/tabs It uses forward slash characters / as path separators Backslashes \ are prohibited, even on Windows. Key–value pair, with a = separating the key from the value Any other line format is invalid. It does not support in-line comments. If there is a ; or # character anywhere other than the start of line it is considered to be part of the text of the line. It does not support any character escaping. ===Parts/sections of file=== Preamble: optional key=value pairs that precede the first section. Section Name: String between [ ] Section: the key value pairs that follow a section name until the start of the next section. ===glob expressions=== Section names are file path globs, using a format similar to , and are based on Unix conventions. ===File location=== EditorConfig plugins look for a file named in the same directory that contains an existing file, and in parent directories of that one until it hits the root file path (e.g. in Linux/Unix/macOS or in the case of Microsoft Windows, or it finds an file that contains a line that states root=true . The most recent rules found take precedence in the order they are read. So rules in the same directory as the file would over-rule rules from higher level directories. ===File format=== Editor config uses the common INI configuration file format. ===Style options=== Some tools support additional options such as (which forces a hard line wrap after the specified number of characters) (supported by Emacs, Vim, Atom, and several others) ==Implementation== Many popular editors have adopted support of the specification. The GitHub page for the project has libraries written in Go programing language, C programing language, and Python programming language, and there is a Node.JS library as well. There is a comprehensive listing of editors available on the project site. ===Editors reported to work without use of a plug-in=== Gitea, GitHub, IntelliJ IDEA, PyCharm, BBEdit, Xcode 16, Kate, GNU Emacs , Komodo, Visual Studio, Vim/Neovim, and editors by JetBrains. ===Editors which require a plug-in=== Some editors require installation of a plug-in: Eclipse IDE, Atom, Geany, JEdit, Notepad++, NetBeans, Visual Studio Code, Sublime Text ===Build environments which require a plug-in=== Apache Ant, Gradle, Apache Maven ===Editors which don't support EditorConfig=== There is no list maintained of all the various text editors or IDEs which do not support EditorConfig (e.g. Spyder IDE has had support mentioned in the past, but does not seem to yet include it). ===Other software development tools which implement EditorConfig=== Prettier ==References==

References

  1. ^ Hombergs, Tom (2021-02-15). "Painless Code Formatting with EditorConfig" . reflectoring.io . Retrieved 2024-04-24 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1713913200.0
  2. ^ "Editorconfig/Editorconfig-core-go" . GitHub . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  3. ^ "Editorconfig/Editorconfig-core-c" . GitHub . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  4. ^ "Editorconfig/Editorconfig-core-py" . GitHub . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  5. ^ "Editorconfig" . 2 July 2023 . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  6. ^ "Projects Using EditorConfig" . GitHub . Retrieved 2024-04-24 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1713913200.0
  7. ^ "EditorConfig | IntelliJ IDEA" . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  8. ^ "GNU Emacs NEWS, New Modes and Packages in Emacs 30.1" . 2025-02-23 . Retrieved 2025-07-16 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1752620400.0
  9. ^ "EditorConfig - IntelliJ IDEs Plugin | Marketplace" . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  10. ^ "EditorConfig for VS Code - Visual Studio Marketplace" . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  11. ^ "Add support for .editorconfig #2464" . Syder-ide Github . June 2, 2015. Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  12. ^ "Define consistent coding styles with EditorConfig" . Microsoft Build . Microsoft. April 2024 . Retrieved April 1, 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  13. ^ " 'EDITORCONFIG' environmental variable for global config · Issue #465 · editorconfig/Editorconfig" . GitHub . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  14. ^ "Editor — Spyder 5 documentation" . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  15. ^ "How I Setup ESLint, Prettier, and EditorConfig for Static Sites" . DEV Community . 2022-01-25 . Retrieved 2024-04-24 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1713913200.0
  16. ^ "EditorConfig" . X (Formerly known as Twitter) . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  17. ^ The Codeholic. "What is .editorconfig - EditorConfig full Guide" . YouTube . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  18. ^ "Configuration files for code analysis rules" . Microsoft Build . 6 October 2023 . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  19. ^ " "EditorConfig" " . EditorConfig . Retrieved 23 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  20. ^ " "EditorConfig Specification" " . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  21. ^ "Code style options and code cleanup - Visual Studio (Windows)" . 15 May 2023. Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
  22. ^ " "What is .editorconfig ?" " . Geeks for Geeks . 7 March 2024 . Retrieved 24 April 2024 . Wikipedia revision 1373291139, retrieved 2026-11-18 · 1794956400.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"EditorConfig". 1788570194. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1373291139

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy