EditorConfig
editorconfig.org
EditorConfig
# EditorConfig is awesome: https://editorconfig.org # top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation # Set default charset [*.{js,py}] charset = utf-8 # 4 space indentation [*.py] indent_style = space indent_size = 4 # Tab indentation (no size specified) [Makefile] indent_style = tab # Indentation override for all JS under lib directory [lib/**.js] indent_style = space indent_size = 2 # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_style = space indent_size = 2
file format for defining coding styles (that is supported by various text editor plugins)
Factsheet
Editorconfig
docs.editorconfig.org › en › master › editorconfig-format.html
EditorConfig: EditorConfig File Format
root: special property that should be specified at the top of the file outside of any sections. Set to "true" to stop .editorconfig files search on current file.
Author: editorconfig
Wikipedia
en.wikipedia.org › wiki › EditorConfig
EditorConfig - Wikipedia
1 week ago - EditorConfig plugins look for a file named .editorconfig 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.
Stack Overflow
stackoverflow.com › questions › 38502090 › is-it-possible-to-put-an-editorconfig-file-not-at-the-top-level-root-dir
configuration - Is it possible to put an editorconfig file not at the top level root dir? - Stack Overflow
Currently it is impossible: .editorconfig files are loaded from root to the directory of the file on each directory level.
freeCodeCamp
freecodecamp.org › news › how-to-use-editorconfig-to-standardize-code-styles
Why You Should Use EditorConfig to Standardize Code Styles
September 12, 2024 - You can start by generating the file with your editor, or just create a file named .editorconfig manually. You can copy-and-paste the example from the official website. Alternatively, you can put together all of your preferences and plan the ideal configuration for all files you might interact with. You can work from scratch, or start with mine and make the necessary adjustments. root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true curly_bracket_next_line = false spaces_around_operators = true [*.bat] end_of_line = crlf [*.cs] curly_bracket_next_line = true [*.{cpp,cs,gradle,java,kt,py,rs}] indent_size = 4 [*.{js,ts}] quote_type = single [*.md] trim_trailing_whitespace = false [*.tsv] indent_style = tab
Editorconfig
spec.editorconfig.org › index.html
EditorConfig Specification — EditorConfig Specification 0.17.2 documentation
Non-existing directories are treated ... section names matching the given filename. The search shall stop if an EditorConfig file is found with the root key set to true in the preamble or when reaching the root filesystem directory....
Daniel's Programming Blog
blog.danskingdom.com › Reasons-to-use-both-a-local-and-global-editorconfig-file
Reasons to use both a local and global editorconfig file - Daniel Schroeder’s Programming Blog
January 13, 2021 - # This .editorconfig file should live outside of all repositories (and thus not be committed to source control) in # a parent directory, as it includes personal preference presentation settings, like a tab's `indent_size`. # v1.2 root = true [*] indent_style = tab end_of_line = crlf trim_trailing_whitespace = true insert_final_newline = true indent_size = 4 [*.{html,xml,config,json}] indent_size = 2 [*.{md,psd1,pp,yml,yaml}] indent_style = space indent_size = 2
Wisdom Geek
wisdomgeek.com › development › programming › editorconfig
Why you should be using an EditorConfig file in your project - Wisdom Geek
October 15, 2023 - Also, you can specify different types of configurations for different file types, and you can even override the settings for a folder by creating another editorconfig in that directory. And if you are looking for more options to configure, there is a wiki with details about the possible ones. # indicate this is the root of the project root = true [*] indent_style = space end_of_line = lf charset = utf-8 trim_trailing_whitespace = true indent_size = 2 [*.html] indent_size = 4 max_line_length = 80 [*.md] trim_trailing_whitespace = falseBash
Michael Currin
michaelcurrin.github.io › code-cookbook › recipes › other › editor-config.html
EditorConfig | Code Cookbook
root = true [*] indent_style = space indent_size = 4 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true · Some devs like to set this before going into more formats. I don’t see it as needed. The final newline I handle in my global IDE settings, though other users might not. ... Based on the sample on the EditorConfig homepage.
Python
bugs.python.org › issue44854
Issue 44854: Add .editorconfig to the root directory - Python tracker
August 6, 2021 - This issue tracker has been migrated to GitHub, and is currently read-only. For more information, see the GitHub FAQs in the Python's Developer Guide · This issue has been migrated to GitHub: https://github.com/python/cpython/issues/89017