eclipse常用设置

来源:互联网 发布:盘古数据科技有限公司 编辑:程序博客网 时间:2024/05/21 17:56

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。

 

eclipse中调整字体大小

步骤:窗口(windows)->首选项(preferences...)->通用(General)->外观(Appearance)->颜色和字体(Colors and Fonts),

            在右边选择C/C++->Editor->C/C++ Editor Text Font,点击编辑(Edit...)按钮,在出现的字体对话框中设置字体大小,确定,OK。

eclipse中使用空格(space)代替制表符(tab)

步骤:窗口(windows)->首选项(preferences...), 
          在左边选C/C++->代码样式(code style), 
          右边点“编辑(Edit...)”按钮,重命名样式文件名(Profile name),选“缩进(Indentation)”选项卡, 
          在“常规设置(general settings)”里的“跳格策略(Tab policy)” 
          下拉列表选“仅空格(Spaces only)” ,点击应用(Apply)。

eclipse中设置包含(Include)路径以及库(Lib)路径

设置包含路径步骤:

        右击项目文件,在弹出的上下文菜单中选择属性(Properties)->C/C++ 通用(C/C++ General)->路径与符号(Path and Symbols),

                                    在右侧的Includes中对语言进行相应的设置,此处的设置会自动添加到C/C++ Build->Settings中预处理器中的包含路径中。

设置库路径步骤: 

        右击项目文件,在弹出的上下文菜单中选择属性(Properties)->C/C++ Build->Settings,

                                  在右边选择链接器(Linker),添加对应的库路径即可。

 

eclipse中显示行号 显示空白符 为tab插入空格

步骤:Windows->Properties->General->Editors->Text Editors,

           在右侧选中Insert space for tabs 以及Show Line numbers 以及Show whitespace characters.

 

 

============================

设置背景色:

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即可。 


设置设置高亮显示的颜色:

 

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