如何在Windows上的Visual Studio Code中格式化代码 [英] How to format code in Visual Studio Code on Windows
本文介绍了如何在Windows上的Visual Studio Code中格式化代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Windows的最新更新中,如何在 Visual Studio代码中格式化代码。
How can I format code in Visual Studio Code in the last update on Windows.
我尝试了 Ctrl + K , Ctrl + D 不起作用...
I tried Ctrl+ K, Ctrl + D doesn't work...
我还尝试了 Shift + Alt + F 。
I also tried Shift + Alt + F. It didn't work either.
我尝试了以下解决方案,但这不是问题:
I tried the following solution, but that is not the issue:
推荐答案
如果您使用的是PHP,则应下载PHP扩展格式代码。
If you are working on PHP you should download the PHP extension format code.
按 F1 并输入:
ext install PHP Code Format
然后 Shift + Alt + F 将起作用。
Then Shift + Alt + F will work.
这篇关于如何在Windows上的Visual Studio Code中格式化代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文