Eclipse常用设置

1.eclipse中设置默认的文件编码为UTF-8
步骤:窗口(windows)->首选项(preferences...)->通用(General)->工作空间(Workspace),
在右边的Text file encoding中选择UTF-8
窗口(windows)->首选项(preferences...)->通用(General)->环境类型(Content Types),
在右边的环境类型(Content Types)中选择Text->C Source FIle,在下面的(Default encoding)中输入UTF-8,点击按钮OK。
2.eclipse中调整字体大小
步骤:窗口(windows)->首选项(preferences...)->通用(General)->外观(Appearance)->颜色和字体(Colors and Fonts), 在右边选择Java->Editor->JavaEditor Text Font,点击编辑(Edit...)按钮,在出现的字体对话框中设置字体大小,确定,OK。
3.eclipse中使用空格(space)代替制表符(tab)
步骤:窗口(windows)->首选项(preferences...), 在左边选Java->代码样式(code style)->Formmater, 右边点“编辑(Edit...)”按钮,重命名样式文件名(Profile name),选“缩进(Indentation)”选项卡,
在“常规设置(general settings)”里的“跳格策略(Tab policy)”
下拉列表选“仅空格(Spaces only)” ,点击应用(Apply)。
4.eclipse中显示行号 显示空白符 为tab插入空格
步骤:Windows->Properties->General->Editors->Text Editors,
在右侧选中Insert space for tabs 以及Show Line numbers 以及Show whitespace characters.
5.设置背景色:
1、打开window->Preference,弹出Preference面板
2、展开General标签,选中Editors选项,展开。
3、选中 Text Editors,右边出现Text Editors面板。
面板中有这样一个选项:Appearance color options; 其中是各种板块颜色的设置,其中有一项是background color,根据自己的喜好选择颜色。
4、 选中background color,勾掉System Default,点击'color',弹出颜色选择面板,选择喜好的颜色,单击确定。
5、返回Text Editors,单击Apply即可。
6.设置相同变量背景色高亮显示

1、Window-->preferences-->General-->Editors-->Text Editors-->Annotations-->右边选择点击Occurrences-->设置Color
2、Window-->preferences-->Java-->Editor-->Mark Occurrences"复选框勾选

7.在eclipse下如何调整编辑区字体大小

window-> preference->General-> Appearance->colors and fonts->Basic把字体调大点

8.eclipse 中字体的修改

把字体设置为Courier New(你也可以选择你喜欢的):
操作步骤:打开eclipse,点击菜单栏上的“Windows”——点击“Preferences”——点击“Genneral”——点击“Appearance”——点击“Colors and Font”——在右侧框展开“Basic”文件夹--双击“Text Font”——在弹出窗选择“Courier New”(注:这里可能找不到“Courier New”,点击字体选择框左下角的“show more fonts”链接来打开设置字体的控制面板),在弹出的控制面板对话框中点击左侧的Font settings,接下来把Hide fonts xxxxxxxx的勾选去掉,这样在字体列表里就可以找到Courier New了。

猜你喜欢

转载自dongruan00.iteye.com/blog/1936826