找到MDK软件安装目录下的UV4文件夹下的global.prop文件,用记事本打开该文件,复制下面配置替换到global.prop文件里的所有内容,保存:
配置代码中某些设置项的作用,可自行更改
caret.back=#DEFEE6 #插入符号(光标)行的背景颜色
style.cpp.32=font:Courier New,size:10,fore:#000000,back:#FFFFFF #空白位置
style.cpp.4=font:Courier New,size:10,fore:#007F7F,back:#FFFFFF #数字
style.cpp.10=font:Courier New,size:10,fore:#000000,back:#FFFFFF #符号
style.cpp.1=font:Courier New,size:10,fore:#007F00,back:#FFFFFF #/注释/
style.cpp.2=font:Courier New,size:10,fore:#007F00,back:#FFFFFF #//注释
style.cpp.5=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF #关键字
style.cpp.6=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF #字符串
style.cpp.11=font:Courier New,size:10,fore:#000000,back:#FFFFFF #变量和函数名
style.cpp.9=font:Courier New,size:10,fore:#7F7F00,back:#FFFFFF #预编译关键字
上面的font代表字体,fore代表字体颜色,back代表背景颜色,颜色是用RGB 6位十六进制数表示的
**文章来源:https://www.toymoban.com/news/detail-400530.html
一、
**
# 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=3
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=#FFFFFF
caret.back=#400000
# Color for vertical edge
edge.colour=#00FF00
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\\
font.monospace.cpp=Courier New
style.cpp.32=font:Courier New,size:12,fore:#F8F8F8,back:#0B161D
style.cpp.4=font:Courier New,size:12,fore:#FF3A83,back:#0B161D
style.cpp.10=font:Courier New,size:12,fore:#FFAA00,back:#0B161D
style.cpp.1=font:Courier New,size:12,fore:#00FF00,back:#0B161D
style.cpp.2=font:Courier New,size:12,fore:#1E9AE0,back:#0B161D
style.cpp.5=font:Courier New,size:12,fore:#FFAA00,back:#0B161D,bold
style.cpp.6=font:Courier New,size:12,fore:#55E439,back:#0B161D
style.cpp.11=font:Courier New,size:12,fore:#F8F8F8,back:#0B161D
style.cpp.9=font:Courier New,size:12,fore:#FFAA00,back:#0B161D
style.cpp.7=font:Courier New,size:12,fore:#55E439,back:#0B161D
style.cpp.34=font:Courier New,size:12,fore:#500000,back:#20FFFF
style.cpp.35=font:Courier New,size:12,fore:#FF0000,back:#FFFFFF
style.cpp.16=font:Courier New,size:12,fore:#B00040,back:#0B161D
style.cpp.12=font:Courier New,size:12,fore:#000000,back:#E0C0E0
# Asm Editor files
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:16,fore:#F8F8F8,back:#0B161D
style.asm.1=font:Courier New,size:16,fore:#1E9AE0,back:#0B161D
style.asm.2=font:Courier New,size:16,fore:#FF3A83,back:#0B161D
style.asm.3=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
style.asm.4=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
style.asm.5=font:Courier New,size:16,fore:#F8F8F8,back:#0B161D
style.asm.6=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
style.asm.7=font:Courier New,size:16,fore:#0000FF,back:#0B161D
style.asm.9=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
style.asm.10=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
style.asm.11=font:Courier New,size:16,fore:#007F00,back:#0B161D
style.asm.12=font:Courier New,size:16,fore:#55E439,back:#0B161D
style.asm.8=font:Courier New,size:16,fore:#FFAA00,back:#0B161D
# Editor Text files
font.monospace.txt=Courier New
style.txt.32=font:Courier New,size:14,fore:#FFFFFF,back:#000000
效果:
**
二、
**
# properties for all file types
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=0
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=1
tabsize.cpp=4
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# properties for asm files
syntax.colouring.asm=1
use.tab.asm=1
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# properties for other files
use.tabs=1
tabsize=4
line.margin.visible.txt=1
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=#000000
caret.back=#D2DCE6
# Color for vertical edge
edge.colour=#66FAFA
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\\
font.monospace.cpp=Consolas
style.cpp.32=font:Consolas,size:12,fore:#000000,back:#D2DCE6
style.cpp.4=font:Consolas,size:12,fore:#FF0000,back:#D2DCE6
style.cpp.10=font:Consolas,size:12,fore:#800080,back:#D2DCE6
style.cpp.1=font:Consolas,size:12,fore:#008080,back:#A8BBCE
style.cpp.2=font:Consolas,size:12,fore:#008080,back:#A8BBCE
style.cpp.5=font:Consolas,size:12,fore:#FF8000,back:#D2DCE6
style.cpp.6=font:Consolas,size:12,fore:#FF00FF,back:#FBF1C4
style.cpp.11=font:Consolas,size:12,fore:#000080,back:#D2DCE6
style.cpp.9=font:Consolas,size:12,fore:#0000FF,back:#D2DCE6
style.cpp.7=font:Consolas,size:12,fore:#7F007F,back:#D2DCE6
style.cpp.34=font:Consolas,size:12,fore:#500000,back:#20FFFF
style.cpp.35=font:Consolas,size:12,fore:#FF0000,back:#D2DCE6
style.cpp.16=font:Consolas,size:12,fore:#B00040,back:#D2DCE6
style.cpp.12=font:Consolas,size:12,fore:#000000,back:#E0C0E0
# 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=Courier New
style.txt.32=font:Verdana,size:10,fore:#000000,back:#FFFFFF
效果:
**
三、
**
# properties for all file types
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=936
caretline.visible=0
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=0
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=0
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=#FFFFFF
caret.fore=#D8D8D8
caret.back=#3E3E3E
# Color for vertical edge
edge.colour=#66FAFA
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\\
font.monospace.cpp=Consolas
font.acpmonofontname.cpp=Consolas
font.acppropfontname.cpp=Consolas
style.cpp.32=font:Consolas,size:16,fore:#CFCFCF,back:#2F2F2F
style.cpp.4=font:Consolas,size:16,fore:#FF409F,back:#2F2F2F
style.cpp.10=font:Consolas,size:16,fore:#FFFF00,back:#2F2F2F
style.cpp.1=font:Consolas,size:16,fore:#8080FF,back:#2F2F2F
style.cpp.2=font:Consolas,size:16,fore:#979797,back:#2F2F2F
style.cpp.5=font:Consolas,size:16,fore:#E360E3,back:#2F2F2F
style.cpp.6=font:Consolas,size:16,fore:#80FF80,back:#2F2F2F
style.cpp.11=font:Consolas,size:16,fore:#FFFFFF,back:#2F2F2F
style.cpp.9=font:Consolas,size:16,fore:#FF8080,back:#2F2F2F
style.cpp.7=font:Consolas,size:16,fore:#FF0080,back:#2F2F2F
style.cpp.34=font:Consolas,size:16,fore:#500000,back:#20FFFF
style.cpp.35=font:Consolas,size:16,fore:#FF0000,back:#FFFFFF
style.cpp.16=font:Consolas,size:16,fore:#D9006C,back:#FFFFFF
style.cpp.12=font:Consolas,size:16,fore:#000000,back:#E0C0E0
# Asm Editor files
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.1=font:Courier New,size:10,fore:#808040,back:#2F2F2F
style.asm.2=font:Courier New,size:10,fore:#D56A00,back:#2F2F2F
style.asm.3=font:Courier New,size:10,fore:#FF8040,back:#2F2F2F
style.asm.4=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.5=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.6=font:Courier New,size:10,fore:#FFFF80,back:#2F2F2F
style.asm.7=font:Courier New,size:10,fore:#FFFF80,back:#2F2F2F
style.asm.9=font:Courier New,size:10,fore:#80FFFF,back:#2F2F2F
style.asm.10=font:Courier New,size:10,fore:#80FFFF,back:#2F2F2F
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#2F2F2F
style.asm.12=font:Courier New,size:10,fore:#FF80FF,back:#2F2F2F
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#2F2F2F
# Editor Text files
font.monospace.txt=Courier New
style.txt.32=font:Verdana,size:10,fore:#FFFFFF,back:#2F2F2F
效果:
**
四、
**
# 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=0
fold.cpp=0
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
cc.usealpha4inactcode=1
cc.alphavalue=50
# 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=#FFFFFF
selection.back=#3B575A
caret.fore=#FFFFFF
caret.back=#263238
# Color for vertical edge
edge.colour=#66FAFA
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\\
font.monospace.cpp=Consolas
font.acpmonofontname.cpp=Consolas
font.acppropfontname.cpp=Consolas
style.cpp.32=font:Consolas,size:10,fore:#FFFFFF,back:#263238
style.cpp.4=font:Consolas,size:10,fore:#F78C6B,back:#263238
style.cpp.10=font:Consolas,size:10,fore:#89FFFF,back:#263238
style.cpp.1=font:Consolas,size:10,fore:#546E76,back:#263238
style.cpp.2=font:Consolas,size:10,fore:#546E76,back:#263238
style.cpp.5=font:Consolas,size:10,fore:#C792EA,back:#263238
style.cpp.6=font:Consolas,size:10,fore:#C3E88D,back:#263238
style.cpp.11=font:Consolas,size:10,fore:#FFFFFF,back:#263238
style.cpp.9=font:Consolas,size:10,fore:#9370DB,back:#263238
style.cpp.7=font:Consolas,size:10,fore:#AAAAAA,back:#263238
style.cpp.34=font:Consolas,size:10,fore:#FFFFFF,back:#20FFFF
style.cpp.35=font:Consolas,size:10,fore:#CCCCCC,back:#263238
style.cpp.16=font:Consolas,size:10,fore:#DDDDDD,back:#263238
style.cpp.12=font:Consolas,size:10,fore:#EEEEEE,back:#E0C0E0
style.cpp.86=font:Consolas,size:10,fore:#FFFF80,back:#263238
# Asm Editor files
font.monospace.asm=Consolas
style.asm.32=font:Consolas,size:10,fore:#263238,back:#F07178
style.asm.1=font:Consolas,size:10,fore:#616161,back:#F07178
style.asm.2=font:Consolas,size:10,fore:#FF0000,back:#F07178
style.asm.3=font:Consolas,size:10,fore:#7F007F,back:#F07178
style.asm.4=font:Consolas,size:10,fore:#263238,back:#F07178
style.asm.5=font:Consolas,size:10,fore:#263238,back:#F07178
style.asm.6=font:Consolas,size:10,fore:#C792EA,back:#F07178
style.asm.7=font:Consolas,size:10,fore:#C792EA,back:#F07178
style.asm.9=font:Consolas,size:10,fore:#C792EA,back:#F07178
style.asm.10=font:Consolas,size:10,fore:#C792EA,back:#F07178
style.asm.11=font:Consolas,size:10,fore:#007F00,back:#F07178
style.asm.12=font:Consolas,size:10,fore:#7F007F,back:#F07178
style.asm.8=font:Consolas,size:10,fore:#46AA03,back:#F07178
# Editor Text files
font.monospace.txt=Consolas
style.txt.32=font:Verdana,size:10,fore:#263238,back:#FFFFFF
效果:
文章来源地址https://www.toymoban.com/news/detail-400530.html
到了这里,关于MDK、Keil 5 界面主题优化的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!