Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The `.editorconfig` file that I currently use (my personal `~/.editorconfig` file)
# ==============================================================================
# This file is for unifying the coding style for different editors and IDEs
#
# For full details see: http://editorconfig.org/
#
# An explanation of all available properties can be found at:
# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
# ==============================================================================
# ==============================================================================
# This is not the top-most EditorConfig file you are looking for
# ------------------------------------------------------------------------------
root = false
# ==============================================================================
# ==============================================================================
# Defaults for anything that is not specifically listed
# ------------------------------------------------------------------------------
[*]
# ------------------------------------------------------------------------------
# Widely Supported by Editors
# ------------------------------------------------------------------------------
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
# ------------------------------------------------------------------------------
# Supported By A Limited Number of Editors
# ------------------------------------------------------------------------------
max_line_length=off
# ==============================================================================
# ==============================================================================
# Settings for specific file types
# ------------------------------------------------------------------------------
[*.js]
indent_size = 2
max_line_length=120
# ------------------------------------------------------------------------------
[*.json]
indent_size = 2
# ------------------------------------------------------------------------------
[*.md]
indent_size = 4
max_line_length=80
trim_trailing_whitespace = false
# ------------------------------------------------------------------------------
[*.php]
indent_size = 4
max_line_length=120
# ------------------------------------------------------------------------------
[*.rb]
indent_size = 2
# ------------------------------------------------------------------------------
[*.sh]
indent_size = 4
max_line_length=80
# ------------------------------------------------------------------------------
[*.xml]
indent_size = 4
# ------------------------------------------------------------------------------
[*.yml]
indent_size = 2
# ==============================================================================
# ==============================================================================
# settings for exact files
# ------------------------------------------------------------------------------
[{composer.json}]
indent_size = 4
# ------------------------------------------------------------------------------
[{.gitignore, .editorconfig}]
indent_size = 2
# ==============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.