IntelliJ为什么不使用标签?

时间:2017-01-23 15:34:22

标签: intellij-idea indentation

根据How can I use tabs for indentation in IntelliJ IDEA?,我已完成并将每个扩展程序设置为“使用制表符”,如下所示。

虽然它不起作用 - 当我点击标签按钮时,IntelliJ仍然插入空格。我错过了什么? intelliJ的[Please use tabs like I ef'ing told you to do]按钮在哪里?

(仅供参考,我正在使用IntelliJ Ultimate 2016.2)

这看起来很有希望...... enter image description here

......但显然这都是谎言:(

enter image description here

3 个答案:

答案 0 :(得分:4)

转到设置编辑代码样式,然后取消选择“检测并使用现有文件缩进进行修改 ”。

答案 1 :(得分:3)

也许您有选项设置 - >编辑器 - >常规 - >"允许在标签内放置插入符"检查。

取消选择并重试。

答案 2 :(得分:1)

如果打开.editorconfig文件,您将看到类似于以下内容的内容

# editorconfig.org  
root = true  

[*]  
indent_style = spaces  
indent_size = 2  
end_of_line = lf  
charset = utf-8  
trim_trailing_whitespace = true  
insert_final_newline = true

我将其更改为选项卡和4,关闭项目并重新打开它 我知道这是一个荒谬的步骤,并且有一个关于它的开放式错误报告。

相关问题