[英]JavaScript formatting in Visual Studio 2010
I want: 我想要:
if (window.XMLHttpRequest)
{
//do some
}
but after formatting I get: 但是格式化后我得到:
if (window.XMLHttpRequest) {
}
how can I correct it? 我该如何纠正?
This is probably not what you want, but I suggest keeping it as is. 这可能不是您想要的,但是我建议保持原样。
It is also recommended by the Google Javascript Style Formatting Guide Google Javascript样式格式指南也建议您这样做
In the menu: 在菜单中:
Tools -> Options -> Text Editor -> JScript -> Formatting -> New Lines
工具->选项->文本编辑器-> JScript->格式->新行
However, I agree with epoch - it's probably better to just follow the style guide. 但是,我同意时代-最好遵循样式指南。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.