-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentations mess up with comments #14909
Comments
Hi @rossbutler2000 sorry to hear that, could you provide a code snippet/example code that triggers this error. Any info that allows to reproduce this is greatly appreciated |
Possible duplicate of #14326 |
Hi @remisalmon I think you are right 👍 but just in case, @rossbutler2000 is your issue like the one in #14326? Let us know :) |
@dalthviz Yes I would say my problem looks very similar to #14326. However, I think mine extends further because sometimes when I am trying to fix it I will use the delete key and instead of deleting the whitespaces it will move the code to the right as if I am tabbing. And then if I go further sometimes it won't let me delete at all unless I select that line and the line above and delete. A long while ago I messed with my setting so that when I tab it would use a tab instead of the default number of whitespaces. I'm not sure if that contributes to the problem or not but I thought I would let you know as well. |
Thanks for the feedback @rossbutler2000! and yep seems like because of your preferences regarding the tab vs white spaces, the behavior you're experiencing gets a little bit more strange/misliding :/ I think maybe you can check your preferences regarding the tabs and see if changing them helps a little bit (at least to make the fixing after removing comments a little bit less troublesome). For that you can check in the preference dialog under Or if you don't have any important preference set you can try resetting Spyder preferences with the reset to defaults button to check if the default preferences work better (regarding the tab in your case). Anyhow, I think this is mainly caused due the do/undo comments functionality so I will close this one. However, @rossbutler2000, if you have further comments or examples that you want to show us please put them in #14326 Let us know if changing your preferences regarding tabs helps a little bit :) |
Even if the tabulation is defined as the indentation character, the "uncomment" function inserts a white space instead of '#' which triggers some indentation errors. This bug should be reopened. |
Description
What steps will reproduce the problem?
Almost everytime I comment out a section of code (using 'ctrl 1' on a highlighted block) and then uncomment it using the same process it messes with the indentation. I get errors on almost all lines of code and when I go to delete and retab, it often gives it a space or doesnt delete at all. It is incredibly frustrating and I have no idea why it happens. It forces me painstakenly go through all lines of effected code and change it or restart the entire script from scratch.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: