Export "Detect and use existing file indents for editing" option to .editorconfig file
Completed
Hello, everyone.
I want to share indent settings with team throw the .editorconfig file. By default, option Preferences | Editor | Code style – Detect and use existing file indents for editing already setted up and sometimes instead of expected tab I see spaces. So, my question is it possible to export this option to config file?
Thanks.
Please sign in to leave a comment.
Hi,
Have you tried exporting and importing settings (https://www.jetbrains.com/help/pycharm/exporting-and-importing-settings.html)?
You could choose Code style to import.
Yes, I did. But this option wasn't exported. There was only settings:
charset
insert_final_newline
indent_style
indent_size
Hmm, tried several times and Detect and use existing file indents for editing got exported and imported. What is your PyCharm version?
Is it possible to share this settings file so I can try it? You could upload it to https://uploads.services.jetbrains.com/, just let me know the name of that file.
I'm using:
PyCharm 2018.3.2 (Professional Edition)
Build #PY-183.4886.43, built on December 18, 2018
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
default export file:
manually patched file:
>default export file:
Which file is it?
This setting is stored in Default.xml file under codestyles directory. Note, that you should change it for Default IDE. Please make sure that it is selected and then export your settings. You can then unzip settings.zip and see if Default.xml file has this setting. Then import.
> Which file is it?
I'm talking about .editorconfig file.
Your solution is to share Default.xml file between teammembers? Actually, original idea is to have the same code style on the project. As I thought, add .editorconfig to the git is a solution.
.editorconfig indeed doesn't have this setting.
>Actually, original idea is to have the same code style on the project.
In such case you could share settings https://www.jetbrains.com/help/pycharm/synchronizing-and-sharing-settings.html.
From article:
"For sharing project settings,
.idea
project configuration directory should be shared via version control."If you don't need to synchronise settings and only need to set it up once, then I guess my previous suggestion about export/import of the settings is correct.
Question can be marked as resolved.
Thank you.
Sergey Karpov created two feature reqests:
https://youtrack.jetbrains.com/issue/IDEA-287505
https://youtrack.jetbrains.com/issue/IDEA-287485