VSCODE-* .hbs文件中的代码格式 [英] VSCODE - Code formatting in *.hbs files

查看:520
本文介绍了VSCODE-* .hbs文件中的代码格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用VS Code已有一段时间了,我很喜欢它.但 代码格式化有一个小问题.在车把(*.hbs)文件中不起作用.在编辑hbs文件时,该选项根本不可用.

I have been using VS Code for a while now and I am loving it. But there is a small problem with code formatting. It does not work in handlebars (*.hbs) files. This option is simply unavailable while editing hbs file.

我尝试了'Beautify'扩展名,但是它对于手把无法正常工作-它会完全破坏代码.

I have tried 'Beautify' extension, but it does not work properly for handlebars - it completely destroys the code.

对于该主题的任何帮助(或对我在做什么错的解释),我们将不胜感激.

Any help (or explanation of what am I doing wrong) on that topic would be much appreciated.

相同的问题适用于* .scss文件.也不能格式化它们.

Same issue applies to *.scss files. Can not format those either.

推荐答案

您可以单击把手"右下角的,并将语言模式更改为HTML.然后将显示格式代码"选项.

You can click in the bottom right corner on 'Handlebars' and change the language mode to HTML. Then the 'format code' option will be shown.

这篇关于VSCODE-* .hbs文件中的代码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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