eclipse使用笔记
软件版本:eclipse-cpp neno
配置项导出
File --> Export...
General --> Preferences
配置项导入
File --> Import...
General --> Preferences
折叠代码
Windows --> Preferences --> C/C++ --> Editor --> Folding.
选择或取消相关选项。
建议选中项:
Enable folding of preprocessor branches(#if/#endif)
Enable folding of control flow statements(if/else,do/while,for,switch)
设置完成后重启eclipse生效.
修改字体
Windows --> Preferences --> General --> Appearance --> Colros and Fonts.
修改Basic项的Text Font.
注意事项:
1.修改字体的时候,将脚本修改为“中欧字符”(默认为西欧字符),可解决汉字太小的问题;
2.有的字体默认不显示,需进入字体目录,设置为显示;
配置黑色背景
Windows --> Preferences --> General --> Appearance
Theme: 选择对应模式(可以修改所有框架)
修改代码背景色
Windows --> Preferences --> General --> Editors -->Text Editors
只修改了代码区的背景色,其他区域未修改。
修改无效代码背景色(被#if注释掉的代码)
Windows --> Preferences --> C++ --> Editor --> Inactive code hight.
选中代码高亮
Windows --> Preferences --> General --> Editors -->Text Editors --> Annotations
C/C++ Occurrences项
Text as 选择样式(推荐Box)
Color 选择颜色
C/C++ Write Occurrences项:
选中变量时高亮(推荐Dashed Box)
关闭注释拼写检查
Windows --> Preferences --> General --> Editors -->Text Editors --> Annotations
关闭Spelling Errors下的Text as项;
关闭字符串拼写检查
Windows --> Preferences --> General --> Editors -->Text Editors --> Spelling
Ignore string literals.
隐藏指定文件(Filter)
右键工程(或目录)-->Properties-->
Resource-->Resource Filters
Add Filters...
选中:
Exculde all
Files
All Children(recursive)
在Filter Details中添加表达式即可:
*.bak
然后一路确认即可;
制表符处理
window——preference——General——Editor——Text Editor设置页面
Display Tab Width:指定制表符宽度;
Insert spaces for tabs,选择是否将制表符转换为空格;