Skip to content

Instantly share code, notes, and snippets.

@Potherca
Created July 19, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Potherca/2988f856dc7723d80601ba3b60f58bf8 to your computer and use it in GitHub Desktop.
Save Potherca/2988f856dc7723d80601ba3b60f58bf8 to your computer and use it in GitHub Desktop.
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