Add .editorconfig (#810)

More information: http://editorconfig.org/
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..708188a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,18 @@
+root = true
+
+[*]
+charset = utf-8
+trim_trailing_whitespace = true
+end_of_line = lf
+insert_final_newline = true
+
+[*.{c,cc,h,hh}]
+indent_size = 2
+indent_style = space
+tab_width = 8
+
+[*.{py,sh}]
+indent_style = tab
+
+[{CMakeLists.txt,*.cmake}]
+indent_size = 2