找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4711|回复: 2
打印 上一主题 下一主题
收起左侧

keil5的单个字体颜色设置问题

[复制链接]
跳转到指定楼层
楼主
ID:275111 发表于 2019-2-27 13:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#define  ENABLE  1
#define  DISABLE  0
看见变量 ENABLE 是红色的。其他的颜色都是默认的,就这一个是 红色的。
请问这个要怎么设置?
我改 font,一改是全部都变色,不是单个变色。

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:291246 发表于 2019-4-25 14:05 | 只看该作者
我也碰到类似的问题,用记事本打开keil5安装目录下面的global.prop文件,将下面的内容替代原来的内容即可

# 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=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

# autosave for editor files
autosave=0
autosave.interval=5


# Specification for text selection and caret line
selection.fore=#000000
selection.back=#86C7F7
caret.fore=#000000
caret.back=#DEFEE6

# 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


# 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


回复

使用道具 举报

板凳
ID:291246 发表于 2019-4-25 14:07 | 只看该作者
我电脑同时安装了keil4,将keil4目录下global.prop文件,拷贝替换keil5目录下的同名文件,则OK
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表