Skip to content

Instantly share code, notes, and snippets.

@rinaldo-rex
Last active May 29, 2019 13:52
Show Gist options
  • Save rinaldo-rex/3c1cfbd3c7dabb3e5715414ffba3dd07 to your computer and use it in GitHub Desktop.
Save rinaldo-rex/3c1cfbd3c7dabb3e5715414ffba3dd07 to your computer and use it in GitHub Desktop.
Editor config for python projects
# https://editorconfig.org/
# NOTE: This is the editor config of python's django project. :) Thanks to them.
root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
# Docstrings and comments use max_line_length = 79
[*.py]
max_line_length = 119
# Use 2 spaces for the HTML files
[*.html]
indent_size = 2
# Add the following to your .editorconfig so you manage rest files properly.
[{*.rst,*.rst.txt}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 3
# The JSON files contain newlines inconsistently
[*.json]
indent_size = 2
insert_final_newline = ignore
[**/admin/js/vendor/**]
indent_style = ignore
indent_size = ignore
# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = ignore
insert_final_newline = ignore
# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab
# Batch files use tabs for indentation
[*.bat]
indent_style = tab
[docs/**.txt]
max_line_length = 79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment