.Rhtml 中 RStudio 中的重新缩进行没有正确缩进大括号。它是可配置的吗?
Reindent lines in RStudio in .Rhtml doesn't indent braces correctly. Is it configurable?
无论 Python 人怎么想,重新缩进行都是一种确保代码干净并清理代码以提高可读性的快速方法。
我在编辑 .rhtml 文件以编入 html 报告时在 RStudio 中注意到,代码缩进错误地对齐了大括号 ({})。
<html>
<body>
<!--begin.rcode
#not idiomatic indentation
for( i in (1:10)){
a=i+1
} # ☹
#ideal indentation
for( i in (1:10)){
a=i+3
} # ☺
end.rcode-->
</body>
</html>
有没有特殊字符可以解决这个问题?配置文件?不同版本的 RStudio?
感谢您的提示和提示。
RStudio 开发人员确认这是一个错误。
无论 Python 人怎么想,重新缩进行都是一种确保代码干净并清理代码以提高可读性的快速方法。
我在编辑 .rhtml 文件以编入 html 报告时在 RStudio 中注意到,代码缩进错误地对齐了大括号 ({})。
<html> <body> <!--begin.rcode #not idiomatic indentation for( i in (1:10)){ a=i+1 } # ☹ #ideal indentation for( i in (1:10)){ a=i+3 } # ☺ end.rcode--> </body> </html>
有没有特殊字符可以解决这个问题?配置文件?不同版本的 RStudio?
感谢您的提示和提示。
RStudio 开发人员确认这是一个错误。