[英]How to get correct indentation for new line after “if”,“try”, etc… blocks on Intellij Idea?
I started to use Idea after using Eclipse for years. 在使用Eclipse多年之后,我开始使用Idea。 Now I found some features of Idea very basically absent. 现在,我发现Idea的某些功能基本上不存在。 One of them is this; 其中之一是这个。 I write an if
or try
and a curly bracket {
then I push Enter
, new line comes with the same indentation of if
: 我写了一个if
或try
和一个大括号{
然后我按Enter
,新行带有与if
相同的缩进:
// some code...
if (someBoolean) {
// <- cursor comes here
// <- not here
}
How can I make this correct, and write new line without starting to write an extra tab
? 我如何才能做到这一点正确,并在不开始编写额外tab
情况下写新行?
Edit: This happens on JavaScript files. 编辑:这发生在JavaScript文件上。 No problem when using Java. 使用Java时没问题。 I checked that there is no plugin available for "JavaScript Support" as it is mentioned in comments. 我检查了注释中提到的“ JavaScript支持”是否没有可用的插件。
As of today, there is no JavaScript Support plugin. 到目前为止,还没有JavaScript支持插件。 I can't find it by browsing it. 我无法通过浏览找到它。
This matrix explains the situation: http://jetbrains.com/idea/features/editions_comparison_matrix.html 该矩阵说明了这种情况: http : //jetbrains.com/idea/features/editions_comparison_matrix.html
There is no JavaScript support for Community Edition. 社区版不支持JavaScript。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.