作者Chris7462 (~烤焦面包~)
看板Editor
标题[vim ] 颜色配色
时间Mon Sep 19 11:37:55 2016
想请问版上各位先进,Vim 的配色有没有比较接近下面这个样子的配色?
#include <iostream>
#include "Array.h"
using namespace std;
int main() {
Array *array =
new array(
10);
for(
int i =
0; i < array->length; i++) {
array->
set(i,i+
1);
}
for(
int i =
0; i < array->length; i++) {
cout << array->
get(i) << " ";
}
cout << endl;
delete array;
return 0;
}
我现在用的 colorscheme 是 default ,基本上满意,
但是他不会对自己写的 class 跟 function 上色。我试过加上下面这些设定
" Highlight Class and Function names
syn match cCustomParen "(" contains=cParen,cCppParen
syn match cCustomFunc "\w\+\s*(" contains=cCustomParen
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomFunc Function
hi def link cCustomClass Function
现在可以 match 到自订的 class 跟 function ,
但是配的颜色是淡蓝色,跟注解的颜色太接近,看起来不是很舒服。
所以想请问有没有比较接近上面例子的配色?谢谢。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 98.209.42.93
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Editor/M.1474256277.A.C71.html
※ 编辑: Chris7462 (98.209.42.93), 09/19/2016 11:38:54
2F:→ chababa: 请教楼上,选好了,是把内容贴到~/.vim/colors里面吗?? 09/25 22:31
3F:→ ViewMoon: 比如你下载了 foobar.vim 这颜色,copy to ~/.vim/colors 09/26 08:38
4F:→ ViewMoon: 然後在 ~/.vimrc 加一行 colorscheme foobar 09/26 08:38