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