Add .editorconfig file
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jun 2018 16:09:45 +0000 (18:09 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jun 2018 16:09:45 +0000 (18:09 +0200)
This is a fairly well supported file-type configuration
for indentation and trailing space stripping.

See editorconfig.org for details.

.editorconfig [new file with mode: 0644]

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..d0e94a1
--- /dev/null
@@ -0,0 +1,31 @@
+# C/C++
+[*.{c,cc,h,hh,inl}]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+# CMake & Text
+[*.{cmake,txt}]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = tab
+indent_size = 4
+
+# Python
+[*.py]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+# Shell
+[*.sh]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = tab
+indent_size = 4