eclipse实用配置

1.自动换行设置

Window > Preferences > Java > Code Style > Formatter > Edit
eclipse实用配置
Line Wrapping > Max line width
默认每行最多80字符,改成800,格式化代码时,基本上不会达到自动换行的阈值了。
eclipse实用配置

2. 显示代码行号

Window > Preferences > General > Editors > Text Editors
勾选 Show line numbers
eclipse实用配置

3. Tab改成4个空格

Window > Preferences > Java > Code Style > Formatter > Edit
eclipse实用配置
Indentation > Tab policy
改成Space only
eclipse实用配置

4.设置文件编码和代码换行格式

Window > Preferences > General > Workspace
Text file encoding 改成 UTF-8
New text file line delimiter 改成 Unix
eclipse实用配置

5.更改字体大小

Window > Preferences > General > Appearance > Colors and Fonts > Text Font -> Edit
eclipse实用配置