Intellij/Android Studio可以折叠注释吗? [英] Can Intellij / Android Studio fold comments?
问题描述
我已经在intellij中注释掉了一段代码:
I have this commented out piece of code in intellij:
如您所见,这里不可能折叠注释.但是,Webstorm中相同的注释块可能会崩溃:
As you can see, there is no possibility to fold comments here. However, the same commented block in Webstorm can be collapse:
有什么方法可以配置在intellij/Android Studio中崩溃的注释?
Is there any way to configure comments collapsing in intellij/Android Studio?
推荐答案
这是一个已知的错误,可以在JetBrains错误跟踪系统中找到- IDEA-106702 .它仅影响块注释(/*注释*/),所有其他注释均得到正确处理.
It is a know bug, which can be found in JetBrains Bug Tracking System - IDEA-106702. It only affects block comments (/* comment */), all other comments are treated correctly.
常规编辑器折叠设置
您可以在设置"中配置代码折叠( CTRL + ALT + S ) -编辑器→常规→代码折叠
You can configure code folding in Settings (CTRL+ALT+S) - Editor → General → Code Folding
您可以在此处切换折叠轮廓,还可以为各种文件部分(例如注释,导入,xml标记等)配置默认的折叠行为.
Here you can toggle folding outline and also configure default folding behavior for various file sections such as comments, imports, xml tags and more.
这篇关于Intellij/Android Studio可以折叠注释吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!