Visual Studio 代码 CSS 缩进和格式 [英] Visual studio code CSS indentation and formatting

查看:29
本文介绍了Visual Studio 代码 CSS 缩进和格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何方法可以使用快捷键 ALT+SHIFT+F 在 Visual Studio 代码中激活自动缩进 CSS 文件?

I'd like to know if there is any way to activate auto indent a CSS file in visual studio code with the shortcut ALT+SHIFT+F?

它在 JavaScript 中运行良好,但奇怪的是在 CSS 中不起作用.

It's working fine with JavaScript but strangely not with CSS.

推荐答案

是的,请尝试安装 vscode-css-formatter 扩展.
它只是添加了格式化 .css 文件的功能,并且快捷方式保持不变 Alt+Shift+F.

Yes, try installing vscode-css-formatter extension.
It just adds the functionality to format .css files and the shortcut stays the same Alt+Shift+F.

这篇关于Visual Studio 代码 CSS 缩进和格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆