[FR] change of tab default in editor preference

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

[FR] change of tab default in editor preference

Post by heda »

90% of the usage of built-in editor (non-scientific estimation) is macro-coding
with py3 as default, should not the default setting for tabs in editor be to "insert spaces" instead of "keep tabs"?
checked with v0.20 and what i think is the actual defaults.
default setting editor tabs.png
default setting editor tabs.png (30.51 KiB) Viewed 444 times
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [FR] change of tab default in editor preference

Post by onekk »

Python PEP8 is advising to use 4 spaces, not strictly, as there are excpetions for old code, but is a widespread habits to use 4 spaces as it is more consistent.

Almost all python project I've seen uses 4 spaces for level of indentation.


Another suggestion would be to have a way to open the editor and write new code, now you are forced to open a .py or a .FCMacro file to enter the editor. (or at least I've not found a way yet)


so +1 for me.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply