eclipse常用设置

快来打我* 2022-09-30 10:52 323阅读 0赞

eclipse中设置默认的文件编码为UTF-8

步骤:窗口(windows)->首选项(preferences…)->通用(General)->工作空间(Workspace),

  1. 在右边的Text file encoding中选择UTF-8
  2. 窗口(windows)->首选项(preferences...)->通用(General)->环境类型(Content Types),
  3. 在右边的环境类型(Content Types)中选择Text->C Source FIle,在下面的(Default encoding)中输入UTF-8,点击按钮OK

eclipse中调整字体大小

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

  1. 在右边选择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)路径

设置包含路径步骤:

  1. 右击项目文件,在弹出的上下文菜单中选择属性(Properties)->C/C++ 通用(C/C++ General)->路径与符号(Path and Symbols),
  2. 在右侧的Includes中对语言进行相应的设置,此处的设置会自动添加到C/C++ Build->Settings中预处理器中的包含路径中。

设置库路径步骤:

  1. 右击项目文件,在弹出的上下文菜单中选择属性(Properties)->C/C++ Build->Settings
  2. 在右边选择链接器(Linker),添加对应的库路径即可。

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

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

  1. 在右侧选中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”复选框勾选

文章转载于http://blog.sina.com.cn/s/blog_6610da3901014r49.html

发表评论

表情:
评论列表 (有 0 条评论,323人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Eclipse便捷设置

    1、代码自动提示   在我们忘记方法名或者想偷懒时,代码自动提示很管用。不过Eclipse默认是输入"."后才会出现包或类成员的提示,也就意味着我们必须先输入一个完整的类名,