xonecas.io
314
Vc

vim-colors-256 / files

vim-colors-256 / colors / gotham256.vim

6.8 KB
1"                      _____ _____ _____ _   _   ___  ___  ___
2"                     |  __ \  _  |_   _| | | | / _ \ |  \/  |
3"                     | |  \/ | | | | | | |_| |/ /_\ \| .  . |
4"                     | | __| | | | | | |  _  ||  _  || |\/| | -256
5"                     | |_\ \ \_/ / | | | | | || | | || |  | |
6"                      \____/\___/  \_/ \_| |_/\_| |_/\_|  |_/
7"
8" URL: https://github.com/whatyouhide/vim-gotham
9" Aurhor: Andrea Leopardi <an.leopardi@gmail.com>
10" Version: ϡ
11" License: MIT
12
13
14" Bootstrap ===================================================================
15
16hi clear
17if exists('syntax_on') | syntax reset | endif
18set background=dark
19let g:colors_name = 'gotham256'
20
21
22" Helper functions =============================================================
23
24" Execute the 'highlight' command with a List of arguments.
25function! s:Highlight(args)
26  exec 'highlight ' . join(a:args, ' ')
27endfunction
28
29function! s:AddGroundValues(accumulator, ground, color)
30  let new_list = a:accumulator
31  for [where, value] in items(a:color)
32    call add(new_list, where . a:ground . '=' . value)
33  endfor
34
35  return new_list
36endfunction
37
38function! s:Col(group, fg_name, ...)
39  " ... = optional bg_name
40
41  let pieces = [a:group]
42
43  if a:fg_name !=# ''
44    let pieces = s:AddGroundValues(pieces, 'fg', s:colors[a:fg_name])
45  endif
46
47  if a:0 > 0 && a:1 !=# ''
48    let pieces = s:AddGroundValues(pieces, 'bg', s:colors[a:1])
49  endif
50
51  call s:Clear(a:group)
52  call s:Highlight(pieces)
53endfunction
54
55function! s:Attr(group, attr)
56  let l:attrs = [a:group, 'term=' . a:attr, 'cterm=' . a:attr, 'gui=' . a:attr]
57  call s:Highlight(l:attrs)
58endfunction
59
60function! s:Clear(group)
61  exec 'highlight clear ' . a:group
62endfunction
63
64
65" Colors ======================================================================
66
67" Let's store all the colors in a dictionary.
68let s:colors = {}
69
70" Base colors.
71let s:colors.base0 = { 'gui': '#0c1014', 'cterm': 232 }
72let s:colors.base1 = { 'gui': '#11151c', 'cterm': 233 }
73let s:colors.base2 = { 'gui': '#091f2e', 'cterm': 17  }
74let s:colors.base3 = { 'gui': '#0a3749', 'cterm': 18  }
75let s:colors.base4 = { 'gui': '#245361', 'cterm': 24  }
76let s:colors.base5 = { 'gui': '#599cab', 'cterm': 81  }
77let s:colors.base6 = { 'gui': '#99d1ce', 'cterm': 122 }
78let s:colors.base7 = { 'gui': '#d3ebe9', 'cterm': 194 }
79
80" Other colors.
81let s:colors.red     = { 'gui': '#c23127', 'cterm': 124 }
82let s:colors.orange  = { 'gui': '#d26937', 'cterm': 166 }
83let s:colors.yellow  = { 'gui': '#edb443', 'cterm': 214 }
84let s:colors.magenta = { 'gui': '#888ca6', 'cterm': 67  }
85let s:colors.violet  = { 'gui': '#4e5166', 'cterm': 60  }
86let s:colors.blue    = { 'gui': '#195466', 'cterm': 24  }
87let s:colors.cyan    = { 'gui': '#33859E', 'cterm': 44  }
88let s:colors.green   = { 'gui': '#2aa889', 'cterm': 78  }
89
90
91" Native highlighting ==========================================================
92
93let s:background = 'base0'
94let s:linenr_background = 'base1'
95
96" Everything starts here.
97call s:Col('Normal', 'base6', s:background)
98
99" Line, cursor and so on.
100call s:Col('Cursor', 'base1', 'base6')
101call s:Col('CursorLine', '', 'base1')
102call s:Col('CursorColumn', '', 'base1')
103
104" Sign column, line numbers.
105call s:Col('LineNr', 'base4', s:linenr_background)
106call s:Col('CursorLineNr', 'base5', s:linenr_background)
107call s:Col('SignColumn', '', s:linenr_background)
108call s:Col('ColorColumn', '', s:linenr_background)
109
110" Visual selection.
111call s:Col('Visual', '', 'base3')
112
113" Easy-to-guess code elements.
114call s:Col('Comment', 'base4')
115call s:Col('String', 'green')
116call s:Col('Number', 'orange')
117call s:Col('Statement', 'base5')
118call s:Col('Special', 'orange')
119call s:Col('Identifier', 'base5')
120
121" Constants, Ruby symbols.
122call s:Col('Constant', 'magenta')
123
124" Some HTML tags (<title>, some <h*>s)
125call s:Col('Title', 'orange')
126
127" <a> tags.
128call s:Col('Underlined', 'yellow')
129call s:Attr('Underlined', 'underline')
130
131" Types, HTML attributes, Ruby constants (and class names).
132call s:Col('Type', 'orange')
133
134" Stuff like 'require' in Ruby.
135call s:Col('PreProc', 'red')
136
137" Tildes on the bottom of the page.
138call s:Col('NonText', 'base4')
139
140" TODO and similar tags.
141call s:Col('Todo', 'magenta', s:background)
142
143" The column separating vertical splits.
144call s:Col('VertSplit', 'base2', s:linenr_background)
145call s:Col('StatusLineNC', 'base4', 'base2')
146
147" Matching parenthesis.
148call s:Col('MatchParen', 'base1', 'orange')
149
150" Special keys, e.g. some of the chars in 'listchars'. See ':h listchars'.
151call s:Col('SpecialKey', 'base4')
152
153" Folds.
154call s:Col('Folded', 'base6', 'blue')
155call s:Col('FoldColumn', 'base5', 'base3')
156
157" Searching.
158call s:Col('Search', 'base2', 'yellow')
159call s:Attr('IncSearch', 'reverse')
160
161" Popup menu.
162call s:Col('Pmenu', 'base6', 'base2')
163call s:Col('PmenuSel', 'base7', 'base4')
164call s:Col('PmenuSbar', '', 'base2')
165call s:Col('PmenuThumb', '', 'base4')
166
167" Command line stuff.
168call s:Col('ErrorMsg', 'red', 'base1')
169call s:Col('ModeMsg', 'blue')
170
171" Wild menu.
172" StatusLine determines the color of the non-active entries in the wild menu.
173call s:Col('StatusLine', 'base5', 'base2')
174call s:Col('WildMenu', 'base7', 'cyan')
175
176" The 'Hit ENTER to continue prompt'.
177call s:Col('Question', 'green')
178
179" Tab line.
180call s:Col('TabLineSel', 'base7', 'base4')  " the selected tab
181call s:Col('TabLine', 'base6', 'base2')     " the non-selected tabs
182call s:Col('TabLineFill', 'base0', 'base0') " the rest of the tab line
183
184" Spelling.
185call s:Col('SpellBad', 'base7', 'red')
186call s:Col('SpellCap', 'base7', 'blue')
187call s:Col('SpellLocal', 'yellow')
188call s:Col('SpellRare', 'base7', 'violet')
189
190" Diffing.
191call s:Col('DiffAdd', 'base7', 'green')
192call s:Col('DiffChange', 'base7', 'blue')
193call s:Col('DiffDelete', 'base7', 'red')
194call s:Col('DiffText', 'base7', 'cyan')
195
196" Directories (e.g. netrw).
197call s:Col('Directory', 'cyan')
198
199
200" Programming languages and filetypes ==========================================
201
202" Ruby.
203call s:Col('rubyDefine', 'blue')
204call s:Col('rubyStringDelimiter', 'green')
205
206" HTML (and often Markdown).
207call s:Col('htmlArg', 'blue')
208call s:Col('htmlItalic', 'magenta')
209call s:Col('htmlBold', 'cyan', '')
210
211
212" Plugin =======================================================================
213
214" GitGutter
215call s:Col('GitGutterAdd', 'green', s:linenr_background)
216call s:Col('GitGutterChange', 'cyan', s:linenr_background)
217call s:Col('GitGutterDelete', 'orange', s:linenr_background)
218call s:Col('GitGutterChangeDelete', 'magenta', s:linenr_background)
219
220" CtrlP
221call s:Col('CtrlPNoEntries', 'base7', 'orange') " no entries
222call s:Col('CtrlPMatch', 'green')               " matching part
223call s:Col('CtrlPPrtBase', 'base4')             " '>>>' prompt
224call s:Col('CtrlPPrtText', 'cyan')              " text in the prompt
225call s:Col('CtrlPPtrCursor', 'base7')           " cursor in the prompt
226
227
228
229" Cleanup =====================================================================
230
231unlet s:colors
232unlet s:background
233unlet s:linenr_background