vividchalk.vim (6199B)
1 " Vim color scheme 2 " Name: vividchalk.vim 3 " Author: Tim Pope <vimNOSPAM@tpope.info> 4 " GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim 5 " $Id: vividchalk.vim,v 1.8 2007-07-11 18:50:16 tpope Exp $ 6 7 " Based on the Vibrank Ink theme for TextMate 8 " Distributable under the same terms as Vim itself (see :help license) 9 10 if has("gui_running") 11 set background=dark 12 endif 13 hi clear 14 if exists("syntax_on") 15 syntax reset 16 endif 17 18 let 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 23 fun! s:M(a) 24 return strpart("0245", a:a, 1) + 0 25 endfun 26 27 " map a urxvt colour to an xterm-256 colour 28 fun! 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 46 endfun 47 48 function! E2T(a) 49 return s:X(a:a) 50 endfunction 51 52 function! 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 58 endfunction 59 60 function! 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 67 endfunction 68 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 72 endfunction 73 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 93 call s:hifg("Normal","#EEEEEE","White",87) 94 if &background == "light" || has("gui_running") 95 hi Normal guibg=Black ctermbg=Black 96 else 97 hi Normal guibg=Black ctermbg=NONE 98 endif 99 highlight StatusLine guifg=Black guibg=#aabbee gui=bold ctermfg=Black ctermbg=White cterm=bold 100 highlight StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey cterm=none 101 "if &t_Co == 256 102 "highlight StatusLine ctermbg=117 103 "else 104 "highlight StatusLine ctermbg=43 105 "endif 106 highlight WildMenu guifg=Black guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold 107 highlight Cursor guifg=Black guibg=White ctermfg=Black ctermbg=White 108 highlight CursorLine guibg=#333333 guifg=NONE 109 highlight CursorColumn guibg=#333333 guifg=NONE 110 highlight NonText guifg=#404040 ctermfg=8 111 highlight SpecialKey guifg=#404040 ctermfg=8 112 highlight Directory none 113 high link Directory Identifier 114 highlight ErrorMsg guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE 115 highlight Search guifg=NONE ctermfg=NONE gui=none cterm=none 116 call s:hibg("Search" ,"#555555","Black",81) 117 highlight IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black 118 highlight MoreMsg guifg=#00AA00 ctermfg=Green 119 highlight LineNr guifg=#DDEEFF ctermfg=White 120 call s:hibg("LineNr" ,"#222222","DarkBlue",80) 121 highlight Question none 122 high link Question MoreMsg 123 highlight Title guifg=Magenta ctermfg=Magenta 124 highlight VisualNOS gui=none cterm=none 125 call s:hibg("Visual" ,"#555577","LightBlue",83) 126 call s:hibg("VisualNOS" ,"#444444","DarkBlue",81) 127 highlight WarningMsg guifg=Red ctermfg=Red 128 highlight Folded guibg=#1100aa ctermbg=DarkBlue 129 call s:hibg("Folded" ,"#110077","DarkBlue",17) 130 call s:hifg("Folded" ,"#aaddee","LightCyan",63) 131 highlight FoldColumn none 132 high link FoldColumn Folded 133 highlight Pmenu guifg=White ctermfg=White gui=bold cterm=bold 134 highlight PmenuSel guifg=White ctermfg=White gui=bold cterm=bold 135 call s:hibg("Pmenu" ,"#000099","Blue",18) 136 call s:hibg("PmenuSel" ,"#5555ff","DarkCyan",39) 137 highlight PmenuSbar guibg=Grey ctermbg=Grey 138 highlight PmenuThumb guibg=White ctermbg=White 139 highlight TabLine gui=underline cterm=underline 140 call s:hifg("TabLine" ,"#bbbbbb","LightGrey",85) 141 call s:hibg("TabLine" ,"#333333","DarkGrey",80) 142 highlight TabLineSel guifg=White guibg=Black ctermfg=White ctermbg=Black 143 highlight TabLineFill gui=underline cterm=underline 144 call s:hifg("TabLineFill","#bbbbbb","LightGrey",85) 145 call s:hibg("TabLineFill","#808080","Grey",83) 146 147 hi Type gui=none 148 hi Statement gui=none 149 if !has("gui_mac") 150 " Mac GUI degrades italics to ugly underlining. 151 hi Comment gui=italic 152 hi railsUserClass gui=italic 153 hi railsUserMethod gui=italic 154 endif 155 hi Identifier cterm=none 156 " Commented numbers at the end are *old* 256 color values 157 "highlight PreProc guifg=#EDF8F9 158 call s:hifg("Comment" ,"#9933CC","DarkMagenta",34) " 92 159 " 26 instead? 160 call s:hifg("Constant" ,"#339999","DarkCyan",21) " 30 161 call s:hifg("rubyNumber" ,"#CCFF33","Yellow",60) " 190 162 call s:hifg("String" ,"#66FF00","LightGreen",44,82) " 82 163 call s:hifg("Identifier" ,"#FFCC00","Yellow",72) " 220 164 call s:hifg("Statement" ,"#FF6600","Brown",68) " 202 165 call s:hifg("PreProc" ,"#AAFFFF","LightCyan",47) " 213 166 call s:hifg("railsUserMethod","#AACCFF","LightCyan",27) 167 call s:hifg("Type" ,"#AAAA77","Grey",57) " 101 168 call s:hifg("railsUserClass" ,"#AAAAAA","Grey",7) " 101 169 call s:hifg("Special" ,"#33AA00","DarkGreen",24) " 7 170 call s:hifg("Regexp" ,"#44B4CC","DarkCyan",21) " 74 171 call s:hifg("rubyMethod" ,"#DDE93D","Yellow",77) " 191 172 "highlight railsMethod guifg=#EE1122 ctermfg=1