]> git.r.bdr.sh - rbdr/dotfiles/blame - vim/colors/vividchalk.vim
Fix some skhdrc configs
[rbdr/dotfiles] / vim / colors / vividchalk.vim
CommitLineData
0d23b6e5
BB
1" Vim color scheme
2" Name: vividchalk.vim
3" Author: Tim Pope <vimNOSPAM@tpope.info>
4" Version: 2.0
5" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim
6
7" Based on the Vibrank Ink theme for TextMate
8" Distributable under the same terms as Vim itself (see :help license)
9
10if has("gui_running")
11 set background=dark
12endif
13hi clear
14if exists("syntax_on")
15 syntax reset
16endif
17
18let colors_name = "vividchalk"
19
20" First two functions adapted from inkpot.vim
21
22" map a urxvt cube number to an xterm-256 cube number
23fun! s:M(a)
24 return strpart("0245", a:a, 1) + 0
25endfun
26
27" map a urxvt colour to an xterm-256 colour
28fun! s:X(a)
29 if &t_Co == 88
30 return a:a
31 else
32 if a:a == 8
33 return 237
34 elseif a:a < 16
35 return a:a
36 elseif a:a > 79
37 return 232 + (3 * (a:a - 80))
38 else
39 let l:b = a:a - 16
40 let l:x = l:b % 4
41 let l:y = (l:b / 4) % 4
42 let l:z = (l:b / 16)
43 return 16 + s:M(l:x) + (6 * s:M(l:y)) + (36 * s:M(l:z))
44 endif
45 endif
46endfun
47
48function! E2T(a)
49 return s:X(a:a)
50endfunction
51
52function! s:choose(mediocre,good)
53 if &t_Co != 88 && &t_Co != 256
54 return a:mediocre
55 else
56 return s:X(a:good)
57 endif
58endfunction
59
60function! s:hifg(group,guifg,first,second,...)
61 if a:0 && &t_Co == 256
62 let ctermfg = a:1
63 else
64 let ctermfg = s:choose(a:first,a:second)
65 endif
66 exe "highlight ".a:group." guifg=".a:guifg." ctermfg=".ctermfg
67endfunction
68
69function! s:hibg(group,guibg,first,second)
70 let ctermbg = s:choose(a:first,a:second)
71 exe "highlight ".a:group." guibg=".a:guibg." ctermbg=".ctermbg
72endfunction
73
74hi link railsMethod PreProc
75hi link rubyDefine Keyword
76hi link rubySymbol Constant
77hi link rubyAccess rubyMethod
78hi link rubyAttribute rubyMethod
79hi link rubyEval rubyMethod
80hi link rubyException rubyMethod
81hi link rubyInclude rubyMethod
82hi link rubyStringDelimiter rubyString
83hi link rubyRegexp Regexp
84hi link rubyRegexpDelimiter rubyRegexp
85"hi link rubyConstant Variable
86"hi link rubyGlobalVariable Variable
87"hi link rubyClassVariable Variable
88"hi link rubyInstanceVariable Variable
89hi link javascriptRegexpString Regexp
90hi link javascriptNumber Number
91hi link javascriptNull Constant
92highlight link diffAdded String
93highlight link diffRemoved Statement
94highlight link diffLine PreProc
95highlight link diffSubname Comment
96
97call s:hifg("Normal","#EEEEEE","White",87)
98if &background == "light" || has("gui_running")
99 hi Normal guibg=Black ctermbg=Black
100else
101 hi Normal guibg=Black ctermbg=NONE
102endif
103highlight StatusLine guifg=Black guibg=#aabbee gui=bold ctermfg=Black ctermbg=White cterm=bold
104highlight StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey cterm=none
105"if &t_Co == 256
106 "highlight StatusLine ctermbg=117
107"else
108 "highlight StatusLine ctermbg=43
109"endif
110
111highlight Ignore ctermfg=Black
112highlight WildMenu guifg=Black guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold
113highlight Cursor guifg=Black guibg=White ctermfg=Black ctermbg=White
114highlight CursorLine guibg=#333333 guifg=NONE
115highlight CursorColumn guibg=#333333 guifg=NONE
116highlight NonText guifg=#404040 ctermfg=8
117highlight SpecialKey guifg=#404040 ctermfg=8
118highlight Directory none
119high link Directory Identifier
120highlight ErrorMsg guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE
121highlight Search guifg=NONE ctermfg=NONE gui=none cterm=none
122call s:hibg("Search" ,"#555555","DarkBlue",81)
123highlight IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black
124highlight MoreMsg guifg=#00AA00 ctermfg=Green
125highlight LineNr guifg=#DDEEFF ctermfg=White
126call s:hibg("LineNr" ,"#222222","DarkBlue",80)
127highlight Question none
128high link Question MoreMsg
129highlight Title guifg=Magenta ctermfg=Magenta
130highlight VisualNOS gui=none cterm=none
131call s:hibg("Visual" ,"#555577","LightBlue",83)
132call s:hibg("VisualNOS" ,"#444444","DarkBlue",81)
133call s:hibg("MatchParen","#1100AA","DarkBlue",18)
134highlight WarningMsg guifg=Red ctermfg=Red
135highlight Error ctermbg=DarkRed
136highlight SpellBad ctermbg=DarkRed
137" FIXME: Comments
138highlight SpellRare ctermbg=DarkMagenta
139highlight SpellCap ctermbg=DarkBlue
140highlight SpellLocal ctermbg=DarkCyan
141
142call s:hibg("Folded" ,"#110077","DarkBlue",17)
143call s:hifg("Folded" ,"#aaddee","LightCyan",63)
144highlight FoldColumn none
145high link FoldColumn Folded
146highlight DiffAdd ctermbg=4 guibg=DarkBlue
147highlight DiffChange ctermbg=5 guibg=DarkMagenta
148highlight DiffDelete ctermfg=12 ctermbg=6 gui=bold guifg=Blue guibg=DarkCyan
149highlight DiffText ctermbg=DarkRed
150highlight DiffText cterm=bold ctermbg=9 gui=bold guibg=Red
151
152highlight Pmenu guifg=White ctermfg=White gui=bold cterm=bold
153highlight PmenuSel guifg=White ctermfg=White gui=bold cterm=bold
154call s:hibg("Pmenu" ,"#000099","Blue",18)
155call s:hibg("PmenuSel" ,"#5555ff","DarkCyan",39)
156highlight PmenuSbar guibg=Grey ctermbg=Grey
157highlight PmenuThumb guibg=White ctermbg=White
158highlight TabLine gui=underline cterm=underline
159call s:hifg("TabLine" ,"#bbbbbb","LightGrey",85)
160call s:hibg("TabLine" ,"#333333","DarkGrey",80)
161highlight TabLineSel guifg=White guibg=Black ctermfg=White ctermbg=Black
162highlight TabLineFill gui=underline cterm=underline
163call s:hifg("TabLineFill","#bbbbbb","LightGrey",85)
164call s:hibg("TabLineFill","#808080","Grey",83)
165
166hi Type gui=none
167hi Statement gui=none
168if !has("gui_mac")
169 " Mac GUI degrades italics to ugly underlining.
170 hi Comment gui=italic
171 hi railsUserClass gui=italic
172 hi railsUserMethod gui=italic
173endif
174hi Identifier cterm=none
175" Commented numbers at the end are *old* 256 color values
176"highlight PreProc guifg=#EDF8F9
177call s:hifg("Comment" ,"#9933CC","DarkMagenta",34) " 92
178" 26 instead?
179call s:hifg("Constant" ,"#339999","DarkCyan",21) " 30
180call s:hifg("rubyNumber" ,"#CCFF33","Yellow",60) " 190
181call s:hifg("String" ,"#66FF00","LightGreen",44,82) " 82
182call s:hifg("Identifier" ,"#FFCC00","Yellow",72) " 220
183call s:hifg("Statement" ,"#FF6600","Brown",68) " 202
184call s:hifg("PreProc" ,"#AAFFFF","LightCyan",47) " 213
185call s:hifg("railsUserMethod","#AACCFF","LightCyan",27)
186call s:hifg("Type" ,"#AAAA77","Grey",57) " 101
187call s:hifg("railsUserClass" ,"#AAAAAA","Grey",7) " 101
188call s:hifg("Special" ,"#33AA00","DarkGreen",24) " 7
189call s:hifg("Regexp" ,"#44B4CC","DarkCyan",21) " 74
190call s:hifg("rubyMethod" ,"#DDE93D","Yellow",77) " 191
191"highlight railsMethod guifg=#EE1122 ctermfg=1