Converting tabs into spaces automatically

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By fcole90

I’m new to Godot, but I’m having some issues finding the settings of the built-in text editor. In particular, I’m trying to change the current behaviour, which is that 4 whitespaces get converted into 1 tab whenever one saves. I would actually like to:

  1. Have eventually the opposite conversion, so saving converts tabs into spaces;
  2. Have an indentation setting that allowed me to set n (e.g. 4) whitespaces as indentation and then that pressing TAB actually inserts such n spaces instead of a \t.

Does exist anything like that?
Do I need to open an issue on GH to propose that?

P.S. I think this is a standard of modern code editors, including VS Code and PyCharm

If you’ve figured out the solution to your problem, then reply to your question with the answer.

Ertain | 2021-05-30 23:30

Comment Deleted

fcole90 | 2021-05-31 06:41

:bust_in_silhouette: Reply From: fcole90

I just realised how to achieve that!
From the top menu, find and press on Editor → Editor Settings.

Menu that appears when clicking "Editor" from the top menu, showing "Editor Settings"

It will open a new window and you will find on the left, the item Text Editor with subitem Indentation. There, you can change Type from Tabs to Spaces. I recommend you leave Size to 4 and that you enable Draw Spaces.