美化/格式化Visual Studio Code中的Java代码 [英] Beautify / Format Java code in Visual Studio Code
问题描述
我在
< a href = https://i.stack.imgur.com/FGy69.png rel = noreferrer>
为正确设置格式,您需要安装提供Java格式的VSCode扩展。从Redhat尝试以下方法: https://marketplace.visualstudio.com/items?itemName=redhat .java
安装扩展程序后,标准代码格式命令/快捷键应适用于Java代码。
I have tried some proposals on here and here, but none of them works. How do you accomplish it for Java code or is there a way for general? En passant, I've install XML formatter in order that it may work, but not.
For proper formatting, you need to install a VSCode extension that provides Java formatting. Try this one from Redhat: https://marketplace.visualstudio.com/items?itemName=redhat.java
After the extension is installed, that standard code format commands / shotcuts should work for Java code.
这篇关于美化/格式化Visual Studio Code中的Java代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!