操作系统:Fedora26 IDE版本: Code Blocks16.01
配置文件路径为:
~/.config/codeblocks
而不像一些教程写的在用户根目录下或者在软件安装目录
请将default.conf备份(以便回退)后替换为下列内容
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksConfig version="1">
<editor>
<colour_sets>
<default />
<ACTIVE_COLOUR_SET>
<str>
<![CDATA[oblivion]]>
</str>
</ACTIVE_COLOUR_SET>
<ACTIVE_LANG>
<str>
<![CDATA[C/C++]]>
</str>
</ACTIVE_LANG>
<oblivion>
<NAME>
<str>
<![CDATA[oblivion]]>
</str>
</NAME>
<cc>
<style0>
<FORE>
<colour r="238" g="238" b="236" />
</FORE>
<BACK>
<colour r="46" g="52" b="54" />
</BACK>
<NAME>
<str>
<![CDATA[Default]]>
</str>
</NAME>
</style0>
<style1>
<FORE>
<colour r="136" g="138" b="133" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style1>
<style2>
<FORE>
<colour r="136" g="138" b="133" />
</FORE>
<NAME>
<str>
<![CDATA[Comment (normal)]]>
</str>
</NAME>
</style2>
<style3>
<FORE>
<colour r="52" g="101" b="164" />
</FORE>
<BOLD bool="0" />
<NAME>
<str>
<![CDATA[Comment (documentation)]]>
</str>
</NAME>
</style3>
<style4>
<FORE>
<colour r="52" g="101" b="164" />
</FORE>
<BOLD bool="0" />
<NAME>
<str>
<![CDATA[Comment (documentation)]]>
</str>
</NAME>
</style4>
<style6>
<FORE>
<colour r="164" g="0" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Comment keyword error (documentation)]]>
</str>
</NAME>
</style6>
<style7>
<FORE>
<colour r="173" g="127" b="168" />
</FORE>
<BACK>
<colour r="46" g="52" b="54" />
</BACK>
<BOLD bool="1" />
<NAME>
<str>
<![CDATA[Number]]>
</str>
</NAME>
</style7>
<style8>
<FORE>
<colour r="233" g="185" b="110" />
</FORE>
<NAME>
<str>
<![CDATA[Keyword]]>
</str>
</NAME>
</style8>
<style9>
<FORE>
<colour r="78" g="154" b="6" />
</FORE>
<NAME>
<str>
<![CDATA[User keyword]]>
</str>
</NAME>
</style9>
<style10>
<FORE>
<colour r="185" g="49" b="0" />
</FORE>
<BACK>
<colour r="30" g="3" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[String]]>
</str>
</NAME>
</style10>
<style11>
<FORE>
<colour r="185" g="49" b="0" />
</FORE>
<BACK>
<colour r="30" g="3" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[String]]>
</str>
</NAME>
</style11>
<style12>
<FORE>
<colour r="245" g="121" b="0" />
</FORE>
<NAME>
<str>
<![CDATA[Character]]>
</str>
</NAME>
</style12>
<style13>
<FORE>
<colour r="211" g="215" b="207" />
</FORE>
<NAME>
<str>
<![CDATA[UUID]]>
</str>
</NAME>
</style13>
<style14>
<FORE>
<colour r="78" g="154" b="6" />
</FORE>
<NAME>
<str>
<![CDATA[Preprocessor]]>
</str>
</NAME>
</style14>
<style15>
<FORE>
<colour r="233" g="185" b="110" />
</FORE>
<NAME>
<str>
<![CDATA[Operator]]>
</str>
</NAME>
</style15>
<style16>
<BACK>
<colour r="23" g="32" b="24" />
</BACK>
<NAME>
<str>
<![CDATA[Selection]]>
</str>
</NAME>
</style16>
<style17>
<BACK>
<colour r="24" g="33" b="33" />
</BACK>
<NAME>
<str>
<![CDATA[Active line]]>
</str>
</NAME>
</style17>
<style18>
<BACK>
<colour r="114" g="159" b="207" />
</BACK>
<NAME>
<str>
<![CDATA[Matching brace highlight]]>
</str>
</NAME>
</style18>
<style19>
<FORE>
<colour r="238" g="238" b="236" />
</FORE>
<BACK>
<colour r="164" g="0" b="0" />
</BACK>
<NAME>
<str>
<![CDATA[No matching brace highlight]]>
</str>
</NAME>
</style19>
<NAME>
<str>
<![CDATA[C/C++]]>
</str>
</NAME>
<editor>
<keywords />
</editor>
</cc>
</oblivion>
</colour_sets>
</editor>
</CodeBlocksConfig>
过程在关闭codeblocks,如完成后打开未变色请在setting中调整,并调整光标颜色!
注意备份 配置文件!