Replit will randomly switch all of my tab indentation to double space when working with python, despite my preferences clearly saying that I am set to tab mode. Then, I have to go to find and replace and manually replace all instances of double spaces with tabs, as python doesn’t work with mixed spaces and tabs.
I would expect that, when my setting is set to “tabs” that replit would respect that and keep all my tab indentation.
Replit formats my code to use double spaces instead of tabs at seemingly random intervals.
Steps to reproduce:
write python code with tab format with “tabs” setting enabled
Replit randomly formats code to use double space indentation, causing errors
Bug appears at this link:
Browser: Firefox 116.0.3
OS: Windows 10 Home
Device (Android, iOS, n/a leave blank):
Plan (Free, Hacker, Pro Plan): Free
This problem seems to occur whenever the automatic formatting function is used. I’m trying to get a recording but am having issues with this error now. I will send a recording after I get it working properly
Welcome to Ask! I tested this. What I found was that if I had my indents set to tabs and used Ctrl + S to format my code (note that it only makes it prettier and does not save it as Replit saves automatically) it will replace all the tabs with two spaces (I have indent set to two spaces in my settings). I can see how this would be a problem for running your Python code.
Replit was having other issues with tabs and spaces recently as well (similar, but not the same).