VS Code - 大括号前的代码格式空间 [英] VS Code - Code Formatting space before curly braces
本文介绍了VS Code - 大括号前的代码格式空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在 VS Code 编辑器中使用自动格式化功能时,它会在大括号前插入空格,如下所示:
When I use autoformat function in VS Code editor it insert spaces before curly brackets like this:
来自:
<Button onClick={this.callMyFunc.bind(this, screenSet.index)}>Add</Button>
致:
<Button onClick={this.callMyFunc.bind(this, screenSet.index) }>Add</Button>
来自:
))}
致:
)) }
我找不到这个选项是什么设置...有人可以帮我吗?
I can't find option what settings this... Can anyone help me, please?
推荐答案
尝试将其添加到您的用户设置中:
Try putting this to your user settings:
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
也许这也是
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
这篇关于VS Code - 大括号前的代码格式空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文