dual.vim 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. "==============================================================================.
  2. " File: dual.vim |
  3. " License: Public Domain, FREE as LOVE. |
  4. " Description: The Dual colorscheme you've been longing for. On VIM, it uses |
  5. " dark colors. On GVIM, it uses bright colors without bold, |
  6. " italic nor underline font styles (except for spell checking |
  7. " and some GUI elements). |
  8. " Note: - Only standard (for all languages) highlight-groups are set. |
  9. " - This colorscheme _should_ look nice everywhere. |
  10. "==============================================================================|
  11. " Author: drachenkiraa, {_drachen_kiraa_}@{_gmail_}.{com_} (remove: _{}) |
  12. " Last Change: 2009 Jul 1 |
  13. " Version: 1.1 |
  14. "==========================================================================={{{1
  15. " Changes: |
  16. " 1.0: Public release. |
  17. " 1.1: A LOT of changes, if you are interested to know what really changed: |
  18. " Changed 'CursorLine', 'CursorColumn' to use 'gui=underline' instead of |
  19. " using 'guibg' color. |
  20. " Made 'PMenuSel' guibg color more darker. |
  21. " Changed 'SpellRare' guisp color to DarkMagenta. |
  22. " Tab pages, Status and Split bars now use gray-blue and blue-white |
  23. " as colors (for both terminal and gui). |
  24. " Changed 'MoreMsg' guifg color from Gray30 to DarkGreen. |
  25. " Changed 'Question' gui option to italic. |
  26. " Changed 'Directory' ctermfg from Yellow to Blue. |
  27. " Changed all Diff colors to use their darker versions. |
  28. " Made 'LineNr' transparent and brighter. |
  29. " Made 'SignColumn' transparent. |
  30. " Made 'Folded' and 'FoldColumn' darkblue over transparent for cterm, |
  31. " and made their GUI colors more brighter. |
  32. " Changed 'IncSearch' ctermbg and guibg colors from |
  33. " LighMagenta to Green. |
  34. " Added 'ctermfg'and 'guifg' options to 'Search'. |
  35. " Made 'Comment' guifg and ctermfg colors more brighter. |
  36. " Linked 'Number', 'Float' and 'Boolean' to 'Constant'. |
  37. " Changed 'Constant' ctermfg color from Magenta to Yellow, |
  38. " and made guifg colors more darker. |
  39. " Changed 'Character' ctermfg color from Magenta to DarkRed, |
  40. " and made guifg colors more darker. |
  41. " Made 'String' ctermfg color more darker. |
  42. " Linked 'Function' to 'Identifier', and changed their ctermfg and guifg |
  43. " to Magenta and a dark violet respectively. |
  44. " Linked 'Conditional', 'Repeat', 'Operator', 'Keyword', 'Label' and |
  45. " 'Exception' to 'Statement. |
  46. " Changed 'Statement' ctermfg color from Green to Blue. |
  47. " Linked 'StorageClass', 'Structure' and 'Typedef' to 'Type'. |
  48. " Changed 'Type' ctermfg color from Cyan to Blue. |
  49. " Linked 'Include', 'Define' and 'Macro' to 'PreProc'. |
  50. " Changed 'PreProc' ctermfg color to a darker version. |
  51. " Changed 'PreCondit' ctermfg color from Blue to Yellow and guifg color |
  52. " from Red to Gold like. |
  53. " Changed 'Special', 'SpecialChar', 'Tag' and 'Delimiter' ctermfg color |
  54. " from Red to Cyan and changed their guifg color to sky blue. |
  55. " Changed 'MatchParen' guibg color from light magenta to DarkBlue. |
  56. " Changed 'Todo' ctermbg and guibg colors to Green and DarkGreen. |
  57. " Made 'Underlined'ctermbg transparent. |
  58. " Set 'NonText' guibg color to the same as the 'FoldColumn' guibg color. |
  59. "==============================================================================|
  60. " Color Test: :he group-name |
  61. " :so $VIMRUNTIME/syntax/hitest.vim |
  62. " Tested On: - Linux (gvim v6.3, v6.4); |
  63. " - Standard Linux Terminal (vim v6.3, v6.4); |
  64. " - Xterm, Rxvt, Konsole, gnome-terminal (vim v6.3, v6.4). |
  65. " - Windows (gvim v7.1, v7.2); |
  66. " - DOS (vim v7.1, v7.2). |
  67. " TODO: * Test this colorscheme on newer versions of vim/gvim for Linux |
  68. " and other systems (*BSD, Mac, Amiga?). |
  69. " * Are all the has("feature") checks really worth? |
  70. " Please enlighten me if I'm wrong. |
  71. "==============================================================================|
  72. " Random Tips: |
  73. " * If your terminal supports more than 8 colors (which is the case of most |
  74. " modern xterms, rxvts, and others), then it is worth adding the following |
  75. " lines somewhere into your .vimrc: |
  76. " if &term =~ "xterm" |
  77. " set t_Co=16 |
  78. " endif |
  79. " That'll make this colorscheme look a lot better on such terminals. |
  80. " For further help checkout: |
  81. " :he term-dependent-settings |
  82. " :he term |
  83. "===========================================================================}}}1
  84. " Initial setup stuff {{{1
  85. " Remove existing highlighting
  86. if has("gui_running")
  87. set background=light
  88. else
  89. set background=dark
  90. endif
  91. hi clear
  92. if exists("syntax_on")
  93. syntax reset
  94. endif
  95. let g:colors_name = "dual"
  96. hi Normal ctermbg=Black ctermfg=Gray guibg=White guifg=Black gui=none
  97. " Vim >= 7.0 specific colors {{{1
  98. if v:version >= 700
  99. " Cursor colors {{{2
  100. hi Cursor ctermbg=fg ctermfg=bg cterm=NONE guibg=DarkBlue guifg=bg gui=none
  101. hi CursorLine ctermbg=DarkGray cterm=NONE guibg=bg gui=underline
  102. hi CursorColumn ctermbg=DarkGray cterm=NONE guibg=bg gui=underline
  103. " only for Win32, IME status
  104. if has('multi_byte_ime')
  105. hi CursorIM guibg=#660066 guifg=NONE gui=none
  106. endif
  107. " Auto-completion Popup Menu colors {{{2
  108. hi Pmenu ctermbg=Gray ctermfg=bg cterm=NONE guibg=#ccff99 guifg=fg gui=none
  109. hi PmenuSel ctermbg=DarkRed ctermfg=White cterm=NONE guibg=#336600 guifg=bg gui=bold
  110. hi PmenuSbar ctermbg=DarkRed ctermfg=fg cterm=NONE guibg=#99cc66 guifg=fg gui=none
  111. hi PmenuThumb ctermbg=DarkGray ctermfg=DarkGray cterm=NONE guibg=#669933 guifg=bg gui=none
  112. " Tab colors {{{2
  113. if has("windows")
  114. hi TabLine ctermbg=Gray ctermfg=DarkBlue guibg=Gray75 guifg=#003399 gui=none
  115. hi TabLineFill ctermbg=Gray ctermfg=DarkBlue guibg=Gray75 guifg=#003399 gui=none
  116. hi TabLineSel ctermbg=DarkBlue ctermfg=fg guibg=#003399 guifg=bg gui=bold
  117. endif
  118. " Spell checking colors {{{2
  119. if has("spell")
  120. hi SpellBad ctermbg=White ctermfg=Red cterm=NONE guisp=Red gui=undercurl
  121. hi SpellCap ctermbg=White ctermfg=Blue cterm=NONE guisp=Blue gui=undercurl
  122. hi SpellLocal ctermbg=White ctermfg=DarkCyan cterm=NONE guisp=DarkCyan gui=undercurl
  123. hi SpellRare ctermbg=White ctermfg=Magenta cterm=NONE guisp=DarkMagenta gui=undercurl
  124. endif
  125. endif "}}}1
  126. " Messages and other texts' colors {{{1
  127. hi WarningMsg ctermbg=bg ctermfg=Red cterm=NONE guibg=bg guifg=Red3 gui=none
  128. hi ErrorMsg ctermbg=Red ctermfg=White cterm=NONE guibg=Red3 guifg=bg gui=none
  129. hi ModeMsg ctermbg=bg ctermfg=fg cterm=NONE guibg=bg guifg=fg gui=none
  130. hi MoreMsg ctermbg=bg ctermfg=Green cterm=NONE guibg=bg guifg=DarkGreen gui=none
  131. hi Question ctermbg=bg ctermfg=White cterm=NONE guibg=bg guifg=Gray30 gui=italic
  132. hi Directory ctermbg=bg ctermfg=Blue cterm=NONE guibg=bg guifg=Blue2 gui=none
  133. hi Title ctermbg=bg ctermfg=Magenta cterm=NONE guibg=bg guifg=Blue gui=bold
  134. " Diff colors {{{1
  135. if has("diff")
  136. hi DiffAdd ctermbg=Green ctermfg=bg cterm=NONE guibg=#ccffcc gui=none
  137. hi DiffChange ctermbg=Blue ctermfg=fg cterm=NONE guibg=#ccccff gui=none
  138. hi DiffDelete ctermbg=Red ctermfg=bg cterm=NONE guibg=#ffcccc gui=none
  139. hi DiffText ctermbg=Cyan ctermfg=bg cterm=NONE guibg=#ccffff gui=none
  140. endif
  141. " Outline, Fold & Sign columns colors {{{1
  142. hi LineNr ctermbg=bg ctermfg=DarkGray guibg=bg guifg=Gray60 gui=none
  143. if has("folding")
  144. hi Folded ctermbg=bg ctermfg=DarkBlue cterm=NONE guibg=Gray95 guifg=Gray40 gui=none
  145. hi FoldColumn ctermbg=bg ctermfg=DarkBlue cterm=NONE guibg=Gray95 guifg=Gray40 gui=none
  146. endif
  147. if has("signs")
  148. hi SignColumn ctermbg=bg ctermfg=Yellow cterm=NONE guibg=Gray95 guifg=#0033ff gui=none
  149. endif
  150. " Search & Special characters' colors {{{1
  151. if has("extra_search")
  152. hi Search ctermbg=Yellow ctermfg=bg cterm=NONE guibg=Yellow guifg=fg gui=none
  153. hi IncSearch ctermbg=Green ctermfg=bg cterm=NONE guibg=Green guifg=fg gui=none
  154. endif
  155. hi NonText ctermbg=bg ctermfg=DarkGray guibg=Gray95 guifg=DarkGray gui=none
  156. hi SpecialKey ctermbg=bg ctermfg=Brown guibg=bg guifg=#993333 gui=none
  157. " Window Bars, Status line & Visual mode colors {{{1
  158. hi StatusLine ctermbg=DarkBlue ctermfg=fg cterm=NONE guibg=#003399 guifg=bg gui=none
  159. if has("windows")
  160. hi StatusLineNC ctermbg=Gray ctermfg=DarkBlue cterm=NONE guibg=Gray75 guifg=#003399 gui=italic
  161. endif
  162. if has("vertsplit")
  163. hi VertSplit ctermbg=Gray ctermfg=DarkBlue cterm=NONE guibg=Gray75 guifg=#003399 gui=bold
  164. endif
  165. if has("wildmenu")
  166. hi WildMenu ctermbg=bg ctermfg=Blue guibg=bg guifg=#003399 gui=bold
  167. endif
  168. if has("visual")
  169. hi Visual ctermbg=DarkBlue ctermfg=fg cterm=NONE guibg=DarkBlue guifg=bg gui=none
  170. hi VisualNOS ctermbg=fg ctermfg=DarkBlue cterm=NONE guibg=DarkBlue guifg=bg gui=none
  171. endif
  172. " Syntax highlighting colors {{{1
  173. hi Comment ctermbg=bg ctermfg=Green guibg=bg guifg=#008800 gui=none
  174. hi link SpecialComment Comment
  175. hi Character ctermbg=bg ctermfg=Red guibg=bg guifg=#cc0000 gui=none
  176. hi String ctermbg=bg ctermfg=Red guibg=bg guifg=#cc0000 gui=none
  177. hi Constant ctermbg=bg ctermfg=Yellow guibg=bg guifg=#ff6600 gui=none
  178. hi link Number Constant
  179. hi link Float Constant
  180. hi link Boolean Constant
  181. hi Identifier ctermbg=bg ctermfg=Magenta guibg=bg guifg=#990099 gui=none
  182. hi link Function Identifier
  183. hi Statement ctermbg=bg ctermfg=Blue guibg=bg guifg=#0000cc gui=none
  184. hi link Conditional Statement
  185. hi link Repeat Statement
  186. hi link Operator Statement
  187. hi link Keyword Statement
  188. hi link Label Statement
  189. hi link Exception Statement
  190. hi Type ctermbg=bg ctermfg=Blue guibg=bg guifg=#0000cc gui=none
  191. hi link StorageClass Type
  192. hi link Structure Type
  193. hi link Typedef Type
  194. hi PreProc ctermbg=bg ctermfg=DarkYellow guibg=bg guifg=#666600 gui=none
  195. hi PreCondit ctermbg=bg ctermfg=Yellow guibg=bg guifg=#999900 gui=none
  196. hi link Include PreProc
  197. hi link Define PreProc
  198. hi link Macro PreProc
  199. hi Special ctermbg=bg ctermfg=Cyan guibg=bg guifg=#3366cc gui=none
  200. hi SpecialChar ctermbg=bg ctermfg=Cyan guibg=bg guifg=Blue gui=none
  201. hi Tag ctermbg=bg ctermfg=Cyan guibg=bg guifg=#3366cc gui=none
  202. hi Delimiter ctermbg=bg ctermfg=Cyan guibg=bg guifg=#3366cc gui=none
  203. hi Debug ctermbg=bg ctermfg=DarkGray guibg=bg guifg=DarkGray gui=none
  204. hi MatchParen ctermbg=White ctermfg=Black cterm=NONE guibg=DarkBlue guifg=bg gui=none
  205. hi Error ctermbg=Red ctermfg=White cterm=NONE guibg=bg guifg=Red gui=none
  206. hi Ignore ctermbg=bg ctermfg=bg cterm=NONE guibg=bg guifg=bg gui=none
  207. hi Todo ctermbg=Green ctermfg=bg cterm=NONE guibg=DarkGreen guifg=bg gui=none
  208. hi Underlined ctermbg=bg ctermfg=Cyan cterm=underline guibg=bg guifg=Blue2 gui=underline
  209. "}}}1
  210. "==========================================================================={{{1
  211. " vim: set et sw=2 sts=2 ts=8 nowrap:
  212. " vim600: set fdc=2 fdm=marker: