相信大家对于keil这个软件一定不陌生,不管是51开发还是stm32的开发大多数人还是用的keil IDE,但是它的默认主题十分亮眼,长时间敲代码对眼睛的伤害还是比较大的。
经过一番折腾,终于配了一个自己感觉还行的主题。
下面介绍一下如何快速拥有这款主题:
首先找到你安装keil的位置,在UV4文件夹下找到global.prop,
用记事本打开:
将其中的内容替换为下面的内容,然后保存退出即可:
# 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=1
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=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=0
cc.triggernumchars=3
cc.enter.as.fillup=0
# autosave for editor files
autosave=1
autosave.interval=5
# vertical edge at right margin
edge.mode=0
edge.column=80
# Specification for text selection and caret line
selection.fore=#344567
selection.back=#7894B6
caret.fore=#C9C9C9
caret.back=#425B7B
# Color for vertical edge
edge.colour=#05A7A7
# 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:#BFC5CE,back:#282C34
style.cpp.4=font:Courier New,size:12,fore:#FF8764,back:#282C34
style.cpp.10=font:Courier New,size:12,fore:#838FA7,back:#282C34
style.cpp.1=font:Courier New,size:12,fore:#676E95,back:#282C34,italics
style.cpp.2=font:Courier New,size:12,fore:#676E95,back:#282C34,italics
style.cpp.5=font:Courier New,size:12,fore:#7C5CFA,back:#282C34,bold
style.cpp.6=font:Courier New,size:12,fore:#7575FF,back:#282C34,italics
style.cpp.11=font:Courier New,size:12,fore:#B0B7C3,back:#282C34
style.cpp.9=font:Courier New,size:12,fore:#EE57FB,back:#282C34,bold
style.cpp.7=font:Courier New,size:12,fore:#8080FF,back:#282C34
style.cpp.34=font:Courier New,size:12,fore:#4576DA,back:#A8A8A8
style.cpp.35=font:Courier New,size:12,fore:#FF0000,back:#282C34
style.cpp.16=font:Courier New,size:12,fore:#8CACC6,back:#282C34,bold
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:10,fore:#B0B7C3,back:#282C34
style.asm.1=font:Courier New,size:10,fore:#B0B7C3,back:#282C34
style.asm.2=font:Courier New,size:10,fore:#FF5B5B,back:#282C34
style.asm.3=font:Courier New,size:10,fore:#FF42FF,back:#282C34
style.asm.4=font:Courier New,size:10,fore:#FCFCFC,back:#282C34
style.asm.5=font:Courier New,size:10,fore:#E8E8E8,back:#282C34
style.asm.6=font:Courier New,size:10,fore:#7575FF,back:#282C34
style.asm.7=font:Courier New,size:10,fore:#7D7DFF,back:#282C34
style.asm.9=font:Courier New,size:10,fore:#A2A2FF,back:#282C34
style.asm.10=font:Courier New,size:10,fore:#9595FF,back:#282C34
style.asm.11=font:Courier New,size:10,fore:#7BFF7B,back:#282C34
style.asm.12=font:Courier New,size:10,fore:#FF75FF,back:#282C34
style.asm.8=font:Courier New,size:10,fore:#A3FD66,back:#282C34
# Editor Text files
font.monospace.txt=Courier New
style.txt.32=font:Verdana,size:10,fore:#C5C5C5,back:#2E3849