moria.vim 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. if exists("g:moria_style")
  2. let s:moria_style = g:moria_style
  3. else
  4. let s:moria_style = &background
  5. endif
  6. if exists("g:moria_monochrome")
  7. let s:moria_monochrome = g:moria_monochrome
  8. else
  9. let s:moria_monochrome = 0
  10. endif
  11. if exists("g:moria_fontface")
  12. let s:moria_fontface = g:moria_fontface
  13. else
  14. let s:moria_fontface = "plain"
  15. endif
  16. execute "command! -nargs=1 Colo let g:moria_style = \"<args>\" | colo moria"
  17. if s:moria_style == "black" || s:moria_style == "dark"
  18. set background=dark
  19. elseif s:moria_style == "light" || s:moria_style == "white"
  20. set background=light
  21. else
  22. let s:moria_style = &background
  23. endif
  24. hi clear
  25. if exists("syntax_on")
  26. syntax reset
  27. endif
  28. let colors_name = "moria"
  29. if &background == "dark"
  30. if s:moria_style == "dark"
  31. hi Normal ctermbg=0 ctermfg=7 guibg=#202020 guifg=#d0d0d0 gui=none
  32. hi ColorColumn ctermbg=8 ctermfg=15 guibg=#494949 gui=none
  33. hi CursorColumn ctermbg=8 ctermfg=15 guibg=#404040 gui=none
  34. hi CursorLine ctermbg=8 ctermfg=15 guibg=#404040 gui=none
  35. elseif s:moria_style == "black"
  36. hi Normal ctermbg=0 ctermfg=7 guibg=#000000 guifg=#d0d0d0 gui=none
  37. hi ColorColumn ctermbg=8 ctermfg=15 guibg=#444444 gui=none
  38. hi CursorColumn ctermbg=8 ctermfg=15 guibg=#3a3a3a gui=none
  39. hi CursorLine ctermbg=8 ctermfg=15 guibg=#3a3a3a gui=none
  40. endif
  41. if s:moria_monochrome == 1
  42. hi FoldColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none
  43. hi LineNr guifg=#a0a0a0 gui=none
  44. hi MoreMsg guibg=bg guifg=#b6b6b6 gui=bold
  45. hi NonText ctermfg=8 guibg=bg guifg=#a0a0a0 gui=bold
  46. hi Pmenu guibg=#909090 guifg=#000000 gui=none
  47. hi PmenuSbar guibg=#707070 guifg=fg gui=none
  48. hi PmenuThumb guibg=#d0d0d0 guifg=bg gui=none
  49. hi SignColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none
  50. hi StatusLine ctermbg=7 ctermfg=0 guibg=#4c4c4c guifg=fg gui=bold
  51. hi StatusLineNC ctermbg=8 ctermfg=0 guibg=#404040 guifg=fg gui=none
  52. hi TabLine guibg=#6e6e6e guifg=fg gui=underline
  53. hi TabLineFill guibg=#6e6e6e guifg=fg gui=underline
  54. hi VertSplit ctermbg=7 ctermfg=0 guibg=#404040 guifg=fg gui=none
  55. if s:moria_fontface == "mixed"
  56. hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=bold
  57. else
  58. hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=none
  59. endif
  60. else
  61. hi FoldColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none
  62. hi LineNr guifg=#8fa5d1 gui=none
  63. hi MoreMsg guibg=bg guifg=#97abd5 gui=bold
  64. hi NonText ctermfg=8 guibg=bg guifg=#8fa5d1 gui=bold
  65. hi Pmenu guibg=#6381be guifg=#000000 gui=none
  66. hi PmenuSbar guibg=#41609e guifg=fg gui=none
  67. hi PmenuThumb guibg=#bdcae3 guifg=bg gui=none
  68. hi SignColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none
  69. hi StatusLine ctermbg=7 ctermfg=0 guibg=#334b7d guifg=fg gui=bold
  70. hi StatusLineNC ctermbg=8 ctermfg=0 guibg=#25365a guifg=fg gui=none
  71. hi TabLine guibg=#41609e guifg=fg gui=underline
  72. hi TabLineFill guibg=#41609e guifg=fg gui=underline
  73. hi VertSplit ctermbg=7 ctermfg=0 guibg=#25365a guifg=fg gui=none
  74. if s:moria_fontface == "mixed"
  75. hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=bold
  76. else
  77. hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=none
  78. endif
  79. endif
  80. hi Cursor guibg=#ffa500 guifg=bg gui=none
  81. hi DiffAdd guibg=#008b00 guifg=fg gui=none
  82. hi DiffChange guibg=#00008b guifg=fg gui=none
  83. hi DiffDelete guibg=#8b0000 guifg=fg gui=none
  84. hi DiffText guibg=#0000cd guifg=fg gui=bold
  85. hi Directory guibg=bg guifg=#1e90ff gui=none
  86. hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold
  87. hi IncSearch guibg=#e0cd78 guifg=#000000 gui=none
  88. hi ModeMsg guibg=bg guifg=fg gui=bold
  89. hi PmenuSel guibg=#e0e000 guifg=#000000 gui=none
  90. hi Question guibg=bg guifg=#e8b87e gui=bold
  91. hi Search guibg=#90e090 guifg=#000000 gui=none
  92. hi SpecialKey guibg=bg guifg=#e8b87e gui=none
  93. if has("spell")
  94. hi SpellBad guisp=#ee2c2c gui=undercurl
  95. hi SpellCap guisp=#2c2cee gui=undercurl
  96. hi SpellLocal guisp=#2ceeee gui=undercurl
  97. hi SpellRare guisp=#ee2cee gui=undercurl
  98. endif
  99. hi TabLineSel guibg=bg guifg=fg gui=bold
  100. hi Title ctermbg=0 ctermfg=15 guifg=fg gui=bold
  101. if version >= 700
  102. hi Visual ctermbg=7 ctermfg=0 guibg=#606060 gui=none
  103. else
  104. hi Visual ctermbg=7 ctermfg=0 guibg=#606060 guifg=fg gui=none
  105. endif
  106. hi VisualNOS ctermbg=8 ctermfg=0 guibg=bg guifg=#a0a0a0 gui=bold,underline
  107. hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold
  108. hi WildMenu guibg=#e0e000 guifg=#000000 gui=bold
  109. hi Comment guibg=bg guifg=#d0d0a0 gui=none
  110. hi Constant guibg=bg guifg=#87df71 gui=none
  111. hi Error guibg=bg guifg=#ee2c2c gui=none
  112. hi Identifier guibg=bg guifg=#7ee0ce gui=none
  113. hi Ignore guibg=bg guifg=bg gui=none
  114. hi lCursor guibg=#00e700 guifg=#000000 gui=none
  115. hi MatchParen guibg=#008b8b gui=none
  116. hi PreProc guibg=bg guifg=#d7a0d7 gui=none
  117. hi Special guibg=bg guifg=#e8b87e gui=none
  118. hi Todo guibg=#e0e000 guifg=#000000 gui=none
  119. hi Underlined ctermbg=0 ctermfg=15 guibg=bg guifg=#00a0ff gui=underline
  120. if s:moria_fontface == "mixed"
  121. hi Statement guibg=bg guifg=#7ec0ee gui=bold
  122. hi Type guibg=bg guifg=#f09479 gui=bold
  123. else
  124. hi Statement guibg=bg guifg=#7ec0ee gui=none
  125. hi Type guibg=bg guifg=#f09479 gui=none
  126. endif
  127. hi htmlBold ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold
  128. hi htmlBoldItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,italic
  129. hi htmlBoldUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline
  130. hi htmlBoldUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline,italic
  131. hi htmlItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=italic
  132. hi htmlUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline
  133. hi htmlUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline,italic
  134. elseif &background == "light"
  135. if s:moria_style == "light"
  136. hi Normal ctermbg=15 ctermfg=0 guibg=#f0f0f0 guifg=#000000 gui=none
  137. hi ColorColumn ctermbg=7 ctermfg=0 guibg=#d3d3d3 gui=none
  138. hi CursorColumn ctermbg=7 ctermfg=0 guibg=#d8d8d8 gui=none
  139. hi CursorLine ctermbg=7 ctermfg=0 guibg=#d8d8d8 gui=none
  140. elseif s:moria_style == "white"
  141. hi Normal ctermbg=15 ctermfg=0 guibg=#ffffff guifg=#000000 gui=none
  142. hi ColorColumn ctermbg=7 ctermfg=0 guibg=#d7d7d7 gui=none
  143. hi CursorColumn ctermbg=7 ctermfg=0 guibg=#dfdfdf gui=none
  144. hi CursorLine ctermbg=7 ctermfg=0 guibg=#dfdfdf gui=none
  145. endif
  146. if s:moria_monochrome == 1
  147. hi FoldColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none
  148. hi Folded guibg=#cfcfcf guifg=#404040 gui=bold
  149. hi LineNr guifg=#7a7a7a gui=none
  150. hi MoreMsg guibg=bg guifg=#505050 gui=bold
  151. hi NonText ctermfg=8 guibg=bg guifg=#7a7a7a gui=bold
  152. hi Pmenu guibg=#9a9a9a guifg=#000000 gui=none
  153. hi PmenuSbar guibg=#808080 guifg=fg gui=none
  154. hi PmenuThumb guibg=#c0c0c0 guifg=fg gui=none
  155. hi SignColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none
  156. hi StatusLine ctermbg=0 ctermfg=15 guibg=#a0a0a0 guifg=fg gui=bold
  157. hi StatusLineNC ctermbg=7 ctermfg=0 guibg=#b0b0b0 guifg=fg gui=none
  158. hi TabLine guibg=#cdcdcd guifg=fg gui=underline
  159. hi TabLineFill guibg=#cdcdcd guifg=fg gui=underline
  160. hi VertSplit ctermbg=7 ctermfg=0 guibg=#b0b0b0 guifg=fg gui=none
  161. else
  162. hi FoldColumn ctermbg=bg guibg=bg guifg=#375288 gui=none
  163. hi Folded guibg=#cfcfcf guifg=#25365a gui=bold
  164. hi LineNr guifg=#375288 gui=none
  165. hi MoreMsg guibg=bg guifg=#2f4471 gui=bold
  166. hi NonText ctermfg=8 guibg=bg guifg=#375288 gui=bold
  167. hi Pmenu guibg=#708bc5 guifg=#000000 gui=none
  168. hi PmenuSbar guibg=#4a6db5 guifg=fg gui=none
  169. hi PmenuThumb guibg=#a6b7db guifg=fg gui=none
  170. hi SignColumn ctermbg=bg guibg=bg guifg=#375288 gui=none
  171. hi StatusLine ctermbg=0 ctermfg=15 guibg=#8fa5d1 guifg=fg gui=bold
  172. hi StatusLineNC ctermbg=7 ctermfg=0 guibg=#a6b7db guifg=fg gui=none
  173. hi TabLine guibg=#b8c6e2 guifg=fg gui=underline
  174. hi TabLineFill guibg=#b8c6e2 guifg=fg gui=underline
  175. hi VertSplit ctermbg=7 ctermfg=0 guibg=#a6b7db guifg=fg gui=none
  176. endif
  177. hi Cursor guibg=#883400 guifg=bg gui=none
  178. hi DiffAdd guibg=#008b00 guifg=#ffffff gui=none
  179. hi DiffChange guibg=#00008b guifg=#ffffff gui=none
  180. hi DiffDelete guibg=#8b0000 guifg=#ffffff gui=none
  181. hi DiffText guibg=#0000cd guifg=#ffffff gui=bold
  182. hi Directory guibg=bg guifg=#0000f0 gui=none
  183. hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold
  184. hi IncSearch guibg=#ffcd78 gui=none
  185. hi ModeMsg ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold
  186. hi PmenuSel guibg=#ffff00 guifg=#000000 gui=none
  187. hi Question guibg=bg guifg=#813f11 gui=bold
  188. hi Search guibg=#a0f0a0 gui=none
  189. hi SpecialKey guibg=bg guifg=#912f11 gui=none
  190. if has("spell")
  191. hi SpellBad guisp=#ee2c2c gui=undercurl
  192. hi SpellCap guisp=#2c2cee gui=undercurl
  193. hi SpellLocal guisp=#008b8b gui=undercurl
  194. hi SpellRare guisp=#ee2cee gui=undercurl
  195. endif
  196. hi TabLineSel guibg=bg guifg=fg gui=bold
  197. hi Title guifg=fg gui=bold
  198. if version >= 700
  199. hi Visual ctermbg=7 ctermfg=0 guibg=#c4c4c4 gui=none
  200. else
  201. hi Visual ctermbg=7 ctermfg=0 guibg=#c4c4c4 guifg=fg gui=none
  202. endif
  203. hi VisualNOS ctermbg=8 ctermfg=0 guibg=bg guifg=#a0a0a0 gui=bold,underline
  204. hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold
  205. hi WildMenu guibg=#ffff00 guifg=fg gui=bold
  206. hi Comment guibg=bg guifg=#786000 gui=none
  207. hi Constant guibg=bg guifg=#077807 gui=none
  208. hi Error guibg=bg guifg=#ee2c2c gui=none
  209. hi Identifier guibg=bg guifg=#007080 gui=none
  210. hi Ignore guibg=bg guifg=bg gui=none
  211. hi lCursor guibg=#008000 guifg=#ffffff gui=none
  212. hi MatchParen guibg=#00ffff gui=none
  213. hi PreProc guibg=bg guifg=#800090 gui=none
  214. hi Special guibg=bg guifg=#912f11 gui=none
  215. hi Statement guibg=bg guifg=#1f3f81 gui=bold
  216. hi Todo guibg=#ffff00 guifg=fg gui=none
  217. hi Type guibg=bg guifg=#912f11 gui=bold
  218. hi Underlined ctermbg=15 ctermfg=0 guibg=bg guifg=#0000cd gui=underline
  219. hi htmlBold ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold
  220. hi htmlBoldItalic ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold,italic
  221. hi htmlBoldUnderline ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold,underline
  222. hi htmlBoldUnderlineItalic ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold,underline,italic
  223. hi htmlItalic ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=italic
  224. hi htmlUnderline ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=underline
  225. hi htmlUnderlineItalic ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=underline,italic
  226. endif
  227. hi! default link bbcodeBold htmlBold
  228. hi! default link bbcodeBoldItalic htmlBoldItalic
  229. hi! default link bbcodeBoldItalicUnderline htmlBoldUnderlineItalic
  230. hi! default link bbcodeBoldUnderline htmlBoldUnderline
  231. hi! default link bbcodeItalic htmlItalic
  232. hi! default link bbcodeItalicUnderline htmlUnderlineItalic
  233. hi! default link bbcodeUnderline htmlUnderline