確かに、NetBeans と同じくらい強力な IDE はこれほど無知ではありませんが、コードを入力しているだけなので、次のようにフォーマットされています。
$(document).ready(function() {
if (someVar > 2)
{
complain('that is not how you indent braces');
}
else if (someVar == -1)
complain('this is not right either!');
else
{
complain('but it did auto outdent the else which is smart');
complain('smart indeed');
}
});
これを修正して、次のようにフォーマットするにはどうすればよいですか。
$(document).ready(function() {
if (someVar > 2)
{
// this is how it's done
}
else if (someVar == -1)
// this is right
else
{
// correct
}
});