openFrameworks
openFrameworks copied to clipboard
Tabs or spaces - Added EditorConfig to help fix problems
The great old question - Tab or Space
Reminder: openFrameworks uses for C++/C - Tabs - with a space width 4 https://github.com/openframeworks/openFrameworks/wiki/oF-code-style
We have .clangformat for C / C++ / all clang editors like Xcode etc. For Xcode, @2bbb has added some values to configure this directly for the core mac/iOS/tvOS Project files
Added some .editorconfig and merged: https://github.com/openframeworks/openFrameworks/pull/6900 EditorConfig I've configured this to have exclusions to YML, JS and other formats where spaces are required.
This will fix format issues when editing source in editors such as:
- Sublime Text
- Notepad++
- Codeblocks
- Eclipse
- VSCode
etc
Essentially:
# EditorConfig https://editorconfig.org
root = true
# Default settings for all files
[*]
indent_style = tab
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.{js,py}]
charset = utf-8
[*.sh]
indent_style = tab
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
# Override JSON
[*.json]
indent_style = space
indent_size = 2
tab_width = 2
# Override YAML
[*.yml]
indent_style = space
indent_size = 2
tab_width = 2
[*.html]
indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_size = 2