如何将HTML标签放在VS代码中的一行中?
我的Mac PC中的VS代码会自动打破新行中的客户HTML标签。这使整个代码的长度更大。 例如,我希望以下一行中的代码以下代码
<FormInput name="propertyTax" width="43%" height="7%" placeholder="3,200"></FormInput>
,但VS代码如下所示。
<FormInput
name="propertyTax"
width="43%"
height="7%"
placeholder="3,200">
</FormInput>
我尝试从设置中更改Wordwrap,没有运气。
请帮我。
The VS Code in my Mac pc is automatically breaking the customer HTML tags in new lines. This is making the length of the whole code much bigger.
For example, I want below code in one line
<FormInput name="propertyTax" width="43%" height="7%" placeholder="3,200"></FormInput>
But the VS code is showing as below.
<FormInput
name="propertyTax"
width="43%"
height="7%"
placeholder="3,200">
</FormInput>
I tried change wordwrap from settings with no luck.
Please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需按F1,然后输入:加入行
Just press F1, and type: join lines
您可以尝试关闭Vscode中的任何格式。转到
代码&GT;偏好&gt;设置
并搜索“格式”,然后尝试关闭“保存”格式以及您拥有的任何其他格式选项。You can try switching off any formatters that you have in VSCOde. Go to
Code > Preferences > Settings
and search for "Format" and try switching off "Format on Save" and any other format option that you have.如果您使用的是更漂亮的格式化器。转到设置并搜索以下内容:
prettier.printwidth
,然后从默认的80
更改为300
。If you're using Prettier formatter. Go to Settings and search for this:
prettier.printWidth
and change from default80
to300
.