eclipse设置
防止空格和TAB之间打错,如下配置可以显示空格、TAB、回车
Window->Preferences->General->Editors->Text Editors->Show whitespace characters
配置eclipse将TAB转换成空格的方法
Window->Preferences->Java->Code Style->Formatter->Edit->Tab policy->spaces only
设置代码80行的标志线,
Window->Preferences->General->Editors->Text Editors->Show print margin
设置代码换行符为unix形式,以避免git diff时出现很多红色警示符号:
Window->Preferences->General->Workspace->New text file line delimiter->选择others->Unix
悲剧的是,这个设置只对新创建文件起作用。要使得原来的文件生效,只能:
File->Convert Line Delimiters To->Unix(...)
防止空格和TAB之间打错,如下配置可以显示空格、TAB、回车
Window->Preferences->General->Editors->Text Editors->Show whitespace characters
配置eclipse将TAB转换成空格的方法
Window->Preferences->Java->Code Style->Formatter->Edit->Tab policy->spaces only
设置代码80行的标志线,
Window->Preferences->General->Editors->Text Editors->Show print margin
设置代码换行符为unix形式,以避免git diff时出现很多红色警示符号:
Window->Preferences->General->Workspace->New text file line delimiter->选择others->Unix
悲剧的是,这个设置只对新创建文件起作用。要使得原来的文件生效,只能:
File->Convert Line Delimiters To->Unix(...)