Keil C51 µVision IDE 配置文件修改字体大小的方法

最近在用keil的时候,发现默认字体实在太小了。正常来讲应该直接在config里面修改字体,不过这软件在我的win8.1上可能有问题。无法弹出配置框,直接卡死掉。所以我只能希望直接修改配置文件,来修改显示字体和大小。终于在 http://bbs.elecfans.com/jishu_458032_1_1.html这里找到了修改方法。
我的软件版本为:Keil uVision4 C51 v9.52版,在安装目录的 UV4 目录下,找到 global.prop
找到需要修改的语言区配置,比如一般都是C语言了,找到 # C/C++ Editor files
修改后类似我下面的例子:

# 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=YaHei Consolas Hybrid
style.cpp.32=font:YaHei Consolas Hybrid,size:20,fore:#000000,back:#FFFFFF
style.cpp.4=font:YaHei Consolas Hybrid,size:20,fore:#007F7F,back:#FFFFFF
style.cpp.10=font:YaHei Consolas Hybrid,size:20,fore:#000000,back:#FFFFFF
style.cpp.1=font:YaHei Consolas Hybrid,size:20,fore:#007F00,back:#FFFFFF
style.cpp.2=font:YaHei Consolas Hybrid,size:20,fore:#007F00,back:#FFFFFF
style.cpp.5=font:YaHei Consolas Hybrid,size:20,fore:#0000FF,back:#FFFFFF
style.cpp.6=font:YaHei Consolas Hybrid,size:20,fore:#7F007F,back:#FFFFFF
style.cpp.11=font:YaHei Consolas Hybrid,size:20,fore:#000000,back:#FFFFFF
style.cpp.9=font:YaHei Consolas Hybrid,size:20,fore:#7F7F00,back:#FFFFFF
style.cpp.7=font:YaHei Consolas Hybrid,size:20,fore:#7F007F,back:#FFFFFF
style.cpp.34=font:YaHei Consolas Hybrid,size:20,fore:#500000,back:#20FFFF
style.cpp.35=font:YaHei Consolas Hybrid,size:20,fore:#FF0000,back:#FFFFFF
style.cpp.16=font:YaHei Consolas Hybrid,size:20,fore:#B00040,back:#FFFFFF

要注意的是,我这修改的字体叫 YaHei Consolas Hybrid,是一款程序员广泛使用的consolas和雅黑混合字体,而这个位置当然根据需要修改成你要改的名称,不要照搬。字号也一样,我这里设置的是20号。前面那堆 template.cpp=xxxxx 不知道是什么,没有动过。

点赞