Skip to content

Instantly share code, notes, and snippets.

@habedi
Last active March 20, 2024 02:39
Show Gist options
  • Save habedi/a8de803aa6823e8d02e48dca9b56b1a1 to your computer and use it in GitHub Desktop.
Save habedi/a8de803aa6823e8d02e48dca9b56b1a1 to your computer and use it in GitHub Desktop.
My (template) EditorConfig file
# EditorConfig is awesome: https://EditorConfig.org
# Top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
trim_trailing_whitespace = true
# Python specific setting
[*.py]
indent_size = 4
max_line_length = 120
# YAML files, often used for configuration
[*.yml]
indent_size = 2
# Markdown files have unique whitespace handling
[*.md]
trim_trailing_whitespace = false
# Bash script specific settings
[*.sh]
indent_size = 2
# SQL files
[*.sql]
indent_size = 2
# C/C++ files
[{*.c,*.cpp,*.h,*.hpp}]
indent_size = 2
indent_style = space
max_line_length = 120
trim_trailing_whitespace = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment