通过ctrl+alt+s打开settings或菜单栏File->settings
在settings找到Editor->Code Style,看右边有一个Indents Detection
将Detect and use existing file indents for editing这一些的勾去掉,点击OK保存设置
通过ctrl+alt+s打开settings或菜单栏File->settings
在settings找到Editor->Code Style,看右边有一个Indents Detection
将Detect and use existing file indents for editing这一些的勾去掉,点击OK保存设置