文章目录
Eclipse基础设置
每次重装Eclipse都要重新设置,今天写下来,以后供自己参考,也供大家参考。
1. 字体设置
Window --> Preferences --> General --> Appearance --> Text Font
2. 更改工作空间及文件类型的默认编码为UTF-8
Window --> Preferences --> General --> Workspace --> Other --> UTF-8 --> Apply and Close
Window --> General --> Content Type --> Text --> Java Source File(可自行选择) --> Default encoding --> UTF-8 --> Apply and Close
3. 设置Tab为4个空格
Window --> Preferences --> General --> Editors --> Text Editors --> …(如图)
Window --> Preferences --> Java --> Code Style --> Formatter --> Edit… --> Indentation --> Spaces only --> 发现Apply点击不了 --> 随便更改Profile name --> Apply --> Apply and Close
4,设置背景颜色为护眼的豆沙色或更改主题
Window --> Preferences --> General --> Editors --> Text Editors --> Background color --> 取消System Default --> Color --> 规定自定义颜色 --> 调整数值(如图) --> 添加到自定义颜色 --> 确定 --> Apply and close
Window --> Preferences --> General --> Appearance --> Theme --> 在下拉列表框中选择自己喜欢的主题背景
5. 代码自动提示
Window --> Preferences --> Java --> Editor --> Content Assist --> Auto activation delay 设置为200 (键盘输入到代码提示出现的时间,单位为毫秒) --> Auto activation triggers for Java 将26个英文字母大小写和.都输入(输入后会有提示的字符) --> Apply and Close
6. 窗体布局重置
有时候把窗体弄得很乱,直接重置
Window --> Perspective --> Reset Perspective…
7. 禁止更新
Window --> Preferences --> Install/Update --> Automatic Update -->取消 Automatically find new updates and notify me
8. 显示行号
Windows–>Preference–>General–>Appearance–>Editors–>Text Editors–>show line numbers