WebStorm无法在单个文件上正确标记

时间:2015-06-12 20:15:18

标签: javascript ide webstorm

出于某种奇怪的原因,WebStorm决定为单个文件键入的所有选项卡都应该是单个空格,而不是编辑器设置的4个选项卡。

我已经检查过,我所有其他源文件仍然可以正常工作。

我尝试过的事情:

  1. 关闭标签并重新开启
  2. 重命名文件
  3. 重新启动WebStorm
  4. 重新启动并清除WebStorm缓存
  5. 重新启动计算机
  6. 删除文件中的所有内容并尝试使用标签,但仍然可以
  7. 其他人见过这样的事吗?这让我疯狂,不能选择!

1 个答案:

答案 0 :(得分:1)

Few ideas:

  1. You have Detect and use existing file indents for editing option enabled and it's somehow remembers those indents. Try disabling that option at Settings (Preferences on Mac) | Editor | Code Style.

  2. Try re-creating file from scratch (especially if you need option from #1 to be enabled):

    • delete that file completely (from inside IDE);
    • create such file again outside of IDE and type some code there using proper indents;
    • open in IDE -- any better?
  3. Do you have any .editorconfig files in your project (even above the project root)? Maybe that file contains special settings for this file (that's of course if EditorConfig plugin is installed and enabled).