-
Notifications
You must be signed in to change notification settings - Fork 1
/
alduin.vim
316 lines (252 loc) · 10.4 KB
/
alduin.vim
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
" " ___ "
" " - -_, ,, |\ "
" " ( ~/|| || \\ ' "
" " ( / || || / \\ \\ \\ \\ \\/\\ "
" " \/==|| || || || || || || || || "
" " /_ _|| || || || || || || || || "
" " ( - \\, \\ \\/ \\/\\ \\ \\ \\ "
" A Terminal and Gui colorscheme
" Author: Alessandro Yorba
" Maintainer: Alessandro Yorba
" Script URL: https://github.com/AlessandroYorba/Alduin
" License: MIT
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
" Alduin Shouts:
"----------------------------------------------------------------
" Default:
let g:colors_name="alduin"
" Aura Whisper:
" Change the MatchParen HL to Underlined
if !exists( "g:alduin_Shout_Aura_Whisper") " {{{
let g:alduin_Shout_Aura_Whisper = 0
endif " }}}
" Fire Breath:
" Change the Special HL foreground color to Sahloknir
if !exists( "g:alduin_Shout_Fire_Breath" ) " {{{
let g:alduin_Shout_Fire_Breath = 0
endif " }}}
" Become Ethereal:
" Changes the Default Alduin to a Darker Version
if !exists( "g:alduin_Shout_Become_Ethereal" ) " {{{
let g:alduin_Shout_Become_Ethereal = 0
endif " }}}
" Contract Vampirism:
" Automatically changes the Alduin to Ethereal after 5pm
if !exists( "g:alduin_Contract_Vampirism") " {{{
let g:alduin_Contract_Vampirism = 0
endif " }}}
" Colors:
"----------------------------------------------------------------
let s:alduin = {}
let s:alduin.Abyss = [ '000000', 16 ]
let s:alduin.Krosulhah = [ '5f0000', 52 ]
let s:alduin.Morthal = [ '5f5f87', 60 ]
let s:alduin.Dawnstar = [ '5f8787', 66 ]
let s:alduin.Durnehviir = [ '875f5f', 95 ]
let s:alduin.Winterhold = [ '87875f', 101 ]
let s:alduin.Relonikiv = [ '878787', 102 ]
let s:alduin.Falkreath = [ '8787af', 103 ]
let s:alduin.Mirmulnir = [ '87afaf', 109 ]
let s:alduin.Markarth = [ '87ffaf', 121 ]
let s:alduin.Sahloknir = [ 'af0000', 124 ]
let s:alduin.Odahviing = [ 'af5f00', 130 ]
let s:alduin.Windhelm = [ 'af5f5f', 131 ]
let s:alduin.Viinturuth = [ 'af875f', 137 ]
let s:alduin.Kruziikrel = [ 'af8787', 138 ]
let s:alduin.Riverwood = [ 'afd7d7', 152 ]
let s:alduin.Sahrotaar = [ 'dfaf87', 180 ]
let s:alduin.Whiterun = [ 'dfdfaf', 187 ]
let s:alduin.Paarthurnax = [ 'ffdf87', 222 ]
let s:alduin.Oblivion = [ '080808', 232 ]
let s:alduin.Solitude = [ '121212', 233 ]
let s:alduin.Skyrim = [ '1c1c1c', 234 ]
let s:alduin.Ivarstead = [ '262626', 235 ]
let s:alduin.Riften = [ '303030', 236 ]
let s:alduin.Rorikstead = [ '3a3a3a', 237 ]
let s:alduin.Nightingale = [ '585858', 240 ]
let s:alduin.Ivory = [ 'eeeeee', 255 ]
function! s:HL(group, fg, ...)
" Arguments: group, guifg, guibg, gui, guisp
let highlightString = 'hi ' . a:group . ' '
" Settings for highlight group ctermfg & guifg
if strlen(a:fg)
if a:fg == 'fg'
let highlightString .= 'guifg=fg ctermfg=fg '
else
let color = get(s:alduin, a:fg)
let highlightString .= 'guifg=#' . color[0] . ' ctermfg=' . color[1] . ' '
endif
endif
" Settings for highlight group termbg & guibg
if a:0 >= 1 && strlen(a:1)
if a:1 == 'bg'
let highlightString .= 'guibg=bg ctermbg=bg '
else
let color = get(s:alduin, a:1)
let highlightString .= 'guibg=#' . color[0] . ' ctermbg=' . color[1] . ' '
endif
endif
" Settings for highlight group cterm & gui
if a:0 >= 2 && strlen(a:2)
let highlightString .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
" Settings for highlight guisp
if a:0 >= 3 && strlen(a:3)
let color = get(s:alduin, a:3)
let highlightString .= 'guisp=#' . color[0] . ' '
endif
" echom highlightString
execute highlightString
endfunction
" Editor Settings:
"--------------------------------------------------------------------------------
call s:HL( 'Normal', 'Whiterun', 'Skyrim', '' )
call s:HL( 'CursorLineNR', 'Nightingale', '', 'none' )
call s:HL( 'CursorLine', '', 'Ivarstead', 'none' )
call s:HL( 'LineNr', 'Rorikstead', 'Solitude','none' )
"TODO
"call s:HL( 'Cursor', '', '', '' )
" Number Column:
"--------------------------------------------------------------------------------
call s:HL( 'FoldColumn', 'Mirmulnir', 'Skyrim', '' )
call s:HL( 'Folded', 'Rorikstead', 'Solitude', 'none' )
call s:HL( 'SignColumn', 'Winterhold', 'Solitude','none' )
"TODO
"call s:HL( 'CursorColumn', '', '', '' )
" WindowTab Delimiters:
"--------------------------------------------------------------------------------
call s:HL( 'VertSplit', 'Winterhold', 'Ivarstead', 'none' )
call s:HL( 'TabLine', 'Winterhold', 'Solitude', 'none' )
call s:HL( 'TabLineFill', 'Winterhold', 'Solitude', 'none' )
call s:HL( 'TabLineSel', 'Solitude', 'Winterhold', 'none' )
"TODO
"call s:HL( 'ColorColumn', '', '', '' )
" File Navigation:
"--------------------------------------------------------------------------------
call s:HL( 'Directory', 'Windhelm', '', 'none' )
call s:HL( 'Search', 'Whiterun', 'Krosulhah', 'none' )
call s:HL( 'IncSearch', 'Windhelm', '', 'reverse' )
" Prompt Status:
"--------------------------------------------------------------------------------
call s:HL( 'StatusLine', 'Solitude', 'Winterhold', 'none' )
call s:HL( 'StatusLineNC', 'Winterhold', 'Riften', 'none' )
call s:HL( 'WildMenu', 'Whiterun', 'Krosulhah', 'none' )
call s:HL( 'Title', 'Sahrotaar', '', 'none' )
call s:HL( 'MoreMsg', 'Sahrotaar', '', 'none' )
call s:HL( 'ModeMsg', 'Mirmulnir', '', 'none' )
call s:HL( 'Question', 'Durnehviir', '', '' )
" Visual Aid:
"--------------------------------------------------------------------------------
call s:HL( 'MatchParen', 'Skyrim', 'Viinturuth', 'none' )
call s:HL( 'Visual', 'Whiterun', 'Krosulhah', 'none' )
call s:HL( 'VisualNOS', '', '', 'underline' )
call s:HL( 'NonText', 'Winterhold', '', 'none' )
call s:HL( 'Todo', 'Odahviing', 'Solitude', 'italic' )
call s:HL( 'Underlined', 'Riverwood', '', 'none' )
call s:HL( 'Error', 'Windhelm', 'Solitude', 'reverse' )
call s:HL( 'ErrorMsg', 'Windhelm', 'Solitude', 'reverse' )
call s:HL( 'WarningMsg', 'Windhelm', '', 'none' )
call s:HL( 'SpecialKey', 'Mirmulnir', '', '' )
"TODO
"call s:HL( 'Ignore', '', '', '' )
" Variable Types:
"--------------------------------------------------------------------------------
call s:HL( 'Constant', 'Kruziikrel', '', 'none' )
call s:HL( 'String', 'Paarthurnax', 'Ivarstead', 'none' )
call s:HL( 'Character', 'Odahviing', '', 'none' )
call s:HL( 'Number', 'Odahviing', '', 'none' )
call s:HL( 'Boolean', 'Odahviing', '', 'none' )
call s:HL( 'Float', 'Odahviing', '', 'none' )
call s:HL( 'Identifier', 'Mirmulnir', '', 'none' )
call s:HL( 'Function', 'Durnehviir', '', 'none' )
"TODO
"call s:HL( 'StringDelimiter', '', '', '' )
" Language Constructs:
"--------------------------------------------------------------------------------
call s:HL( 'Statement', 'Relonikiv', '', 'none' )
call s:HL( 'Conditional', 'Relonikiv', '', 'none' )
call s:HL( 'Repeat', 'Relonikiv', '', 'none' )
call s:HL( 'Label', 'Relonikiv', '', 'none' )
call s:HL( 'Operator', 'Relonikiv', '', 'none' )
call s:HL( 'Keyword', 'Relonikiv', '', 'none' )
call s:HL( 'Exception', 'Relonikiv', '', 'none' )
call s:HL( 'Comment', 'Winterhold', '', 'none' )
call s:HL( 'SpecialComment', 'Winterhold', 'Solitude', 'reverse' )
call s:HL( 'Special', 'Windhelm', '', 'none' )
"TODO
"call s:HL( 'SpecialChar', '', '', '' )
"call s:HL( 'Tag', '', '', '' )
"call s:HL( 'Delimiter', '', '', '' )
"call s:HL( 'SpecialComment', '', '', '' )
"call s:HL( 'Debug', '', '', '' )
" C Like:
"--------------------------------------------------------------------
call s:HL( 'PreProc', 'Sahrotaar', '', 'none' )
call s:HL( 'Include', 'Sahrotaar', '', 'none' )
call s:HL( 'Define', 'Sahrotaar', '', 'none' )
call s:HL( 'Macro', 'Sahrotaar', '', 'none' )
call s:HL( 'PreCondit', 'Sahrotaar', '', 'none' )
call s:HL( 'Type', 'Viinturuth', '', 'none' )
call s:HL( 'StorageClass', 'Viinturuth', '', 'none' )
call s:HL( 'Structure', 'Viinturuth', '', 'none' )
call s:HL( 'Typedef', 'Viinturuth', '', 'none' )
" HTML:
"--------------------------------------------------------------------
call s:HL( 'htmlArg', 'Durnehviir', '', 'none' )
call s:HL( 'htmlItalic', 'Sahrotaar', '', 'none' )
" Diff:
"--------------------------------------------------------------------
call s:HL( 'DiffAdd', 'Ivarstead', 'Dawnstar', 'none' )
call s:HL( 'DiffChange', 'Ivarstead', 'Morthal', 'none' )
call s:HL( 'DiffDelete', 'Ivarstead', 'Windhelm', 'none' )
call s:HL( 'DiffText', 'Ivarstead', 'Falkreath', 'none' )
" Completion Menu:
"--------------------------------------------------------------------
call s:HL( 'Pmenu', 'Winterhold', 'Solitude', 'none' )
call s:HL( 'PmenuSel', 'Whiterun', 'Krosulhah', 'none' )
call s:HL( 'PmenuSbar', '', 'Solitude', 'none' )
call s:HL( 'PmenuThumb', '', 'Whiterun', '' )
" Spelling:
"--------------------------------------------------------------------
call s:HL( 'SpellBad', 'Windhelm', '', 'undercurl' )
"TODO
"call s:HL( 'SpellCap', '', '', '' )
"call s:HL( 'SpellLocal', '', '', '' )
"call s:HL( 'SpellRare', '', '', '' )
" Aura Whisper:
"--------------------------------------------------------------------
if g:alduin_Shout_Aura_Whisper
call s:HL( 'MatchParen', 'Ivory', 'Skyrim', 'underline' )
end
" Fire Breath:
if g:alduin_Shout_Fire_Breath
call s:HL( 'Special', 'Sahloknir', '', 'none' )
call s:HL( 'Title', 'Windhelm', '', 'none' )
end
" Become Ethereal:
"--------------------------------------------------------------------
if g:alduin_Shout_Become_Ethereal
call s:HL( 'Normal', 'Whiterun', 'Oblivion', 'none' )
call s:HL( 'LineNr', 'Riften', 'Abyss','none' )
call s:HL( 'String', 'Paarthurnax', 'Solitude', 'none' )
call s:HL( 'CursorLine', '', 'Solitude', 'none' )
call s:HL( 'TabLineFill', 'Winterhold', 'Abyss', 'none' )
call s:HL( 'TabLine', 'Winterhold', 'Abyss', 'none' )
call s:HL( 'VertSplit', 'Winterhold', 'Solitude', 'none' )
call s:HL( 'FoldColumn', 'Mirmulnir', 'Oblivion', '' )
call s:HL( 'SignColumn', 'Winterhold', 'Abyss','none' )
end
" Contract Vampirism:
"--------------------------------------------------------------------
if g:alduin_Contract_Vampirism
let alduin_Hour = strftime("%H")
if 7 <= alduin_Hour && alduin_Hour < 17
let g:alduin_Shout_Become_Ethereal = 0
else
let g:alduin_Shout_Become_Ethereal = 1
endif
end