1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
highlight clear
syntax reset
set background=dark
let g:colors_name = expand('<sfile>:t:r')
let s:g = {
\"black": "#000000",
\"red": "#ed5f74",
\"green": "#1ea672",
\"yellow": "#d97917",
\"blue": "#688ef1",
\"magenta": "#c96ed0",
\"cyan": "#3a97d4",
\"white": "#e3e8ee",
\"brightblack": "#697386",
\"brightred": "#fbb5b2",
\"brightgreen": "#85d996",
\"brightyellow": "#efc078",
\"brightblue": "#9fcdff",
\"brightmagenta": "#f0b4e4",
\"brightcyan": "#7fd3ed",
\"brightwhite": "#ffffff",
\"darkblack": "#000000",
\"darkred": "#742833",
\"darkgreen": "#00643c",
\"darkyellow": "#6e3500",
\"darkblue": "#2c4074",
\"darkmagenta": "#602864",
\"darkcyan": "#144c71",
\"darkwhite": "#3e4043",
\"darkerwhite": "#090e14",
\}
let s:c = {
\"black": "0",
\"red": "1",
\"green": "2",
\"yellow": "3",
\"blue": "4",
\"magenta": "5",
\"cyan": "6",
\"white": "7",
\"brightblack": "8",
\"brightred": "9",
\"brightgreen": "10",
\"brightyellow": "11",
\"brightblue": "12",
\"brightmagenta": "13",
\"brightcyan": "14",
\"brightwhite": "15",
\}
function s:hi(name, fg, bg)
if a:fg == ""
let ctermfg = ""
let guifg = ""
elseif a:fg =~ "^#"
let ctermfg = ""
let guifg = "guifg=" . a:fg
else
let ctermfg = "ctermfg=" . s:c[a:fg]
let guifg = "guifg=" . s:g[a:fg]
endif
if a:bg == ""
let ctermbg = ""
let guibg = ""
elseif a:bg =~ "^#"
let ctermbg = ""
let guibg = "guibg=" . a:bg
else
let ctermbg = "ctermbg=" . s:c[a:bg]
let guibg = "guibg=" . s:g[a:bg]
endif
silent exe "highlight clear " . a:name
if a:fg != "" || a:bg != ""
silent exe "highlight " . a:name . " " . ctermfg . " " . ctermbg . " " . guifg . " " . guibg
endif
endfunction
" text
call <sid>hi("Comment", "brightblack", "")
call <sid>hi("Constant", "red", "")
call <sid>hi("Delimiter", "blue", "")
call <sid>hi("Error", "black", "brightmagenta")
call <sid>hi("Function", "brightcyan", "")
call <sid>hi("Identifier", "", "")
call <sid>hi("Include", "blue", "")
call <sid>hi("Operator", "", "")
call <sid>hi("PreProc", "magenta", "")
call <sid>hi("Special", "magenta", "")
call <sid>hi("SpecialKey", "magenta", "")
call <sid>hi("Statement", "yellow", "")
call <sid>hi("Title", "magenta", "")
call <sid>hi("Todo", "black", "brightyellow")
call <sid>hi("Type", "green", "")
autocmd FileType markdown call <sid>hi("mkdListItem", "yellow", "")
autocmd FileType perl call <sid>hi("Identifier", "brightcyan", "")
autocmd FileType puppet call <sid>hi("puppetStringDelimiter", "red", "")
autocmd FileType ruby call <sid>hi("rubyInterpolationDelimiter", "magenta", "")
autocmd FileType ruby call <sid>hi("rubyPercentStringDelimiter", "yellow", "")
autocmd FileType ruby call <sid>hi("rubyStringDelimiter", "red", "")
autocmd FileType ruby call <sid>hi("rubyRegexDelimiter", "red", "")
autocmd FileType sh call <sid>hi("shQuote", "red", "")
autocmd FileType vim call <sid>hi("vimBracket", "magenta", "")
autocmd FileType vim call <sid>hi("vimMapMod", "magenta", "")
" ui
call <sid>hi("DiffAdd", "", s:g["darkgreen"])
call <sid>hi("DiffChange", "", s:g["darkblue"])
call <sid>hi("DiffDelete", "", s:g["darkred"])
call <sid>hi("DiffText", "", s:g["darkmagenta"])
call <sid>hi("Folded", "brightgreen", s:g["darkgreen"])
call <sid>hi("MatchParen", "brightcyan", s:g["darkcyan"])
call <sid>hi("MoreMsg", "green", s:g["darkgreen"])
call <sid>hi("NonText", "brightblue", s:g["darkerwhite"])
call <sid>hi("Search", "", s:g["darkmagenta"])
call <sid>hi("SpellBad", "", s:g["darkred"])
call <sid>hi("SpellCap", "", s:g["darkblue"])
call <sid>hi("SpellRare", "", s:g["darkgreen"])
call <sid>hi("SpellLocal", "", s:g["darkmagenta"])
call <sid>hi("Visual", "", s:g["darkwhite"])
|