简体   繁体   English

如何在 Visual Studio Code 的 SCSS 文件中的一行中格式化 html 元素?

[英]How to format html elements in one line in SCSS file in Visual Studio Code?

How do I format the html element in scss to be one line?如何将 scss 中的 html 元素格式化为一行?

在此处输入图像描述

I am using Visual Studio Code.我正在使用 Visual Studio 代码。

在此处输入图像描述

If you are using visual studio code, try this extension如果您使用的是 Visual Studio 代码,请尝试此扩展

Prettier - Code formatter Prettier - 代码格式化程序

Go to File, Preferences, Keyboard Shortcuts and search for Join Lines. Go 到文件、首选项、键盘快捷键并搜索连接线。 Set up a keybind that you like and then go to your code.设置您喜欢的键绑定,然后将 go 设置为您的代码。 Select all your elements then press that keybind. Select 所有元素然后按该键绑定。 It should be in one line!应该是一行!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM