codeblocks主題修改(vim)
阿新 • • 發佈:2019-01-22
codeblocks的配置檔案是default.conf,在Windows系統下,該檔案在C:\Documents and Settings\Administrator\Application Data\CodeBlocks;在Linux系統下,該檔案在~/.codeblocks。該資料夾在codeblocks首次開啟後才會生成。
開啟"設定"->"編輯器"->"語法高亮"視窗,第一個下拉框就是設定主題的,總共有3種主題,來自網際網路,本人就做了個整合。
色彩主題裡面有:default(預設白色) desert oblivion ulipad vim
首先關閉codeblocks,找到default.conf並開啟,將以下的內容替換成原來<colour_sets></colour_sets>:
<colour_sets> <ACTIVE_COLOUR_SET> <str> <![CDATA[vim]]> </str> </ACTIVE_COLOUR_SET> <ACTIVE_LANG> <str> <![CDATA[C/C++]]> </str> </ACTIVE_LANG> <ulipad> <NAME> <str> <![CDATA[ulipad]]> </str> </NAME> <cc> <style0> <FORE> <colour r="141" g="176" b="211" /> </FORE> <BACK> <colour r="17" g="36" b="53" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style0> <style1> <FORE> <colour r="141" g="176" b="211" /> </FORE> <BACK> <colour r="17" g="36" b="53" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style1> <style5> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style5> <style6> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style6> <style7> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style7> <style8> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style8> <style11> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style11> <style12> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style12> <style13> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style13> <style14> <FORE> <colour r="0" g="207" b="203" /> </FORE> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style14> <style17> <FORE> <colour r="111" g="66" b="66" /> </FORE> <NAME> <str> <![CDATA[Comment keyword (documentation)]]> </str> </NAME> </style17> <style18> <FORE> <colour r="111" g="66" b="66" /> </FORE> <NAME> <str> <![CDATA[Comment keyword (documentation)]]> </str> </NAME> </style18> <style19> <FORE> <colour r="0" g="0" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment keyword error (documentation)]]> </str> </NAME> </style19> <style20> <FORE> <colour r="0" g="0" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment keyword error (documentation)]]> </str> </NAME> </style20> <style23> <FORE> <colour r="255" g="255" b="0" /> </FORE> <NAME> <str> <![CDATA[Keyword]]> </str> </NAME> </style23> <style25> <FORE> <colour r="141" g="176" b="211" /> </FORE> <NAME> <str> <![CDATA[User keyword]]> </str> </NAME> </style25> <style29> <FORE> <colour r="0" g="255" b="128" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style29> <style30> <FORE> <colour r="0" g="255" b="128" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style30> <style35> <FORE> <colour r="219" g="112" b="219" /> </FORE> <NAME> <str> <![CDATA[UUID]]> </str> </NAME> </style35> <style36> <FORE> <colour r="128" g="128" b="128" /> </FORE> <NAME> <str> <![CDATA[Preprocessor]]> </str> </NAME> </style36> <style38> <FORE> <colour r="240" g="128" b="79" /> </FORE> <NAME> <str> <![CDATA[Operator]]> </str> </NAME> </style38> <style40> <FORE> <colour r="255" g="255" b="255" /> </FORE> <BACK> <colour r="46" g="159" b="39" /> </BACK> <NAME> <str> <![CDATA[Selection]]> </str> </NAME> </style40> <style41> <BACK> <colour r="255" g="255" b="255" /> </BACK> <NAME> <str> <![CDATA[Active line]]> </str> </NAME> </style41> <editor> <keywords> <SET4> <str> <![CDATA[__cplusplus __GNUC__ __GNUG__]]> </str> </SET4> </keywords> </editor> <NAME> <str> <![CDATA[C/C++]]> </str> </NAME> </cc> </ulipad> <desert> <NAME> <str> <![CDATA[desert]]> </str> </NAME> <cc> <style0> <FORE> <colour r="255" g="255" b="255" /> </FORE> <BACK> <colour r="43" g="43" b="43" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style0> <style1> <FORE> <colour r="255" g="255" b="255" /> </FORE> <BACK> <colour r="43" g="43" b="43" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style1> <style5> <FORE> <colour r="135" g="206" b="235" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style5> <style6> <FORE> <colour r="135" g="206" b="235" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style6> <style7> <FORE> <colour r="135" g="206" b="235" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style7> <style8> <FORE> <colour r="135" g="206" b="235" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style8> <style11> <FORE> <colour r="105" g="105" b="105" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style11> <style12> <FORE> <colour r="105" g="105" b="105" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style12> <style13> <FORE> <colour r="105" g="105" b="105" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style13> <style14> <FORE> <colour r="105" g="105" b="105" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style14> <style21> <FORE> <colour r="255" g="160" b="160" /> </FORE> <NAME> <str> <![CDATA[Number]]> </str> </NAME> </style21> <style23> <FORE> <colour r="189" g="183" b="107" /> </FORE> <NAME> <str> <![CDATA[Keyword]]> </str> </NAME> </style23> <style25> <FORE> <colour r="255" g="128" b="64" /> </FORE> <NAME> <str> <![CDATA[User keyword]]> </str> </NAME> </style25> <style29> <FORE> <colour r="255" g="160" b="160" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style29> <style30> <FORE> <colour r="255" g="160" b="160" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style30> <style33> <FORE> <colour r="255" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Character]]> </str> </NAME> </style33> <style35> <FORE> <colour r="255" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[UUID]]> </str> </NAME> </style35> <style36> <FORE> <colour r="205" g="92" b="92" /> </FORE> <NAME> <str> <![CDATA[Preprocessor]]> </str> </NAME> </style36> <style38> <FORE> <colour r="255" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Operator]]> </str> </NAME> </style38> <style41> <FORE> <colour r="192" g="192" b="192" /> </FORE> <BACK> <colour r="255" g="0" b="0" /> </BACK> <NAME> <str> <![CDATA[Active line]]> </str> </NAME> </style41> <style42> <BACK> <colour r="128" g="128" b="192" /> </BACK> <NAME> <str> <![CDATA[Matching brace highlight]]> </str> </NAME> </style42> <NAME> <str> <![CDATA[C/C++]]> </str> </NAME> <editor> <keywords /> </editor> </cc> </desert> <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="238" g="238" b="236" /> </FORE> <BACK> <colour r="46" g="52" b="54" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style1> <style5> <FORE> <colour r="136" g="138" b="133" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style5> <style6> <FORE> <colour r="136" g="138" b="133" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style6> <style7> <FORE> <colour r="136" g="138" b="133" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style7> <style8> <FORE> <colour r="136" g="138" b="133" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style8> <style11> <FORE> <colour r="52" g="101" b="164" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style11> <style12> <FORE> <colour r="52" g="101" b="164" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style12> <style13> <FORE> <colour r="52" g="101" b="164" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style13> <style14> <FORE> <colour r="52" g="101" b="164" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style14> <style19> <FORE> <colour r="164" g="0" b="0" /> </FORE> <NAME> <str> <![CDATA[Comment keyword error (documentation)]]> </str> </NAME> </style19> <style20> <FORE> <colour r="164" g="0" b="0" /> </FORE> <NAME> <str> <![CDATA[Comment keyword error (documentation)]]> </str> </NAME> </style20> <style21> <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> </style21> <style23> <FORE> <colour r="233" g="185" b="110" /> </FORE> <NAME> <str> <![CDATA[Keyword]]> </str> </NAME> </style23> <style25> <FORE> <colour r="78" g="154" b="6" /> </FORE> <NAME> <str> <![CDATA[User keyword]]> </str> </NAME> </style25> <style29> <FORE> <colour r="185" g="49" b="0" /> </FORE> <BACK> <colour r="30" g="3" b="0" /> </BACK> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style29> <style30> <FORE> <colour r="185" g="49" b="0" /> </FORE> <BACK> <colour r="30" g="3" b="0" /> </BACK> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style30> <style33> <FORE> <colour r="245" g="121" b="0" /> </FORE> <NAME> <str> <![CDATA[Character]]> </str> </NAME> </style33> <style35> <FORE> <colour r="211" g="215" b="207" /> </FORE> <NAME> <str> <![CDATA[UUID]]> </str> </NAME> </style35> <style36> <FORE> <colour r="78" g="154" b="6" /> </FORE> <NAME> <str> <![CDATA[Preprocessor]]> </str> </NAME> </style36> <style38> <FORE> <colour r="233" g="185" b="110" /> </FORE> <NAME> <str> <![CDATA[Operator]]> </str> </NAME> </style38> <style40> <BACK> <colour r="23" g="32" b="24" /> </BACK> <NAME> <str> <![CDATA[Selection]]> </str> </NAME> </style40> <style41> <BACK> <colour r="24" g="33" b="33" /> </BACK> <NAME> <str> <![CDATA[Active line]]> </str> </NAME> </style41> <style42> <BACK> <colour r="114" g="159" b="207" /> </BACK> <NAME> <str> <![CDATA[Matching brace highlight]]> </str> </NAME> </style42> <style43> <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> </style43> <editor> <keywords> <SET4> <str> <![CDATA[__cplusplus __GNUC__ __GNUG__]]> </str> </SET4> </keywords> </editor> <NAME> <str> <![CDATA[C/C++]]> </str> </NAME> </cc> </oblivion> <default> <NAME> <str> <![CDATA[default]]> </str> </NAME> </default> <vim> <NAME> <str> <![CDATA[vim]]> </str> </NAME> <cc> <style0> <FORE> <colour r="170" g="170" b="170" /> </FORE> <BACK> <colour r="34" g="40" b="43" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style0> <style1> <FORE> <colour r="170" g="170" b="170" /> </FORE> <BACK> <colour r="34" g="40" b="43" /> </BACK> <NAME> <str> <![CDATA[Default]]> </str> </NAME> </style1> <style5> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style5> <style6> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style6> <style7> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style7> <style8> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment (normal)]]> </str> </NAME> </style8> <style9> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment line (normal)]]> </str> </NAME> </style9> <style10> <FORE> <colour r="85" g="255" b="255" /> </FORE> <NAME> <str> <![CDATA[Comment line (normal)]]> </str> </NAME> </style10> <style11> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style11> <style12> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style12> <style13> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style13> <style14> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment (documentation)]]> </str> </NAME> </style14> <style15> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment line (documentation)]]> </str> </NAME> </style15> <style16> <FORE> <colour r="85" g="255" b="255" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Comment line (documentation)]]> </str> </NAME> </style16> <style21> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[Number]]> </str> </NAME> </style21> <style22> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[Number (inactive)]]> </str> </NAME> </style22> <style23> <FORE> <colour r="0" g="255" b="0" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[Keyword]]> </str> </NAME> </style23> <style25> <FORE> <colour r="225" g="160" b="0" /> </FORE> <BOLD bool="0" /> <NAME> <str> <![CDATA[User keyword]]> </str> </NAME> </style25> <style26> <FORE> <colour r="160" g="160" b="160" /> </FORE> <NAME> <str> <![CDATA[User keyword (inactive)]]> </str> </NAME> </style26> <style29> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style29> <style30> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[String]]> </str> </NAME> </style30> <style31> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[String (inactive)]]> </str> </NAME> </style31> <style32> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[String (inactive)]]> </str> </NAME> </style32> <style33> <FORE> <colour r="255" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[Character]]> </str> </NAME> </style33> <style36> <FORE> <colour r="85" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[Preprocessor]]> </str> </NAME> </style36> <style37> <FORE> <colour r="85" g="85" b="255" /> </FORE> <NAME> <str> <![CDATA[Preprocessor (inactive)]]> </str> </NAME> </style37> <style38> <FORE> <colour r="160" g="160" b="160" /> </FORE> <NAME> <str> <![CDATA[Operator]]> </str> </NAME> </style38> <style39> <FORE> <colour r="170" g="170" b="170" /> </FORE> <NAME> <str> <![CDATA[Operator (inactive)]]> </str> </NAME> </style39> <style40> <FORE> <colour r="0" g="0" b="0" /> </FORE> <BACK> <colour r="170" g="170" b="170" /> </BACK> <NAME> <str> <![CDATA[Selection]]> </str> </NAME> </style40> <style42> <FORE> <colour r="0" g="255" b="255" /> </FORE> <BACK> <colour r="34" g="40" b="43" /> </BACK> <ITALICS bool="1" /> <NAME> <str> <![CDATA[Matching brace highlight]]> </str> </NAME> </style42> <editor> <keywords> <SET4> <str> <![CDATA[__cplusplus __GNUC__ __GNUG__]]> </str> </SET4> </keywords> </editor> <NAME> <str> <![CDATA[C/C++]]> </str> </NAME> </cc> </vim> </colour_sets>
開啟"設定"->"編輯器"->"語法高亮"視窗,第一個下拉框就是設定主題的,總共有3種主題,來自網際網路,本人就做了個整合。
色彩主題裡面有:default(預設白色) desert oblivion ulipad vim
任意選擇一個使用,上述只是隨便起個名稱,不代表真正的主題意思。
推薦vim主題,vim是我模仿Qtcreator裡面的vim(dark)配色方案修改而成的,對眼睛保護很好。
vim效果: