美化/格式化Visual Studio Code中的Java代码 [英] Beautify / Format Java code in Visual Studio Code

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

问题描述

我在
< 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屋!

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