作者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://www.ptt.cc/bbs/Editor/M.1474256277.A.C71.html
※ 編輯: Chris7462 (98.209.42.93), 09/19/2016 11:38:54
→ chababa: 請教樓上,選好了,是把內容貼到~/.vim/colors裡面嗎?? 09/25 22:31
→ ViewMoon: 比如你下載了 foobar.vim 這顏色,copy to ~/.vim/colors 09/26 08:38
→ ViewMoon: 然後在 ~/.vimrc 加一行 colorscheme foobar 09/26 08:38