修改Keil开发环境背景(修改为黑色主题)
Posted 跋扈洋
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了修改Keil开发环境背景(修改为黑色主题)相关的知识,希望对你有一定的参考价值。
修改Keil开发背景(修改为黑色主题)
引言
我们平时在Keil uVision5下开发单片机/嵌入式程序的时候,如果始终用的是官方的主题背景,往往会因为背景太白了,而导致视疲劳。我们使用VSCode往往不会有这种困扰,因为黑色开发背景,不会让我们这么容易视疲劳。本文将逐步讲解如何修改Keil uVision5主题背景,变成黑色的主题。
步骤
正常情况,我们的Keil默认白色背景,如下所示。
下面我们来介绍如何修改成黑色主题。
-
我们右键Keil uVision5桌面图标,选择打开文件所在的位置。
-
找到文件夹中的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=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
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=#000000
selection.back=#86C7F7
caret.fore=#000000
caret.back=#DEFEE6
# 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=Courier New
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
style.cpp.7=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.cpp.34=font:Courier New,size:10,fore:#500000,back:#20FFFF
style.cpp.35=font:Courier New,size:10,fore:#FF0000,back:#FFFFFF
style.cpp.16=font:Courier New,size:10,fore:#B00040,back:#FFFFFF
style.cpp.12=font:Courier New,size:10,fore:#000000,back:#E0C0E0
style.cpp.86=font:Courier New,size:10,fore:#696969,back:#FFFFFF
# 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
- 我们可以根据自己的需求进行修改,这里我提供一种改法。
# properties for all file types
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=0
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=1
function.scanner.modules=1
# properties for c/cpp files
syntax.colouring.cpp=1
use.tab.cpp=0
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=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=#FFFFFF
selection.back=#FF8000
caret.fore=#00FF00
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=Inconsolata
style.cpp.32=font:Inconsolata,size:18,fore:#FFFFFF,back:#2F2F2F
style.cpp.4=font:Inconsolata,size:18,fore:#FF0080,back:#2F2F2F
style.cpp.10=font:Inconsolata,size:18,fore:#FFFFFF,back:#2F2F2F
style.cpp.1=font:Inconsolata,size:18,fore:#00FFFF,back:#2F2F2F
style.cpp.2=font:Inconsolata,size:18,fore:#00FFFF,back:#2F2F2F
style.cpp.5=font:Inconsolata,size:18,fore:#00FF00,back:#2F2F2F,italics
style.cpp.6=font:Inconsolata,size:18,fore:#FF8040,back:#2F2F2F
style.cpp.11=font:Inconsolata,size:18,fore:#FFFFFF,back:#2F2F2F
style.cpp.9=font:Inconsolata,size:18,fore:#FF8080,back:#2F2F2F
style.cpp.7=font:Inconsolata,size:18,fore:#FFFF00,back:#2F2F2F
style.cpp.34=font:Inconsolata,size:18,fore:#500000,back:#20FFFF
style.cpp.35=font:Inconsolata,size:18,fore:#FF0000,back:#FFFFFF
style.cpp.16=font:Inconsolata,size:18,fore:#B00040,back:#FFFFFF
style.cpp.12=font:Inconsolata,size:18,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:#FF80FF,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
- 我这里建议,读者可以直接下载我改好的这个文件,这样会简单点,将我的文件替换到你的Keil目录下,替换global.prop。
下载地址放在文章最后。 - 修改后,关闭Keil,重新打开Keil,开发背景如下图。
总结
大家可以进行修改背景配置文件内容;或者下载我改好的配置文件,放在你的Keil的文件所在位置,替换你的global.prop。重启软件将成功。
文件获取方式:
- 公众号《物联网知识》,发送:“Keil开发环境背景”
- CSDN下载:https://download.csdn.net/download/qq_44629109/87369302
欢迎关注公众号:物联网知识
以上是关于修改Keil开发环境背景(修改为黑色主题)的主要内容,如果未能解决你的问题,请参考以下文章
webstorm:修改为黑色背景 好看的webstorm主题