eclipse实用配置
1.自动换行设置
Window > Preferences > Java > Code Style > Formatter > Edit
Line Wrapping > Max line width
默认每行最多80字符,改成800,格式化代码时,基本上不会达到自动换行的阈值了。
2. 显示代码行号
Window > Preferences > General > Editors > Text Editors
勾选 Show line numbers
3. Tab改成4个空格
Window > Preferences > Java > Code Style > Formatter > Edit
Indentation > Tab policy
改成Space only
4.设置文件编码和代码换行格式
Window > Preferences > General > Workspace
Text file encoding 改成 UTF-8
New text file line delimiter 改成 Unix
5.更改字体大小
Window > Preferences > General > Appearance > Colors and Fonts > Text Font -> Edit