self-bootstrapping vimrc's
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

545 lines
19 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. filetype plugin indent on
  2. filetype on
  3. hi clear
  4. if exists('syntax on')
  5. syntax reset
  6. endif
  7. let g:mapleader=" "
  8. set backspace=indent,eol,start
  9. " options
  10. set nu
  11. set rnu
  12. set mouse+=a
  13. set linebreak
  14. set shiftwidth=2
  15. set tabstop=2
  16. set softtabstop=2
  17. set expandtab
  18. set smarttab
  19. set shiftround
  20. set autoindent
  21. set textwidth=80
  22. set colorcolumn=80
  23. set nowrap
  24. set undodir=~/.vim/undofiles
  25. set undofile nohlsearch incsearch
  26. set scrolloff=7
  27. set wildmode=longest,list,full
  28. set wildmenu
  29. autocmd FileType tex,text set nosmarttab autoindent
  30. autocmd Filetype python set textwidth=0 formatprg=autopep8 shiftwidth=4 tabstop=4 softtabstop=4
  31. autocmd FileType c,cpp,slang set nosmarttab autoindent
  32. autocmd Filetype markdown set nosmarttab shiftwidth=4 tabstop=4 softtabstop=4 autoindent
  33. autocmd BufReadPost *
  34. \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
  35. \ | exe "normal! g`\""
  36. \ | endif
  37. " Remaps
  38. nnoremap <C-h> <C-w>h
  39. nnoremap <C-j> <C-w>j
  40. nnoremap <C-k> <C-w>k
  41. nnoremap <C-l> <C-w>l
  42. nnoremap <C-h> <C-w>h
  43. nnoremap <C-j> <C-w>j
  44. nnoremap <C-k> <C-w>k
  45. nnoremap <C-l> <C-w>l
  46. inoremap <A-a> ā
  47. inoremap <A-e> ē
  48. inoremap <A-i> ī
  49. inoremap <A-o> ō
  50. inoremap <A-u> ū
  51. nnoremap <F12> :w<BAR>:!texbld run compile<CR>
  52. nnoremap <F5> :w<BAR>:!./test.sh<CR>
  53. vnoremap J :m '>+1<CR>gv=gv
  54. vnoremap K :m '<-2<CR>gv=gv
  55. nnoremap J mzJ`z
  56. nnoremap <C-d> <C-d>zz
  57. nnoremap <C-u> <C-u>zz
  58. nnoremap n nzzzv
  59. nnoremap N Nzzzv
  60. xnoremap <leader>p _dP
  61. vnoremap <leader>y +y
  62. nnoremap <leader>y +y
  63. nnoremap <leader>Y +Y
  64. nnoremap <leader>x :!chmod +x %:p<CR>
  65. nnoremap <leader>X :!chmod -x %<CR>
  66. nnoremap <leader>e :! %:p<CR>
  67. nnoremap <C-n> :Lexplore<CR>
  68. nnoremap <leader>pv :Explore<CR>
  69. " ex mode
  70. map q: <Nop>
  71. nnoremap Q <nop>
  72. set termguicolors
  73. let g:seoul256_background = 233
  74. autocmd! User GoyoEnter Limelight
  75. autocmd! User GoyoLeave Limelight!
  76. let g:airline_theme = "seoul256"
  77. let g:airline_powerline_fonts = 1
  78. let g:airline#extensions#tabline#enabled = 1
  79. "===================COLORSCHEME======================================
  80. " " _____ _ ___ ___ ___ "
  81. " " | __|___ ___ _ _| |_ | _| _| "
  82. " " |__ | -_| . | | | | _|_ | . | "
  83. " " |_____|___|___|___|_|___|___|___|.vim "
  84. "
  85. " " Low-contrast dark Vim color scheme using Seoul Colors "
  86. "
  87. " File: seoul256.vim
  88. " URL: github.com/junegunn/seoul256.vim
  89. " Author: Junegunn Choi (junegunn.c@gmail.com)
  90. " License: MIT
  91. "
  92. " Copyright (c) 2017 Junegunn Choi
  93. "
  94. " MIT License
  95. "
  96. " Permission is hereby granted, free of charge, to any person obtaining
  97. " a copy of this software and associated documentation files (the
  98. " "Software"), to deal in the Software without restriction, including
  99. " without limitation the rights to use, copy, modify, merge, publish,
  100. " distribute, sublicense, and/or sell copies of the Software, and to
  101. " permit persons to whom the Software is furnished to do so, subject to
  102. " the following conditions:
  103. "
  104. " The above copyright notice and this permission notice shall be
  105. " included in all copies or substantial portions of the Software.
  106. "
  107. " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  108. " EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  109. " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  110. " NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  111. " LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  112. " OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  113. " WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  114. if !exists('s:rgb_map')
  115. if get(g:, 'seoul256_srgb', 0)
  116. let s:rgb_map =
  117. \{ 16: '#000000', 17: '#00005f', 18: '#000087',
  118. \ 19: '#0000af', 20: '#0000d7', 21: '#0000ff',
  119. \ 22: '#005f00', 23: '#005f5f', 24: '#005f87',
  120. \ 25: '#005faf', 26: '#005fd7', 27: '#005fff',
  121. \ 28: '#008700', 29: '#00875f', 30: '#008787',
  122. \ 31: '#0087af', 32: '#0087d7', 33: '#0087ff',
  123. \ 34: '#00af00', 35: '#00af5f', 36: '#00af87',
  124. \ 37: '#00afaf', 38: '#00afd7', 39: '#00afff',
  125. \ 40: '#00d700', 41: '#00d75f', 42: '#00d787',
  126. \ 43: '#00d7af', 44: '#00d7d7', 45: '#00d7ff',
  127. \ 46: '#00ff00', 47: '#00ff5f', 48: '#00ff87',
  128. \ 49: '#00ffaf', 50: '#00ffd7', 51: '#00ffff',
  129. \ 52: '#5f0000', 53: '#5f005f', 54: '#5f0087',
  130. \ 55: '#5f00af', 56: '#5f00d7', 57: '#5f00ff',
  131. \ 58: '#5f5f00', 59: '#5f5f5f', 60: '#5f5f87',
  132. \ 61: '#5f5faf', 62: '#5f5fd7', 63: '#5f5fff',
  133. \ 64: '#5f8700', 65: '#5f875f', 66: '#5f8787',
  134. \ 67: '#5f87af', 68: '#5f87d7', 69: '#5f87ff',
  135. \ 70: '#5faf00', 71: '#5faf5f', 72: '#5faf87',
  136. \ 73: '#5fafaf', 74: '#5fafd7', 75: '#5fafff',
  137. \ 76: '#5fd700', 77: '#5fd75f', 78: '#5fd787',
  138. \ 79: '#5fd7af', 80: '#5fd7d7', 81: '#5fd7ff',
  139. \ 82: '#5fff00', 83: '#5fff5f', 84: '#5fff87',
  140. \ 85: '#5fffaf', 86: '#5fffd7', 87: '#5fffff',
  141. \ 88: '#870000', 89: '#87005f', 90: '#870087',
  142. \ 91: '#8700af', 92: '#8700d7', 93: '#8700ff',
  143. \ 94: '#875f00', 95: '#875f5f', 96: '#875f87',
  144. \ 97: '#875faf', 98: '#875fd7', 99: '#875fff',
  145. \ 100: '#878700', 101: '#87875f', 102: '#878787',
  146. \ 103: '#8787af', 104: '#8787d7', 105: '#8787ff',
  147. \ 106: '#87af00', 107: '#87af5f', 108: '#87af87',
  148. \ 109: '#87afaf', 110: '#87afd7', 111: '#87afff',
  149. \ 112: '#87d700', 113: '#87d75f', 114: '#87d787',
  150. \ 115: '#87d7af', 116: '#87d7d7', 117: '#87d7ff',
  151. \ 118: '#87ff00', 119: '#87ff5f', 120: '#87ff87',
  152. \ 121: '#87ffaf', 122: '#87ffd7', 123: '#87ffff',
  153. \ 124: '#af0000', 125: '#af005f', 126: '#af0087',
  154. \ 127: '#af00af', 128: '#af00d7', 129: '#af00ff',
  155. \ 130: '#af5f00', 131: '#af5f5f', 132: '#af5f87',
  156. \ 133: '#af5faf', 134: '#af5fd7', 135: '#af5fff',
  157. \ 136: '#af8700', 137: '#af875f', 138: '#af8787',
  158. \ 139: '#af87af', 140: '#af87d7', 141: '#af87ff',
  159. \ 142: '#afaf00', 143: '#afaf5f', 144: '#afaf87',
  160. \ 145: '#afafaf', 146: '#afafd7', 147: '#afafff',
  161. \ 148: '#afd700', 149: '#afd75f', 150: '#afd787',
  162. \ 151: '#afd7af', 152: '#afd7d7', 153: '#afd7ff',
  163. \ 154: '#afff00', 155: '#afff5f', 156: '#afff87',
  164. \ 157: '#afffaf', 158: '#afffd7', 159: '#afffff',
  165. \ 160: '#d70000', 161: '#d7005f', 162: '#d70087',
  166. \ 163: '#d700af', 164: '#d700d7', 165: '#d700ff',
  167. \ 166: '#d75f00', 167: '#d75f5f', 168: '#d75f87',
  168. \ 169: '#d75faf', 170: '#d75fd7', 171: '#d75fff',
  169. \ 172: '#d78700', 173: '#d7875f', 174: '#d78787',
  170. \ 175: '#d787af', 176: '#d787d7', 177: '#d787ff',
  171. \ 178: '#d7af00', 179: '#d7af5f', 180: '#d7af87',
  172. \ 181: '#d7afaf', 182: '#d7afd7', 183: '#d7afff',
  173. \ 184: '#d7d700', 185: '#d7d75f', 186: '#d7d787',
  174. \ 187: '#d7d7af', 188: '#d7d7d7', 189: '#d7d7ff',
  175. \ 190: '#d7ff00', 191: '#d7ff5f', 192: '#d7ff87',
  176. \ 193: '#d7ffaf', 194: '#d7ffd7', 195: '#d7ffff',
  177. \ 196: '#ff0000', 197: '#ff005f', 198: '#ff0087',
  178. \ 199: '#ff00af', 200: '#ff00d7', 201: '#ff00ff',
  179. \ 202: '#ff5f00', 203: '#ff5f5f', 204: '#ff5f87',
  180. \ 205: '#ff5faf', 206: '#ff5fd7', 207: '#ff5fff',
  181. \ 208: '#ff8700', 209: '#ff875f', 210: '#ff8787',
  182. \ 211: '#ff87af', 212: '#ff87d7', 213: '#ff87ff',
  183. \ 214: '#ffaf00', 215: '#ffaf5f', 216: '#ffaf87',
  184. \ 217: '#ffafaf', 218: '#ffafd7', 219: '#ffafff',
  185. \ 220: '#ffd700', 221: '#ffd75f', 222: '#ffd787',
  186. \ 223: '#ffd7af', 224: '#ffd7d7', 225: '#ffd7ff',
  187. \ 226: '#ffff00', 227: '#ffff5f', 228: '#ffff87',
  188. \ 229: '#ffffaf', 230: '#ffffd7', 231: '#ffffff',
  189. \ 232: '#080808', 233: '#121212', 234: '#1c1c1c',
  190. \ 235: '#262626', 236: '#303030', 237: '#3a3a3a',
  191. \ 238: '#444444', 239: '#4e4e4e', 240: '#585858',
  192. \ 241: '#626262', 242: '#6c6c6c', 243: '#767676',
  193. \ 244: '#808080', 245: '#8a8a8a', 246: '#949494',
  194. \ 247: '#9e9e9e', 248: '#a8a8a8', 249: '#b2b2b2',
  195. \ 250: '#bcbcbc', 251: '#c6c6c6', 252: '#d0d0d0',
  196. \ 253: '#dadada', 254: '#e4e4e4', 255: '#eeeeee' }
  197. else
  198. let s:rgb_map = { 16: '#000000',
  199. \ 22: '#006F00', 23: '#007173', 24: '#007299', 25: '#0074BE', 30: '#009799',
  200. \ 31: '#0099BD', 38: '#00BDDF', 52: '#730B00', 58: '#727100', 59: '#727272',
  201. \ 65: '#719872', 66: '#719899', 67: '#7299BC', 68: '#719CDF', 73: '#6FBCBD',
  202. \ 74: '#70BDDF', 88: '#9B1300', 89: '#9B1D72', 94: '#9A7200', 95: '#9A7372',
  203. \ 96: '#9A7599', 101: '#999872', 103: '#999ABD', 108: '#98BC99', 109: '#98BCBD',
  204. \ 110: '#98BEDE', 116: '#97DDDF', 125: '#BF2172', 131: '#BE7572', 137: '#BE9873',
  205. \ 143: '#BDBB72', 144: '#BDBC98', 145: '#BDBDBD', 151: '#BCDDBD', 152: '#BCDEDE',
  206. \ 153: '#BCE0FF', 161: '#E12672', 168: '#E17899', 173: '#E19972', 174: '#E09B99',
  207. \ 179: '#DFBC72', 181: '#E0BEBC', 184: '#DEDC00', 186: '#DEDD99', 187: '#DFDEBD',
  208. \ 189: '#DFDFFF', 216: '#FFBD98', 217: '#FFBFBD', 218: '#FFC0DE', 220: '#FFDD00',
  209. \ 222: '#FFDE99', 224: '#FFDFDF', 230: '#FFFFDF', 231: '#FFFFFF', 232: '#060606',
  210. \ 233: '#171717', 234: '#252525', 235: '#333233', 236: '#3F3F3F', 237: '#4B4B4B',
  211. \ 238: '#565656', 239: '#616161', 240: '#6B6B6B', 241: '#757575', 249: '#BFBFBF',
  212. \ 250: '#C8C8C8', 251: '#D1D0D1', 252: '#D9D9D9', 253: '#E1E1E1', 254: '#E9E9E9',
  213. \ 255: '#F1F1F1' }
  214. endif
  215. endif
  216. let s:background = &background
  217. let s:colors_name = get(g:, 'colors_name', '')
  218. silent! unlet s:style s:seoul256_background
  219. " 1. If g:seoul256_background is found
  220. if exists('g:seoul256_background')
  221. let s:seoul256_background = g:seoul256_background
  222. if s:seoul256_background >= 233 && s:seoul256_background <= 239
  223. let s:style = 'dark'
  224. elseif s:seoul256_background >= 252 && s:seoul256_background <= 256
  225. let s:style = 'light'
  226. else
  227. unlet s:seoul256_background
  228. endif
  229. endif
  230. if !exists('s:style')
  231. " 2. If g:colors_name is NOT 'seoul256' -> dark version
  232. if s:colors_name != 'seoul256'
  233. let s:style = 'dark'
  234. " 3. Follow &background setting
  235. else
  236. let s:style = &background
  237. endif
  238. endif
  239. let s:style_idx = s:style == 'light'
  240. " Background colors
  241. if s:style == 'dark'
  242. let s:dark_bg = get(s:, 'seoul256_background', 237)
  243. let s:light_bg = 253
  244. else
  245. let s:dark_bg = 237
  246. let s:light_bg = get(s:, 'seoul256_background', 253)
  247. endif
  248. let s:dark_bg_2 = s:dark_bg > 233 ? s:dark_bg - 2 : 16
  249. let s:light_bg_1 = min([s:light_bg + 1, 256])
  250. let s:light_bg_2 = min([s:light_bg + 2, 256])
  251. " Foreground colors
  252. let s:dark_fg = 252
  253. let s:light_fg = 239
  254. function! s:hi(item, fg, bg)
  255. let fg = a:fg[s:style_idx] > 255 ? 231 : a:fg[s:style_idx]
  256. let bg = a:bg[s:style_idx] > 255 ? 231 : a:bg[s:style_idx]
  257. if !empty(fg)
  258. execute printf("highlight %s ctermfg=%s guifg=%s", a:item, fg, get(s:rgb_map, fg, 'NONE'))
  259. endif
  260. if !empty(bg)
  261. execute printf("highlight %s ctermbg=%s guibg=%s", a:item, bg, get(s:rgb_map, bg, 'NONE'))
  262. endif
  263. endfunction
  264. let s:gui = has('gui_running')
  265. if !s:gui
  266. set t_Co=256
  267. end
  268. silent! unlet g:colors_name
  269. hi clear
  270. if exists("syntax_on")
  271. syntax reset
  272. endif
  273. call s:hi('Normal', [s:dark_fg, s:light_fg], [s:dark_bg, s:light_bg])
  274. call s:hi('LineNr', [101, 101], [s:dark_bg + 1, s:light_bg - 2])
  275. call s:hi('Visual', ['', ''], [23, 152])
  276. call s:hi('VisualNOS', ['', ''], [23, 152])
  277. call s:hi('Comment', [65, 65], ['', ''])
  278. call s:hi('Number', [222, 95], ['', ''])
  279. call s:hi('Float', [222, 95], ['', ''])
  280. call s:hi('Boolean', [103, 168], ['', ''])
  281. call s:hi('String', [109, 30], ['', ''])
  282. call s:hi('Constant', [73, 23], ['', ''])
  283. call s:hi('Character', [174, 168], ['', ''])
  284. call s:hi('Delimiter', [137, 94], ['', ''])
  285. call s:hi('StringDelimiter', [137, 94], ['', ''])
  286. call s:hi('Statement', [108, 66], ['', ''])
  287. " case, default, etc.
  288. " hi Label ctermfg=
  289. " if else end
  290. call s:hi('Conditional', [110, 31], ['', ''])
  291. " while end
  292. call s:hi('Repeat', [68, 67], ['', ''])
  293. call s:hi('Todo', [161, 125], [s:dark_bg_2, s:light_bg_2])
  294. call s:hi('Function', [187, 58], ['', ''])
  295. " Macros
  296. call s:hi('Define', [173, 131], ['', ''])
  297. call s:hi('Macro', [173, 131], ['', ''])
  298. call s:hi('Include', [173, 131], ['', ''])
  299. call s:hi('PreCondit', [173, 131], ['', ''])
  300. " #!
  301. call s:hi('PreProc', [143, 58], ['', ''])
  302. " @abc
  303. call s:hi('Identifier', [217, 96], ['', ''])
  304. " AAA Abc
  305. call s:hi('Type', [179, 94], ['', ''])
  306. " + - * / <<
  307. call s:hi('Operator', [186, 131], ['', ''])
  308. " super yield
  309. call s:hi('Keyword', [168, 168], ['', ''])
  310. " raise
  311. call s:hi('Exception', [161, 161], ['', ''])
  312. "
  313. " hi StorageClass ctermfg=
  314. call s:hi('Structure', [116, 23], ['', ''])
  315. " hi Typedef ctermfg=
  316. call s:hi('Error', [s:dark_fg, s:light_bg_1], [52, 174])
  317. call s:hi('ErrorMsg', [s:dark_fg, s:light_bg_1], [52, 168])
  318. call s:hi('Underlined', [181, 168], ['', ''])
  319. " set textwidth=80
  320. " set colorcolumn=+1
  321. call s:hi('ColorColumn', ['', ''], [s:dark_bg - 1, s:light_bg - 2])
  322. " GVIM only
  323. " hi Cursor ctermfg=
  324. " hi CursorIM ctermfg=
  325. " set cursorline cursorcolumn
  326. call s:hi('CursorLine', ['', ''], [s:dark_bg - 1, s:light_bg - 1])
  327. call s:hi('CursorLineNr', [131, 131], [s:dark_bg - 1, s:light_bg - 1])
  328. call s:hi('CursorColumn', ['', ''], [s:dark_bg - 1, s:light_bg - 1])
  329. call s:hi('NormalFloat', ['', ''], [s:dark_bg - 1, s:light_bg - 1])
  330. call s:hi('Directory', [187, 95], ['', ''])
  331. call s:hi('DiffAdd', ['NONE', 'NONE'], [22, 151])
  332. call s:hi('DiffDelete', ['NONE', 'NONE'], [95, 181])
  333. call s:hi('DiffChange', ['NONE', 'NONE'], [s:dark_bg + 3, 189])
  334. call s:hi('DiffText', ['NONE', 'NONE'], [52, 224])
  335. call s:hi('VertSplit', [s:dark_bg_2, s:light_bg - 3], [s:dark_bg_2, s:light_bg - 3])
  336. call s:hi('Folded', [101, 101], [s:dark_bg + 1, s:light_bg - 2])
  337. " set foldcolumn=1
  338. call s:hi('FoldColumn', [144, 94], [s:dark_bg + 1, s:light_bg - 2])
  339. call s:hi('MatchParen', ['', ''], [s:dark_bg + 3, s:light_bg - 3])
  340. " -- INSERT --
  341. call s:hi('ModeMsg', [173, 173], ['', ''])
  342. " let &showbreak = '> '
  343. call s:hi('NonText', [59, 145], ['', ''])
  344. call s:hi('MoreMsg', [173, 173], ['', ''])
  345. " Popup menu
  346. call s:hi('Pmenu', [s:dark_fg, s:light_fg], [s:dark_bg + 1, s:light_bg - 2])
  347. call s:hi('PmenuSel', [s:dark_fg, s:dark_fg], [95, 95])
  348. call s:hi('PmenuSbar', ['', ''], [65, 65])
  349. call s:hi('PmenuThumb', ['', ''], [23, 23])
  350. call s:hi('Search', [s:dark_fg, 255], [24, 74])
  351. call s:hi('IncSearch', [220, 220], [s:dark_bg + 1, 238])
  352. " String delimiter, interpolation
  353. call s:hi('Special', [216, 173], ['', ''])
  354. " hi SpecialChar ctermfg=
  355. " hi SpecialComment ctermfg=
  356. " hi Tag ctermfg=
  357. " hi Debug ctermfg=
  358. " :map, listchars
  359. call s:hi('SpecialKey', [59, 145], ['', ''])
  360. if !s:gui
  361. " Red / Blue / Cyan / Magenta
  362. if s:style_idx == 0
  363. hi SpellBad ctermbg=NONE cterm=underline ctermfg=168
  364. hi SpellCap ctermbg=NONE cterm=underline ctermfg=110
  365. hi SpellLocal ctermbg=NONE cterm=underline ctermfg=153
  366. hi SpellRare ctermbg=NONE cterm=underline ctermfg=218
  367. else
  368. hi SpellBad ctermbg=NONE cterm=underline ctermfg=125
  369. hi SpellCap ctermbg=NONE cterm=underline ctermfg=25
  370. hi SpellLocal ctermbg=NONE cterm=underline ctermfg=31
  371. hi SpellRare ctermbg=NONE cterm=underline ctermfg=96
  372. endif
  373. else
  374. if s:style_idx == 0
  375. execute 'hi SpellBad gui=undercurl guisp=' . s:rgb_map[168]
  376. execute 'hi SpellCap gui=undercurl guisp=' . s:rgb_map[110]
  377. execute 'hi SpellLocal gui=undercurl guisp=' . s:rgb_map[153]
  378. execute 'hi SpellRare gui=undercurl guisp=' . s:rgb_map[218]
  379. else
  380. execute 'hi SpellBad gui=undercurl guisp=' . s:rgb_map[125]
  381. execute 'hi SpellCap gui=undercurl guisp=' . s:rgb_map[25]
  382. execute 'hi SpellLocal gui=undercurl guisp=' . s:rgb_map[31]
  383. execute 'hi SpellRare gui=undercurl guisp=' . s:rgb_map[96]
  384. endif
  385. endif
  386. "
  387. call s:hi('StatusLine', [95, 95], [187, 187])
  388. call s:hi('StatusLineNC', [s:dark_bg + 2, s:light_bg - 2], [187, 238])
  389. call s:hi('StatusLineTerm', [95, 95], [187, 187])
  390. call s:hi('StatusLineTermNC', [s:dark_bg + 2, s:light_bg - 2], [187, 238])
  391. hi StatusLineTerm cterm=bold,reverse gui=bold,reverse
  392. hi StatusLineTermNC cterm=bold,reverse gui=bold,reverse
  393. call s:hi('TabLineFill', [s:dark_bg + 2, s:light_bg - 2], ['', ''])
  394. call s:hi('TabLineSel', [187, 187], [23, 66])
  395. call s:hi('TabLine', [s:dark_bg + 12, s:light_bg - 12], [s:dark_bg + 4, s:light_bg - 4])
  396. call s:hi('WildMenu', [95, 95], [184, 184])
  397. " :set all
  398. call s:hi('Title', [181, 88], ['', ''])
  399. " TODO
  400. call s:hi('Question', [179, 88], ['', ''])
  401. " Search hit bottom
  402. call s:hi('WarningMsg', [179, 88], ['', ''])
  403. " Sign column
  404. call s:hi('SignColumn', [173, 173], [s:dark_bg, s:light_bg])
  405. " Diff
  406. call s:hi('diffAdded', [108, 65], ['', ''])
  407. call s:hi('diffRemoved', [174, 131], ['', ''])
  408. hi link diffLine Constant
  409. call s:hi('Conceal', [s:dark_fg + 2, s:light_fg - 2], [s:dark_bg - 1, s:light_bg + 2])
  410. call s:hi('Ignore', [s:dark_bg + 3, s:light_bg - 3], [s:dark_bg, s:light_bg])
  411. """""""""""""""""""""""""""""""""""""""""""""""""
  412. " Plugins
  413. """""""""""""""""""""""""""""""""""""""""""""""""
  414. " vim-indent-guides
  415. " -----------------
  416. let g:indent_guides_auto_colors = 0
  417. call s:hi('IndentGuidesOdd', ['', ''], [s:dark_bg - 1, s:light_bg + 1])
  418. call s:hi('IndentGuidesEven', ['', ''], [s:dark_bg + 1, s:light_bg - 1])
  419. " vim-gitgutter
  420. " -------------
  421. call s:hi('GitGutterAdd', [108, 65], [s:dark_bg + 1, s:light_bg - 2])
  422. call s:hi('GitGutterChange', [68, 68], [s:dark_bg + 1, s:light_bg - 2])
  423. call s:hi('GitGutterDelete', [161, 161], [s:dark_bg + 1, s:light_bg - 2])
  424. call s:hi('GitGutterChangeDelete', [168, 168], [s:dark_bg + 1, s:light_bg - 2])
  425. " ale
  426. " ---
  427. call s:hi('ALEErrorSign', [161, 161], [s:dark_bg, s:light_bg])
  428. call s:hi('ALEWarningSign', [174, 131], [s:dark_bg, s:light_bg])
  429. " vim-signify
  430. " -----------
  431. call s:hi('SignifySignAdd', [108, 65], [s:dark_bg + 1, s:light_bg - 2])
  432. call s:hi('SignifySignChange', [68, 68], [s:dark_bg + 1, s:light_bg - 2])
  433. call s:hi('SignifySignDelete', [161, 161], [s:dark_bg + 1, s:light_bg - 2])
  434. " coc.nvim
  435. " --------
  436. call s:hi('CocFloating', [s:dark_fg, s:light_fg], [s:dark_bg_2, s:light_bg - 2])
  437. " http://vim.wikia.com/wiki/Highlight_unwanted_spaces
  438. " ---------------------------------------------------^^^^^
  439. call s:hi('ExtraWhitespace', ['', ''], [s:dark_bg - 1, s:light_bg - 2])
  440. " vim-ruby
  441. " --------
  442. " " rubySymbol
  443. let ruby_operators = 1
  444. call s:hi('rubyClass', [31, 31], ['', ''])
  445. " call s:hi('rubyInstanceVariable', [189, 189], ['', ''])
  446. call s:hi('rubyRegexp', [186, 101], ['', ''])
  447. call s:hi('rubyRegexpDelimiter', [168, 168], ['', ''])
  448. call s:hi('rubyArrayDelimiter', [67, 38], ['', ''])
  449. call s:hi('rubyBlockParameterList', [186, 94], ['', ''])
  450. call s:hi('rubyCurlyBlockDelimiter', [144, 101], ['', ''])
  451. " ARGV $stdout
  452. call s:hi('rubyPredefinedIdentifier', [230, 52], ['', ''])
  453. " hi rubyRegexpSpecial
  454. hi CursorLine cterm=NONE
  455. hi CursorLineNr cterm=NONE
  456. let g:seoul256_current_fg = [s:dark_fg, s:light_fg][s:style_idx]
  457. let g:seoul256_current_bg = [s:dark_bg, s:light_bg][s:style_idx]
  458. let g:colors_name = 'seoul256'
  459. if s:colors_name != g:colors_name || s:background == s:style
  460. let &background = s:style
  461. else
  462. let &background = s:background
  463. endif