Sublime Text 2 >IndentationError< [duplicate]

痴心易碎 提交于 2019-12-12 03:48:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!