admin管理员组文章数量:1404927
Is there a way to configure VS Code in order to avoid padding, via format line (Shift + Alt + F)?
For instance the first line after the if statement is empty (padded):
if (a) {
b()
}
The empty line after the if statement should be removed as following:
if (a) {
b()
}
This should be done automatic by pressing Shift + Alt + F. Can the settings be configured accordingly in VS Code?
Thanks!
Is there a way to configure VS Code in order to avoid padding, via format line (Shift + Alt + F)?
For instance the first line after the if statement is empty (padded):
if (a) {
b()
}
The empty line after the if statement should be removed as following:
if (a) {
b()
}
This should be done automatic by pressing Shift + Alt + F. Can the settings be configured accordingly in VS Code?
Thanks!
Share Improve this question edited Mar 6, 2018 at 16:09 HaaLeo 11.8k5 gold badges49 silver badges58 bronze badges asked Mar 6, 2018 at 14:05 VitaliVitali 6072 gold badges7 silver badges13 bronze badges1 Answer
Reset to default 0Vscode itself does not provide that settings. You could use the the Beautify extension with its preserve_newlines
and max_preserve_newlines
settings to achieve this behavior. An overview of all possible settings can be found here.
After you configured your settings you can create a custom shortcut in the keybindings.json
to overwrite the default Shift + Alt + F
{
"key": "shift+alt+f",
"mand": "HookyQR.beautify",
"when": "editorFocus"
}
本文标签: javascriptBlock must not be padded by blank lines (paddedblocks)Stack Overflow
版权声明:本文标题:javascript - Block must not be padded by blank lines. (padded-blocks) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744867528a2629430.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论