如何设置Idea折叠过长的字符串?

8
看看Eclipse: enter image description here 再看看Idea: enter image description here 那么,我该如何让Idea像Eclipse一样折叠多行字符串?
2个回答

4
很遗憾,似乎没有针对字符串字面量的折叠选项。
您可以尝试使用自定义折叠标签,但这将需要为每个字符串添加额外的注释:

enter image description here

要检查所有现有的折叠选项,请转到设置>编辑器>常规>代码折叠

0
您可以尝试 CMD + .,对字符串进行折叠。

CMD + . on Strings to fold them


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接