因为觉得VS的黑色背景看起来比较舒服,自己用KEIL的时候也想做类似的背景,于是自己琢磨了一下。
1、找到下图文件
保存备份,防止设置出问题可以找回。
2、打开第一步找到的那个文件,把文件内容全部替换如下内容
# properties for all file types
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=936
caretline.visible=1
highlight.matchingbraces=1
print.syntax.coloring=1
use.tab.color=1
create.backup.files=0
auto.load.ext.modfiles=0
save.prj.before.dbg=0
save.files.before.dbg=0
function.scanner.project=1
function.scanner.files=1
function.scanner.modules=1
# properties for c/cpp files
syntax.colouring.cpp=1
use.tab.cpp=0
tabsize.cpp=2
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# properties for asm files
syntax.colouring.asm=1
use.tab.asm=0
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# properties for other files
use.tabs=0
tabsize=4
line.margin.visible.txt=0
monospaced.font.txt=1
# setting for code completion and syntax check
cc.autolist=1
cc.highlightsyntax=1
cc.showparameters=1
cc.triggerlist=1
cc.triggernumchars=3
cc.enter.as.fillup=0
# autosave for editor files
autosave=0
autosave.interval=5
# vertical edge at right margin
edge.mode=0
edge.column=80
# Specification for text selection and caret line
selection.fore=#000000
selection.back=#86C7F7
caret.fore=#F0F0F0
caret.back=#333333
# Color for vertical edge
edge.colour=#66FAFA
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |
#endif";\
"#include","#include ";"Header","// Header:
// File Name: |
// Author:
// Date:
";\
"continue","continue;";"do","do
{
// TODO: enter the block content here
|
} while ();
";\
"enum","enum |
{
};
";"for","for(|;;)
{
}";\
"fpointer_type","typedef int (* |F)();
";"function","void function(|)
{
}
";\
"if","if (|)";"ifelse","if (|)
{
}
else
{
}";\
"struct","struct |
{
};
";"switch","switch (|)
{
case:
break;
case:
break;
default:
break;
}";\
"void","void | ();
";"while","while (|)
{
}";\
font.monospace.cpp=Courier New
style.cpp.32=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.4=font:Courier New,size:10,fore:#BABA74,back:#121212
style.cpp.10=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.1=font:Courier New,size:10,fore:#007F00,back:#121212
style.cpp.2=font:Courier New,size:10,fore:#007F00,back:#121212
style.cpp.5=font:Courier New,size:10,fore:#0069D2,back:#121212
style.cpp.6=font:Courier New,size:10,fore:#CC00CC,back:#121212
style.cpp.11=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.9=font:Courier New,size:10,fore:#BF7D7D,back:#121212
style.cpp.7=font:Courier New,size:10,fore:#B300B3,back:#121212
style.cpp.34=font:Courier New,size:10,fore:#994D4D,back:#121212
style.cpp.35=font:Courier New,size:10,fore:#FF1515,back:#121212
style.cpp.16=font:Courier New,size:10,fore:#B00042,back:#121212
style.cpp.12=font:Courier New,size:10,fore:#F0F0F0,back:#121212
# Asm Editor files
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.1=font:Courier New,size:10,fore:#616161,back:#FFFFFF
style.asm.2=font:Courier New,size:10,fore:#FF0000,back:#FFFFFF
style.asm.3=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.4=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.5=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.6=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.7=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.9=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.10=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#FFFFFF
style.asm.12=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#FFFFFF
# Editor Text files
font.monospace.txt=Consolas
style.txt.32=font:Verdana,size:10,fore:#000000,back:#FFFFFF
3、保存退出,重新打开KEIL即可看到如下效果
如果是不喜欢这个颜色了,想换回来,直接用原来备份的文件替换掉修改过的文件即可。
补充一个自己通过KEIL软件配置的方法
1、选择配置
2、根据自己的需求,在下面配置修改即可