不要将多行 'If' 语句格式化为 Netbeans 中的单行
Don't format multiline 'If' statements to single line in Netbeans
我已经在 google 上搜索过但没有成功。是否可以禁用将多行 'if' 语句格式化为单行。我编写 PHP 代码,但尚未测试 Netbeans 中的其他语言是否会发生这种情况。
原文:
if ($checkOne->very_long_function()
|| $checkTwo->you_dont_want_this()
|| $checkThree->in_one_line())
在 Netbeans 的默认格式之后,语句在一行中
if ($checkOne->very_long_function() || $checkTwo->you_dont_want_this() || $checkThree->in_one_line())
感谢您的帮助。
转到
"Tools" -> "Options" -> "Editor" -> "Formatting"
Select 类别 "Wrapping" 并向下滚动到 "Wrap After Binary Operators" 并检查它。
Netbeans 将不再更改多行 if 语句。
我已经在 google 上搜索过但没有成功。是否可以禁用将多行 'if' 语句格式化为单行。我编写 PHP 代码,但尚未测试 Netbeans 中的其他语言是否会发生这种情况。
原文:
if ($checkOne->very_long_function()
|| $checkTwo->you_dont_want_this()
|| $checkThree->in_one_line())
在 Netbeans 的默认格式之后,语句在一行中
if ($checkOne->very_long_function() || $checkTwo->you_dont_want_this() || $checkThree->in_one_line())
感谢您的帮助。
转到
"Tools" -> "Options" -> "Editor" -> "Formatting"
Select 类别 "Wrapping" 并向下滚动到 "Wrap After Binary Operators" 并检查它。
Netbeans 将不再更改多行 if 语句。