Format格式化对齐宽度太小

快捷键 Ctrl+Shift + F
Eclipse 格式化对齐宽度太小

原因默认的最大行宽是 80,因为以前屏幕小的缘故

对于强迫症的人,希望该宽一点,即一行显示多一些可以这样操作

增加行宽

设置

Preferences->Java->Code Style->Formatter->点击Eidt

如下图
Eclipse 格式化对齐宽度太小

行宽默认 80 改成 200

Line wrapping->Maximum line width

Eclipse 格式化对齐宽度太小

测试一下

选中需要格式的函数

快捷键 Ctrl+Shift + F

Eclipse 格式化对齐宽度太小

效果-宽宽的啦

Eclipse 格式化对齐宽度太小

相关文章:

  • 2022-02-20
  • 2021-06-01
  • 2022-12-23
  • 2021-04-03
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2021-10-27
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案