PageRenderTime 24ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/colors/inori.vim

https://gitlab.com/ngurajeka/vim-config
Vim Script | 218 lines | 160 code | 28 blank | 30 comment | 2 complexity | 8f32761f88ec3bb7338a7e437665c06a MD5 | raw file
  1. " inori color scheme
  2. set background=dark
  3. hi clear
  4. if exists("syntax_on")
  5. syntax reset
  6. endif
  7. let colors_name = "inori"
  8. let g:inori_colors = {}
  9. function! s:set_color(name, num, hex)
  10. let g:inori_colors[a:name] = [a:num, a:hex]
  11. endfunction
  12. " Noew set color board
  13. "
  14. call s:set_color("BLACK", 0, "#000000")
  15. call s:set_color("RED", 1, "#800000")
  16. call s:set_color("GREEN", 2, "#008000")
  17. call s:set_color("YELLOW", 3, "#808000")
  18. call s:set_color("BLUE", 4, "#000080")
  19. call s:set_color("MAGENTA", 5, "#800080")
  20. call s:set_color("CYAN", 6, "#008080")
  21. call s:set_color("WHITE", 7, "#c0c0c0")
  22. call s:set_color("BRIGHT_BLACK", 8, "#808080")
  23. call s:set_color("BRIGHT_RED", 9, "#ff0000")
  24. call s:set_color("BRIGHT_GREEN", 10, "#00ff00")
  25. call s:set_color("BRIGHT_YELLOW", 11, "#ffff00")
  26. call s:set_color("BRIGHT_BLUE", 12, "#0000ff")
  27. call s:set_color("BRIGHT_MAGENTA", 13, "#ff00ff")
  28. call s:set_color("BRIGHT_CYAN", 14, "#00ffff")
  29. call s:set_color("BRIGHT_WHITE", 15, "#ffffff")
  30. call s:set_color("NONE", "NONE", "NONE")
  31. " colors for syntax hightlight
  32. call s:set_color("ORANGE", 172, "#d78700")
  33. call s:set_color("DARK_ORANGE", 130, "#af5f00")
  34. call s:set_color("DARK_SEA_GREEN", 65, "#5f875f")
  35. call s:set_color("GREY", 235, "#262626")
  36. call s:set_color("DARK_MAGENTA", 133, "#af5faf")
  37. function! s:highlight(group, fg, bg, attr)
  38. let fg = g:inori_colors[a:fg]
  39. let bg = g:inori_colors[a:bg]
  40. exec "hi " . a:group . " guifg=" . fg[1]
  41. exec "hi " . a:group . " ctermfg=" . fg[0]
  42. exec "hi " . a:group . " guibg=" . bg[1]
  43. exec "hi " . a:group . " ctermbg=" . bg[0]
  44. exec "hi " . a:group . " gui=" . a:attr
  45. exec "hi " . a:group . " cterm=" . a:attr
  46. endfunction
  47. " General colors
  48. call s:highlight("Normal", "WHITE", "GREY", "NONE")
  49. call s:highlight("NonText", "BRIGHT_BLACK", "NONE", "NONE")
  50. call s:highlight("SpecialKey", "NONE", "BRIGHT_BLACK", "NONE")
  51. "call s:highlight("Cursor", "GREY", "WHITE", "reverse")
  52. call s:highlight("LineNr", "BRIGHT_BLACK", "NONE", "NONE")
  53. call s:highlight("VertSplit", "BRIGHT_BLACK", "NONE", "NONE")
  54. call s:highlight("StatusLine", "WHITE", "BRIGHT_BLACK", "NONE")
  55. call s:highlight("StatusLineNC", "WHITE", "BRIGHT_BLACK", "NONE")
  56. call s:highlight("Folded", "BRIGHT_BLACK", "NONE", "NONE")
  57. call s:highlight("Title", "NONE", "NONE", "NONE")
  58. call s:highlight("Visual", "WHITE", "BRIGHT_BLACK", "NONE")
  59. call s:highlight("VisualNOS", "WHITE", "BRIGHT_BLACK", "NONE")
  60. call s:highlight("WildMenu", "GREY", "WHITE", "NONE")
  61. call s:highlight("PmenuSbar", "GREY", "WHITE", "NONE")
  62. "call s:highlight("Ignore", "NONE", "NONE", "NONE")
  63. call s:highlight("Error", "NONE", "RED", "NONE")
  64. call s:highlight("ErrorMsg", "NONE", "RED", "NONE")
  65. call s:highlight("WarningMsg", "NONE", "BRIGHT_RED", "NONE")
  66. " Message displayed in lower left, such as --INSERT--
  67. call s:highlight("ModeMsg", "CYAN", "NONE", "NONE")
  68. if version >= 700 " Vim 7.x specific colors
  69. call s:highlight("CursorLine", "BRIGHT_WHITE", "BRIGHT_BLACK", "NONE")
  70. call s:highlight("ColorColumn", "BRIGHT_WHITE", "BRIGHT_BLACK", "NONE")
  71. call s:highlight("CursorColumn", "NONE", "NONE", "NONE")
  72. call s:highlight("TabLine", "BRIGHT_BLACK", "NONE", "NONE")
  73. call s:highlight("TabLineFill", "NONE", "NONE", "NONE")
  74. call s:highlight("TabLineSel", "NONE", "NONE", "BOLD")
  75. call s:highlight("MatchParen", "CYAN", "NONE", "NONE")
  76. call s:highlight("Pmenu", "GREY", "BRIGHT_BLACK", "NONE")
  77. call s:highlight("PmenuSel", "GREY", "WHITE", "NONE")
  78. call s:highlight("Search", "NONE", "DARK_SEA_GREEN", "NONE")
  79. call s:highlight("NERDTreeExecFile", "WHITE", "GREY", "NONE")
  80. call s:highlight("NERDTreeClosable", "WHITE", "GREY", "NONE")
  81. call s:highlight("NERDTreeOpenable", "WHITE", "GREY", "NONE")
  82. endif
  83. " Syntax highlighting
  84. call s:highlight("Comment", "BRIGHT_BLACK", "NONE", "NONE")
  85. call s:highlight("String", "DARK_SEA_GREEN", "NONE", "NONE")
  86. call s:highlight("Number", "DARK_SEA_GREEN", "NONE", "NONE")
  87. call s:highlight("Keyword", "ORANGE", "NONE", "NONE")
  88. call s:highlight("Statement", "ORANGE", "NONE", "NONE")
  89. call s:highlight("PreProc", "ORANGE", "NONE", "NONE")
  90. call s:highlight("PreCondit", "BRIGHT_YELLOW", "NONE", "NONE")
  91. call s:highlight("Structure", "DARK_MAGENTA", "NONE", "NONE")
  92. call s:highlight("Todo", "DARK_MAGENTA", "NONE", "NONE")
  93. call s:highlight("Constant", "CYAN", "NONE", "NONE")
  94. call s:highlight("Identifier", "BRIGHT_RED", "NONE", "NONE")
  95. call s:highlight("Function", "BRIGHT_RED", "NONE", "NONE")
  96. call s:highlight("Class", "BRIGHT_RED", "NONE", "NONE")
  97. call s:highlight("Type", "DARK_ORANGE", "NONE", "NONE")
  98. call s:highlight("Special", "WHITE", "NONE", "NONE")
  99. call s:highlight("Delimiter", "WHITE", "NONE", "NONE")
  100. call s:highlight("Operator", "WHITE", "NONE", "NONE")
  101. call s:highlight("BLUE", "BLUE", "NONE", "NONE")
  102. call s:highlight("GREEN", "GREEN", "NONE", "NONE")
  103. call s:highlight("DarkGreen", "BRIGHT_GREEN", "NONE", "NONE")
  104. call s:highlight("Grey", "BRIGHT_BLACK", "NONE", "NONE")
  105. call s:highlight("Orange", "BRIGHT_RED", "NONE", "NONE")
  106. call s:highlight("RED", "RED", "NONE", "NONE")
  107. call s:highlight("WHITE", "BRIGHT_WHITE", "NONE", "NONE")
  108. call s:highlight("Gold", "ORANGE", "NONE", "NONE")
  109. call s:highlight("Purple", "DARK_MAGENTA", "NONE", "NONE")
  110. hi link Character Constant
  111. hi link Conditional Keyword
  112. hi link Boolean Constant
  113. hi link Float Number
  114. hi link Repeat Statement
  115. hi link Label Statement
  116. hi link Exception Statement
  117. hi link Include PreProc
  118. hi link Define PreProc
  119. hi link Macro PreProc
  120. hi link PreCondit PreProc
  121. hi link StorageClass Type
  122. hi link Typedef Type
  123. hi link Tag Special
  124. hi link SpecialChar Special
  125. hi link SpecialComment Special
  126. hi link Debug Special
  127. "" Special for HTML
  128. hi link htmlTagName Gold
  129. hi link htmlSpecialTagName Gold
  130. hi link htmlTag Gold
  131. hi link htmlEndTag Gold
  132. hi link htmlArg Orange
  133. hi link htmlLink Normal
  134. hi link javaScript Normal
  135. "" Special for PHP
  136. hi link phpVarSelector Purple
  137. hi link phpIdentifier Purple
  138. hi link phpType Red
  139. hi link phpRepeat Orange
  140. "" Special for Coffeescript
  141. "hi link inoriAssignSymbols White
  142. "hi link inoriSpecialVar Purple
  143. "hi link inoriObjAssign Gold
  144. hi link coffeeParens Gold
  145. "" Special for Javascript
  146. "hi link javaScriptNumber Number
  147. "hi link javaScriptPrototype Identifier " prototype
  148. "hi link javaScriptSource Keyword " import export
  149. "hi link javaScriptType Identifier " const this undefined var void yield
  150. "hi link javaScriptOperator Keyword " delete new in instanceof let typeof
  151. "hi link javaScriptBoolean Keyword " true false
  152. "hi link javaScriptNull Keyword " null
  153. "hi link javaScriptConditional Keyword " if else
  154. "hi link javaScriptRepeat Keyword " do while for
  155. "hi link javaScriptBranch Keyword " break continue switch case default return
  156. "hi link javaScriptStatement Keyword " try catch throw with finally
  157. "hi link javaScriptGlobalObjects Keyword " Array Boolean Date Function Infinity JavaArray JavaClass JavaObject JavaPackage Math Number NaN Object Packages RegExp String Undefined java netscape sun
  158. "hi shCommandSub ctermfg=white
  159. "" Sepcial for CSS
  160. hi link cssType Green
  161. hi link cssIdentifier Gold
  162. hi link cssClassName Orange
  163. hi link cssTagName Orange
  164. hi link cssBraces Normal
  165. hi link cssColor DarkGreen
  166. hi link cssCommonAttr Green
  167. hi link cssTextAttr Green
  168. hi link cssFontAttr Green
  169. hi link cssBoxAttr Green
  170. hi link cssRenderAttr Green
  171. hi link cssUIAttr Green
  172. hi link cssPseudoClass Orange
  173. hi link cssPseudoClassId Orange
  174. hi link cssSelectorOp Normal
  175. hi link cssSelectorOp2 Normal
  176. hi link cssMedia Orange
  177. hi link cssMediaType Green
  178. hi link cssBraces White
  179. hi link cssFontProp White
  180. hi link cssColorProp White
  181. hi link cssTextProp White
  182. hi link cssBoxProp White
  183. hi link cssRenderProp White
  184. hi link cssAuralProp White
  185. hi link cssRenderProp White
  186. hi link cssGeneratedContentProp White
  187. hi link cssPagingProp White
  188. hi link cssTableProp White
  189. hi link cssUIProp White
  190. hi link cssFontDescriptorProp White