编辑器使用基础
1. 语法高亮
针对代码的语法高亮,太单一的不好,太细化的话感觉太花哨,那么如何定制自己的语法高亮呢?
确定每一个需要高亮的类型
以C/C++为例,一般的划分为:
1). class, struct, typedefs,
2). 宏定义
3). function
4). variables
5). comment
6). preprocess directive为确定的类型指定颜色
这里有现成的配色方案(暗色系)
描述 | 颜色值 |
---|---|
前景色 | 0xd0d0d0 |
背景色 | 0x202020 |
struct | 0x00c0c0 |
macro | 0x904040 |
function | 0xa8e030 |
variables | 0x808000 |
inner type | 0x000080 |
comment | 0x60c060 |
preprocess | 0x6000ff |
const string | 0xe0a080 |
暖色系的方案待续:
更具体的划分
更具体的配色方案