本文转自:http://www.eeworld.com.cn/mcu/article_2016122332540.html
修改后的配置文件在该路径下:C:\Keil_v5\UV4\global.prop
若修改后系统默认字体找不到Courier New,则可以通过修改配置文件让其重新显示出来
operator,block,brackets:括号,逗号,分号等
Identifier:英文代码正文
方案一:
font.monospace.cpp=Courier New style.cpp.32=font:Courier New,size:11,fore:#000000,back:#CCE8CF style.cpp.4=font:Courier New,size:11,fore:#FF00FF,back:#CCE8CF style.cpp.10=font:Courier New,size:11,fore:#000000,back:#CCE8CF style.cpp.1=font:Courier New,size:11,fore:#008000,back:#CCE8CF style.cpp.2=font:Courier New,size:11,fore:#007F00,back:#CCE8CF style.cpp.5=font:Courier New,size:11,fore:#0080FF,back:#CCE8CF style.cpp.6=font:Courier New,size:11,fore:#7F007F,back:#CCE8CF style.cpp.11=font:Courier New,size:11,fore:#000000,back:#CCE8CF style.cpp.9=font:Courier New,size:11,fore:#0000A0,back:#CCE8CF style.cpp.7=font:Courier New,size:11,fore:#0000A0,back:#CCE8CF style.cpp.34=font:Courier New,size:11,fore:#500000,back:#20FFFF style.cpp.35=font:Courier New,size:11,fore:#FF0000,back:#CCE8CF style.cpp.16=font:Courier New,size:11,fore:#B00040,back:#CCE8CF style.cpp.12=font:Courier New,size:11,fore:#000000,back:#E0C0E0
方案一效果
方案二:
font.monospace.cpp=Courier New style.cpp.32=font:Courier New,size:11,fore:#000000,back:#B3BF87 style.cpp.4=font:Courier New,size:11,fore:#FF00FF,back:#B3BF87 style.cpp.10=font:Courier New,size:11,fore:#000000,back:#B3BF87 style.cpp.1=font:Courier New,size:11,fore:#008000,back:#B3BF87 style.cpp.2=font:Courier New,size:11,fore:#007F00,back:#B3BF87 style.cpp.5=font:Courier New,size:11,fore:#0000FF,back:#B3BF87 style.cpp.6=font:Courier New,size:11,fore:#7F007F,back:#B3BF87 style.cpp.11=font:Courier New,size:11,fore:#000000,back:#B3BF87 style.cpp.9=font:Courier New,size:11,fore:#C51F1F,back:#B3BF87 style.cpp.7=font:Courier New,size:11,fore:#8000FF,back:#B3BF87 style.cpp.34=font:Courier New,size:11,fore:#500000,back:#20FFFF style.cpp.35=font:Courier New,size:11,fore:#FF0000,back:#B3BF87 style.cpp.16=font:Courier New,size:11,fore:#B00040,back:#B3BF87 style.cpp.12=font:Courier New,size:11,fore:#000000,back:#E0C0E0
方案二效果