问题
I have a problem with sublime text 2. When I write some python scripts correctly at sublime text I always face on with this problem "IndentationError: unexpected indent" after a while I found, the problem is causing by sublime text. I tried other editors and corrected but sublime text didnt work correctly.
The main problem is, sublime text is adding extra tab to my line and that affects my script works. I couldnt find the reason. hope somebody help me. Thanks a lot.
回答1:
Go to Packages/User/Preferences.sublime-settings
Change it to this:
{
"tab_size": 4,
"translate_tabs_to_spaces": true
}
来源:https://stackoverflow.com/questions/37378546/sublime-text-2-indentationerror