3 ms·
Regarding the curly brackets thing vs. end statements and indentation: How is this a problem with editors/IDEs doing it all for you? If your editor/IDE does no
by not-much-io 10y ago
Regarding the curly brackets thing vs. end statements and indentation:
How is this a problem with editors/IDEs doing it all for you? If your editor/IDE does not do this, then.. why don't you have this in your setup?
- mschuster91 10y agoYou can do auto-indent in Java, PHP, Perl... but not in C/C++, where you're free to embed curly braces etc. in macros, and it's really common to do so. To make matters worse, you actually need to compile the program in order to determine which macro gets expanded into what amount of braces...
- 0x0dea 10y agoVim auto-indents macro blocks just fine, and preprocessing isn't compilation. For your edification, clang-format is amazing: https://youtu.be/JSjoCisIHcM?t=1764 https://youtu.be/JSjoCisIHcM?t=1764
- not-much-io 10y agoAh now I see. Although I understand that there are some tools that do this, it is not a trivial process like in many other languages. Thanks for enlightening me.