This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutrun.erb
More file actions
558 lines (512 loc) · 22.8 KB
/
outrun.erb
File metadata and controls
558 lines (512 loc) · 22.8 KB
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<%
# RNB, A VIM COLORSCHEME TEMPLATE
# Author: Romain Lafourcade (https://github.com/romainl)
# Canonical URL: https://github.com/romainl/vim-rnb
# This template is designed to help vimmers create their own colorschemes
# without much effort.
#
# You will need Ruby to generate your colorscheme but Ruby knowledge is
# not needed at all.
#
# The process is divided in five steps:
# 1. rename the template,
# 2. edit your colorscheme's information,
# 3. define your colors,
# 4. define your highlight groups and links,
# 5. and generate your colorscheme.
# Step 1: renaming
#
# If this file is distributed with a colorscheme it's probably already named correctly
# and you can skip this step.
#
# If you forked/cloned/copied this repository to create your own colorscheme, you will have to
# rename this template to match the name of your colorscheme.
#
# NOTE: Vim doesn't really care about whitespace in the name of the colorscheme but it does for
# filenames so make sure your filename doesn't have any whitespace character.
#
# colorscheme name | template filename | colorscheme filename
# ------------------|-------------------|----------------------
# foobar | foobar.erb | foobar.vim
# foo-bar | foo-bar.erb | foo-bar.vim
# foo_bar | foo_bar.erb | foo_bar.vim
# foo bar | foo-bar.erb or | foo-bar.vim or
# | foo_bar.erb | foo_bar.vim
# Step 2: information
#
# Make sure the name of your colorscheme is unique and attractive.
# The description should fit in a single line with no linefeed.
information = {
author: "Raphael DB",
email: "https://github.com/u03c1",
name: "Outrun",
description: "A dark theme, with some retrowave accent.",
webpage: "https://github.com/u03c1/outrun-vim"
}
# Step 3: colors
#
# black = [ give each color a distinctive name
# "#000000", hexadecimal color used in GVim/MacVim or "NONE"
# 0, integer between 0 and 255 used by terminals supporting 256 colors
# or "NONE"
# "black" color name used by less capable color terminals, can be "darkred",
# "red", "darkgreen", "green", "darkyellow", "yellow", "darkblue",
# "blue", "darkmagenta", "magenta", "black", "darkgrey", "grey",
# "white", or "NONE"
# ]
#
# If your colors are defined correctly, the resulting colorscheme is guaranteed
# to work in GVim (Windows/Linux), MacVim (MacOS), and any properly set up terminal emulator.
black = ["#202630", 0, "black"]
darkred = ["#d98282", 1, "darkred"] #UI
darkgreen = ["#9ed494", 2, "darkgreen"] # :??
darkyellow = ["#D9C8B3", 3, "darkyellow"] #comment
darkblue = ["#8ccff5", 4, "darkblue"] # diag info ?
darkmagenta = ["#d982b6", 5, "darkmagenta"] # builtin, conditionnal, error
darkcyan = ["#81ADAD", 6, "darkcyan"] # uri ? 1 use ?
gray = ["#c0c0c0", 7, "gray"]
darkgray = ["#2D3642", 8, "darkgray"]
red = ["#d98282", 9, "red"] # git error
green = ["#56d3b4", 10, "green"] # git
yellow = ["#d8e6a1", 11, "yellow"] # bool/number
blue = ["#b0daf6", 12, "blue"] # string
magenta = ["#C3C1FE", 13, "magenta"]
cyan = ["#9ae1e3", 14, "cyan"]
white = ["#DADAEA", 15, "white"]
altblack = ["#11263B", 0, "black"]
ui_discret = ["#414854", 239, "gray"]
ui_orange = ["#ffd262", 11, "yellow"]
gray235 = ["#262626", 235, "darkgray"]
gray239 = ["#4E4E4E", 239, "darkgray"]
gray246 = ["#949494", 246, "gray"]
# UI extended Background
x_bg_red = ["#2d202a", 0, "black"]
x_bg_blue = ["#192b38", 0, "black"]
x_bg_green = ["#244032", 6, "black"]
x_bg_yellow = ["#332b09", 6, "black"]
# gitMarker
markerIncoming = ["#344f69" , 12, "blue"]
markerCurrent = ["#2e5049", 10, "green"]
markerAncestor = ["#754a81", 5, "darkmagenta"]
# Step 4: highlights
#
# You can define highlight groups like this:
#
# [ "Normal", name of the highlight group
# white, the color used for background color, or use "NONE", "fg" or "bg"
# darkgray, the color used for foreground color, or use "NONE", "fg" or "bg"
# "NONE" style, can be "bold", "underline", "reverse", "italic",
# "standout", "NONE", "undercurl", or a comma-separated list of
# valid attributes like "underline,bold"
# ]
#
# The sample above tells Vim to render normal text in dark gray against a white
# background, without any other styling.
#
# Or you can link an highlight group to another. Here, "Title" will inherit its style from
# "Normal":
#
# [ "Title", "Normal" ]
#
# In GUI Vim, there is an additional color for the undercurl used to
# highlight spelling mistakes:
#
# [ "SpellBad", name of the highlight group
# "NONE", the color used for background color, or use "NONE", "fg" or "bg"
# darkred, the color used for foreground color, or use "NONE", "fg" or "bg"
# "undercurl", style
# darkred color used for the undercurl
# ]
#
# The sample above tells Vim to render badly spelled words in darkred against the current
# background, with a darkred undercurl.
#
# You can add any custom highlight group to the standard list below but you shouldn't
# remove any if you want a working colorscheme. Most of them are described under
# :help highlight-default, the others are taken from :help group-name. Both help sections
# are good reads, by the way.
highlights = [
[ "Normal", black, white, "NONE" ],
[ "NonText", "NONE", gray246, "NONE" ],
[ "Conditional", "NONE", darkmagenta, "NONE" ],
[ "EndOfBuffer","NONE", gray246, "NONE" ],
[ "Comment", "NONE", darkyellow, "italic" ],
[ "Constant", "NONE", magenta, "NONE" ],
[ "Error", black, red, "NONE" ],
[ "Identifier", "NONE", white, "NONE" ],
[ "Ignore", "NONE", white, "NONE" ],
[ "PreProc", "NONE", white, "NONE" ],
[ "Special", "NONE", darkyellow, "NONE" ],
[ "Statement", "NONE", "NONE", "NONE" ],
[ "String", "NONE", blue, "NONE" ],
[ "Boolean", "NONE", yellow, "NONE" ],
[ "Number", "NONE", yellow, "NONE" ],
[ "Todo", black, white, "NONE" ],
[ "Type", "NONE", white, "NONE" ],
[ "Underlined", black, white, "REVERSE" ],
[ "StatusLine", gray235, darkmagenta, "NONE" ],
[ "StatusLineNC", gray235, gray, "NONE" ],
[ "StatusLineTerm", "StatusLine" ],
[ "StatusLineTermNC", "StatusLineNC" ],
[ "VertSplit", black, darkgray, "NONE" ],
[ "TabLineSel", black, gray, "NONE" ],
[ "TabLineUnSel", ui_discret, gray, "NONE" ],
[ "TabLineBufSel", black, darkmagenta, "NONE" ],
[ "TabLineBuf", black, gray, "NONE" ],
[ "TabLineFill", darkgray, gray, "NONE" ],
[ "TabLine", darkgray, gray, "NONE" ],
[ "BufferCurrent", black, darkmagenta, "BOLD" ],
[ "Title", black, white, "NONE" ],
[ "CursorLine", darkgray, "NONE", "NONE" ],
[ "LineNr", "NONE", ui_discret, "NONE" ],
[ "CursorLineNr", "NONE", gray246, "NONE" ],
[ "helpLeadBlank", black, white, "NONE" ],
[ "helpNormal", black, white, "NONE" ],
[ "Visual", ui_discret, "NONE", "NONE" ],
[ "VisualNOS", red, white, "NONE" ],
[ "Pmenu", gray235, white, "NONE" ],
[ "PmenuSbar", black, white, "NONE" ],
[ "PmenuSel", white, black, "NONE" ],
[ "PmenuThumb", green, black, "NONE" ],
[ "FoldColumn", "NONE", white, "NONE" ],
[ "Folded", black, white, "NONE" ],
[ "WildMenu", black, white, "NONE" ],
[ "SpecialKey", black, white, "NONE" ],
[ "DiffAdd", x_bg_green, green, "NONE" ],
[ "DiffChange", x_bg_yellow, yellow, "NONE" ],
[ "DiffDelete", x_bg_red, red, "NONE" ],
[ "DiffText", x_bg_yellow, yellow, "reverse" ],
[ "IncSearch", red, white, "NONE" ],
[ "Search", yellow, black, "BOLD" ],
[ "Directory", black, darkblue, "NONE" ],
[ "MatchParen", yellow, black, "NONE" ],
[ "SpellBad", black, white, "NONE", darkred ],
[ "SpellCap", black, white, "NONE", blue ],
[ "SpellLocal", black, white, "NONE", magenta ],
[ "SpellRare", black, white, "NONE", cyan ],
[ "ColorColumn", black, red, "NONE" ],
[ "SignColumn", "NONE", magenta, "NONE" ],
[ "ErrorMsg", black, white, "NONE" ],
[ "ModeMsg", black, white, "NONE" ],
[ "MoreMsg", black, white, "NONE" ],
[ "Question", black, white, "NONE" ],
[ "WarningMsg", "Error" ],
[ "Cursor", gray235, white, "NONE" ],
[ "CursorIM", "Cursor" ],
[ "CursorColumn", red, white, "NONE" ],
[ "QuickFixLine", black, white, "NONE" ],
[ "Terminal", "Normal" ],
[ "Conceal", black, white, "NONE" ],
[ "ToolbarLine", black, white, "NONE" ],
[ "ToolbarButton", black, white, "NONE" ],
[ "debugPC", black, white, "NONE" ],
[ "debugBreakpoint", red, white, "NONE" ],
[ "keyword", "Boolean" ],
# Misc
[ "Foreground", "NONE", white, "NONE" ],
[ "qfLineNr", "NONE", darkyellow, "NONE" ],
[ "MatchWord", "NONE", yellow, "NONE" ],
[ "MatchWordCur", "Matchord"],
[ "LocalHighlight", ui_discret, white, "NONE" ],
# Code alias
[ "Builtin", "NONE", darkmagenta, "NONE" ],
[ "Doc", "Comment"],
[ "Function", "NONE", white, "NONE" ],
[ "Structure", "NONE", cyan, "NONE" ],
[ "Tags", "NONE", white, "NONE" ],
[ "showReturn", "NONE", darkmagenta, "NONE" ],
[ "BranchStatus", gray235, gray ,"NONE"],
[ "SepStatus", gray235, darkgray, "NONE"],
[ "SepStatusInverted", darkgray,gray235, "NONE"],
[ "FileStatus", gray235, darkmagenta ,"NONE"],
[ "InactiveStatus", gray235, gray246, "NONE"],
[ "NormalStatus", darkgray, gray ,"NONE"],
[ "ROStatus", yellow, gray235, "NONE"],
[ "RootStatus", "BranchStatus"],
[ "StatusLinterError", red, gray235, "BOLD"],
[ "SepStatusStartLinter", red, gray235, "NONE"],
[ "SepStatusRed", darkgray, red, "NONE"],
["MarkerIncoming", markerIncoming, "NONE", "NONE"],
["MarkerCurrent", markerCurrent, "NONE", "NONE"],
["MarkerAncestor", markerAncestor, "NONE", "NONE"],
# Diag signColumn
[ "DiagnosticSignError", "none", red, "NONE"],
[ "DiagnosticSignWarn", "none", darkyellow, "NONE"],
[ "DiagnosticSignHint", x_bg_blue, darkblue, "NONE"],
[ "DiagnosticSignInfo", x_bg_blue, darkblue, "NONE"],
# Diag details
[ "DiagnosticError", "NONE", red, "BOLD" ],
[ "DiagnosticWarn", "NONE", darkyellow, "BOLD" ],
[ "DiagnosticInfo", "NONE", darkblue, "BOLD" ],
[ "DiagnosticHint", "NONE", darkblue, "BOLD" ],
# nvim-cmp
[ "CmpItemAbbrMatch", "NONE",ui_orange, "BOLD"],
[ "CmpItemAbbrMatchFuzzy", "NONE", darkyellow, "NONE"],
[ "CmpItemKindText", "NONE", blue, "NONE"],
[ "CmpItemKindVariable", "NONE",green, "NONE"],
[ "CmpItemKindMethod", "NONE", darkmagenta, "NONE"],
[ "CmpItemKindFunction", "NONE", darkred, "NONE"],
# FloatingWin
[ "FloatBorder", "NONE", darkyellow, "NONE"],
[ "NormalFloat", gray235, "NONE", "NONE"],
# IndentBlankLine
[ "IndentBlanklineChar", "NONE", darkgray, "NONE"],
[ "IndentBlanklineContextChar", "NONE", darkblue, "NONE"],
# MatchAdd
[ "DocCommentINFO", black, red, "NONE"],
[ "DocCommentTODO", black, red, "NONE"],
[ "debugFn", "NONE", red, "NONE"],
# Signify
[ "diffAdded", "DiffAdd"],
[ "diffRemoved", "DiffDelete"],
# GitSigns
[ "GitSignsAddLn", "NONE", green, "NONE" ],
[ "GitSignsChangeLn","NONE", darkyellow, "NONE" ],
[ "GitSignsDeleteLn","NONE", red, "NONE" ],
# bar
[ "GitSignsAdd", "NONE", green, "NONE" ],
[ "GitSignsChange","NONE", yellow, "NONE" ],
[ "GitSignsDelete","NONE", red, "NONE" ],
# NvimTree
[ "NvimTreeGitDirty", "NONE", magenta, "bold"],
[ "NvimTreeGitNew", "NONE", green, "bold"],
[ "NvimTreeGitRenamed", "NONE", yellow, "italic"],
[ "NvimTreeGitDeleted", "NONE", "red", "bold"],
[ "NvimTreeRootFolder", "Comment"],
# IlluminateWord
[ "illuminatedWord", gray239, "NONE", "NONE"],
[ "LspReferenceText", "illuminatedWord" ],
[ "LspReferenceWrite", "illuminatedWord" ],
[ "LspReferenceRead", "illuminatedWord" ],
[ "cStatement", "showReturn"],
# HTML
[ "htmlEndTag", "Tags"],
[ "htmlLink", "NONE", darkmagenta, "NONE" ],
[ "htmlSpecialTagName", "NONE", magenta, "NONE"],
[ "htmlString", "String"],
[ "htmlTag", "Tags"],
[ "htmlTagName", "Tags"],
# TWIG
[ "twigStatement", "Conditional"],
[ "twigString", "String"],
# RUBY
[ "rubyComment", "Comment"],
# PYTHON/DJANGO
[ "djangoStatement", "Structure"],
[ "pythonClass", "Foreground" ],
[ "pythonConditional", "Conditional"],
[ "pythonException", "showReturn"],
[ "pythonStatement", "Structure"],
[ "pythonDocString ", "Comment"],
# JS
[ "javaScript", "Foreground"],
[ "javaScriptGlobal", "Constant"],
[ "javaScriptMember", "Constant"],
[ "javascriptConditional", "Conditional"],
[ "javascriptNumber", "Number"],
[ "javascriptStatement", "showReturn"],
[ "jsFunction", "Function"],
# TREESITTER
[ "@boolean", "Boolean"],
[ "@constant.builtin", "Boolean"],
[ "@constant.macro", "Foreground"],
[ "@constant", "Constant"],
[ "@constructor", "Foreground"],
[ "@exception", "Conditional"],
[ "@function.builtin", "Foreground"],
[ "@function", "Function"],
[ "@include", "Foreground"],
[ "@keyword", "Foreground"],
[ "@keyword.function", "Foreground"],
[ "@eyword.operator", "Conditional"],
[ "@keyword.return", "showReturn"],
[ "@method", "Foreground"],
[ "@operator", "Foreground"],
[ "@parameter", "Foreground"],
[ "@property", "Foreground"],
[ "@repeat", "Conditional"],
[ "@string", "string"],
[ "@tag", "Foreground"],
[ "@tag.attribute", "Constant"],
[ "@tag.delimiter", "Foreground"],
[ "@type", "Constant"],
[ "@type.qualifier", "showReturn"],
[ "@text.diff.add", "DiffAdd"],
[ "@text.diff.delete", "DiffDelete"],
[ "@text.title", "NONE", darkmagenta, "bold" ],
[ "@text.uri", "NONE", darkcyan, "undercurl" ],
[ "@type.builtin", "Constant"],
[ "@variable", "Foreground"],
[ "@URI", "NONE", "NONE", "NONE"],
[ "@variable.builtin", "Foreground"],
[ "@comment", "Comment"],
[ "TreesitterContext", "NONE", "NONE", "reverse"],
[ "commentTSConstant", "Comment"],
[ "@punctuation.bracket", "NONE", gray246, "NONE" ],
[ "@punctuation.delimiter", "NONE", gray246, "NONE" ],
]
# Define the color palette used by :terminal when in GUI Vim
# or in TUI Vim when 'termguicolors' is enabled. If this list
# is empty or if it doesn't contain exactly 16 items, the corresponding
# Vim variable won't be set.
#
# The expected values are colors defined in step 3.
#
# Terminal emulators use a basic palette of 16 colors that can be
# addressed by CLI and TUI tools via their name or their index, from
# 0 to 15. The list is not really standardized but it is generally
# assumed to look like this:
#
# Index | Name
# -------|-------------
# 0 | black
# 1 | darkred
# 2 | darkgreen
# 3 | darkyellow
# 4 | darkblue
# 5 | darkmagenta
# 6 | darkcyan
# 7 | gray
# 8 | darkgray
# 9 | red
# 10 | green
# 11 | yellow
# 12 | blue
# 13 | magenta
# 14 | cyan
# 15 | white
#
# While you are certainly free to make colors 0 to 7 shades of blue,
# this will inevitably cause usability issues so… be careful.
terminal_ansi_colors = [
black,
darkred,
darkgreen,
darkyellow,
darkblue,
darkmagenta,
darkcyan,
gray,
darkgray,
red,
green,
yellow,
blue,
magenta,
cyan,
white
]
# Step 5: generation
#
# From a separate shell:
#
# $ erb -T - bar.erb > bar.vim
#
# From Vim:
#
# :!erb -T - % > %<.vim
#
# If this template comes with a Makefile, you can do it from a separate shell,
# with the make program:
#
# $ make
# These online resources can help you design your colorscheme:
#
# * http://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg
# the xterm palette
# * http://whatcolor.herokuapp.com/
# play with hexadecimal colors right in the address bar (currently down)
# * http://color.hailpixel.com/
# similar concept, fuzzier implementation
# * http://colourco.de/
# similar concept, fancier implementation
# * http://www.colr.org/
# extract a palette from an image
# * http://colores.manugarri.com/
# search for 'word', get images and color palettes
# * http://www.colourlovers.com/palettes
# user-created palettes
# * http://www.perbang.dk/color+scheme/
# a no-nonsense colorscheme generator
# * https://color.adobe.com/
# Adobe's fancy colorscheme generator
# * http://paletton.com/
# The classic 'Color Scheme Designer', rebranded
# * http://vrl.cs.brown.edu/color
# A very smart palette generator
# * https://cmcenroe.me/2018/04/03/colour-scheme.html
# "I Made My Own Colour Scheme and You Can Too!"
# A few general advices:
#
# * The Windows console is limited to the 16 so-called "ANSI" colors but it used to
# have a few of them interverted which makes numbers impractical. Use color names
# instead of numbers: :help cterm-colors
# * The Windows console (yeah…) doesn't do italics, underlines or bolded text;
# it is limited to normal and reverse. Keep that in mind if you want
# your colorscheme to be usable in as many environments as possible by as many
# people as possible.
# * Actually, terminal emulators rarely do italics.
# * All of the terminal emulators in use these days allow their users to
# change the 16 so-called "ANSI" colors. It is also possible on some platforms
# to change some or all of the 256 colors in the xterm palette. Don't take
# anything for granted.
# * When used against a light background, strong colors work better than muted
# ones. Light or dark doesn't really matters. Also, it is harder to discriminate
# between two similar colors on a light background.
# * Both strong and muted colors work well against a dark background. It is also
# easier to work with similar colors, but dark colors don't work at all.
# * Use as many text samples as possible. String-heavy languages may look completely
# different than keyword-heavy ones. This can have an impact on the usability
# of your colorscheme.
# * Most terminal emulators and terminal multiplexers currently in use on unix-like
# systems support 256 colors but they almost always default to a '$TERM' that tells
# Vim otherwise. Your users will need to make sure their terminal emulator/multiplexer
# is correctly set up if they want to enjoy the best possible experience.
# Many thanks to Barry Arthur (https://github.com/dahu) for the original idea.
# You don't need to edit anything beyond this line.
-%>
" <%= information[:name] %>.vim -- Vim color scheme.
" Author: <%= information[:author] %> (<%= information[:email] %>)
" Webpage: <%= information[:webpage] %>
" Description: <%= information[:description] %>
" Last Change: <%= Time.new.strftime "%Y-%m-%d" %>
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "<%= information[:name].downcase %>"
if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running")
<% for highlight in highlights -%>
<% if highlight.length == 4 -%>
hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][1] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][1] %> cterm=<%= highlight[3] %> guibg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][0] %> guifg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][0] %> gui=<%= highlight[3] %>
<% elsif highlight.length > 4 -%>
hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][1] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][1] %> cterm=<%= highlight[3] %> guibg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][0] %> guifg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][0] %> gui=<%= highlight[3] %> guisp=<%= highlight[4].kind_of?(String) ? highlight[4] : highlight[4][0] %>
<% end -%>
<% end -%>
elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16
set t_Co=16
<%= '' %>
<% for highlight in highlights -%>
<% if highlight.length > 2 -%>
hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][2] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][2] %> cterm=<%= highlight[3] %>
<% end -%>
<% end -%>
endif
<% links = highlights.select do |highlight| -%>
<% highlight.length == 2 -%>
<% end -%>
<% if links.length > 0 -%>
<%= '' %>
<% for link in links -%>
hi link <%= link[0] %> <%= link[1] %>
<% end -%>
<% end -%>
<% if terminal_ansi_colors.length == 16 -%>
<%= '' %>
let g:terminal_ansi_colors = [ <% for color in terminal_ansi_colors -%>'<%= color[0] %>', <% end -%>]
<% end -%>
" Fix neovim terminal.
<% for color,index in terminal_ansi_colors.each_with_index -%>
let g:terminal_color_<%= index %> = '<%= color[0] %>'
<% end -%>
" Generated with RNB (https://github.com/romainl/vim-rnb)