update vim config, a few colorschemes to choose from

This commit is contained in:
2025-05-22 15:55:29 -04:00
parent 8be3c74003
commit 7b1b3aeb3d
11 changed files with 6658 additions and 92 deletions
+2 -1
View File
@@ -274,7 +274,8 @@ BASHRC
curl --output "${HOME}/.vim/autoload/plug.vim" --silent "https://raw.githubusercontent.com/junegunn/vim-plug/${version}/plug.vim"
cp "${script_dir}/config/vim-vimrc" "${HOME}/.vimrc"
cp "${script_dir}/config/vim-colorful256.vim" "${HOME}/.vim/colors/colorful256.vim"
cp "${script_dir}/config/vim-colors/*" "${HOME}/.vim/colors/"
cp "${script_dir}/config/vim-autoload/*" "${HOME}/.vim/autoload/"
vim +'PlugInstall --sync' +quitall
;;
+300
View File
@@ -0,0 +1,300 @@
" =============================================================================
" URL: https://github.com/sainnhe/everforest
" Filename: autoload/everforest.vim
" Author: sainnhe
" Email: i@sainnhe.dev
" License: MIT License
" =============================================================================
function! everforest#get_configuration() "{{{
return {
\ 'background': get(g:, 'everforest_background', 'medium'),
\ 'transparent_background': get(g:, 'everforest_transparent_background', 0),
\ 'dim_inactive_windows': get(g:, 'everforest_dim_inactive_windows', 0),
\ 'disable_italic_comment': get(g:, 'everforest_disable_italic_comment', 0),
\ 'enable_italic': get(g:, 'everforest_enable_italic', 0),
\ 'cursor': get(g:, 'everforest_cursor', 'auto'),
\ 'sign_column_background': get(g:, 'everforest_sign_column_background', 'none'),
\ 'spell_foreground': get(g:, 'everforest_spell_foreground', 'none'),
\ 'ui_contrast': get(g:, 'everforest_ui_contrast', 'low'),
\ 'show_eob': get(g:, 'everforest_show_eob', 1),
\ 'float_style': get(g:, 'everforest_float_style', 'bright'),
\ 'current_word': get(g:, 'everforest_current_word', get(g:, 'everforest_transparent_background', 0) == 0 ? 'grey background' : 'bold'),
\ 'inlay_hints_background': get(g:, 'everforest_inlay_hints_background', 'none'),
\ 'lightline_disable_bold': get(g:, 'everforest_lightline_disable_bold', 0),
\ 'diagnostic_text_highlight': get(g:, 'everforest_diagnostic_text_highlight', 0),
\ 'diagnostic_line_highlight': get(g:, 'everforest_diagnostic_line_highlight', 0),
\ 'diagnostic_virtual_text': get(g:, 'everforest_diagnostic_virtual_text', 'grey'),
\ 'disable_terminal_colors': get(g:, 'everforest_disable_terminal_colors', 0),
\ 'better_performance': get(g:, 'everforest_better_performance', 0),
\ 'colors_override': get(g:, 'everforest_colors_override', {}),
\ }
endfunction "}}}
function! everforest#get_palette(background, colors_override) "{{{
if a:background ==# 'hard' "{{{
if &background ==# 'dark'
let palette1 = {
\ 'bg_dim': ['#1e2326', '233'],
\ 'bg0': ['#272e33', '235'],
\ 'bg1': ['#2e383c', '236'],
\ 'bg2': ['#374145', '237'],
\ 'bg3': ['#414b50', '238'],
\ 'bg4': ['#495156', '239'],
\ 'bg5': ['#4f5b58', '240'],
\ 'bg_visual': ['#4c3743', '52'],
\ 'bg_red': ['#493b40', '52'],
\ 'bg_green': ['#3c4841', '22'],
\ 'bg_blue': ['#384b55', '17'],
\ 'bg_yellow': ['#45443c', '136'],
\ }
else
let palette1 = {
\ 'bg_dim': ['#f2efdf', '223'],
\ 'bg0': ['#fffbef', '230'],
\ 'bg1': ['#f8f5e4', '228'],
\ 'bg2': ['#f2efdf', '223'],
\ 'bg3': ['#edeada', '223'],
\ 'bg4': ['#e8e5d5', '223'],
\ 'bg5': ['#bec5b2', '223'],
\ 'bg_visual': ['#f0f2d4', '194'],
\ 'bg_red': ['#ffe7de', '217'],
\ 'bg_green': ['#f3f5d9', '194'],
\ 'bg_blue': ['#ecf5ed', '117'],
\ 'bg_yellow': ['#fef2d5', '226'],
\ }
endif "}}}
elseif a:background ==# 'medium' "{{{
if &background ==# 'dark'
let palette1 = {
\ 'bg_dim': ['#232a2e', '233'],
\ 'bg0': ['#2d353b', '235'],
\ 'bg1': ['#343f44', '236'],
\ 'bg2': ['#3d484d', '237'],
\ 'bg3': ['#475258', '238'],
\ 'bg4': ['#4f585e', '239'],
\ 'bg5': ['#56635f', '240'],
\ 'bg_visual': ['#543a48', '52'],
\ 'bg_red': ['#514045', '52'],
\ 'bg_green': ['#425047', '22'],
\ 'bg_blue': ['#3a515d', '17'],
\ 'bg_yellow': ['#4d4c43', '136'],
\ }
else
let palette1 = {
\ 'bg_dim': ['#efebd4', '223'],
\ 'bg0': ['#fdf6e3', '230'],
\ 'bg1': ['#f4f0d9', '228'],
\ 'bg2': ['#efebd4', '223'],
\ 'bg3': ['#e6e2cc', '223'],
\ 'bg4': ['#e0dcc7', '223'],
\ 'bg5': ['#bdc3af', '223'],
\ 'bg_visual': ['#eaedc8', '194'],
\ 'bg_red': ['#fbe3da', '217'],
\ 'bg_green': ['#f0f1d2', '194'],
\ 'bg_blue': ['#e9f0e9', '117'],
\ 'bg_yellow': ['#faedcd', '226'],
\ }
endif "}}}
else "{{{
if &background ==# 'dark'
let palette1 = {
\ 'bg_dim': ['#293136', '233'],
\ 'bg0': ['#333c43', '235'],
\ 'bg1': ['#3a464c', '236'],
\ 'bg2': ['#434f55', '237'],
\ 'bg3': ['#4d5960', '238'],
\ 'bg4': ['#555f66', '239'],
\ 'bg5': ['#5d6b66', '240'],
\ 'bg_visual': ['#5c3f4f', '52'],
\ 'bg_red': ['#59464c', '52'],
\ 'bg_green': ['#48584e', '22'],
\ 'bg_blue': ['#3f5865', '17'],
\ 'bg_yellow': ['#55544a', '136'],
\ }
else
let palette1 = {
\ 'bg_dim': ['#e5dfc5', '223'],
\ 'bg0': ['#f3ead3', '230'],
\ 'bg1': ['#eae4ca', '228'],
\ 'bg2': ['#e5dfc5', '223'],
\ 'bg3': ['#ddd8be', '223'],
\ 'bg4': ['#d8d3ba', '223'],
\ 'bg5': ['#b9c0ab', '223'],
\ 'bg_visual': ['#e1e4bd', '194'],
\ 'bg_red': ['#f4dbd0', '217'],
\ 'bg_green': ['#e5e6c5', '194'],
\ 'bg_blue': ['#e1e7dd', '117'],
\ 'bg_yellow': ['#f1e4c5', '226'],
\ }
endif
endif "}}}
if &background ==# 'dark' "{{{
let palette2 = {
\ 'fg': ['#d3c6aa', '223'],
\ 'red': ['#e67e80', '167'],
\ 'orange': ['#e69875', '208'],
\ 'yellow': ['#dbbc7f', '214'],
\ 'green': ['#a7c080', '142'],
\ 'aqua': ['#83c092', '108'],
\ 'blue': ['#7fbbb3', '109'],
\ 'purple': ['#d699b6', '175'],
\ 'grey0': ['#7a8478', '243'],
\ 'grey1': ['#859289', '245'],
\ 'grey2': ['#9da9a0', '247'],
\ 'statusline1':['#a7c080', '142'],
\ 'statusline2':['#d3c6aa', '223'],
\ 'statusline3':['#e67e80', '167'],
\ 'none': ['NONE', 'NONE']
\ } "}}}
else "{{{
let palette2 = {
\ 'fg': ['#5c6a72', '242'],
\ 'red': ['#f85552', '160'],
\ 'orange': ['#f57d26', '116'],
\ 'yellow': ['#dfa000', '136'],
\ 'green': ['#8da101', '106'],
\ 'aqua': ['#35a77c', '37'],
\ 'blue': ['#3a94c5', '32'],
\ 'purple': ['#df69ba', '162'],
\ 'grey0': ['#a6b0a0', '247'],
\ 'grey1': ['#939f91', '247'],
\ 'grey2': ['#829181', '247'],
\ 'statusline1':['#93b259', '106'],
\ 'statusline2':['#708089', '242'],
\ 'statusline3':['#e66868', '160'],
\ 'none': ['NONE', 'NONE']
\ }
endif "}}}
return extend(extend(palette1, palette2), a:colors_override)
endfunction "}}}
function! everforest#highlight(group, fg, bg, ...) "{{{
execute 'highlight' a:group
\ 'guifg=' . a:fg[0]
\ 'guibg=' . a:bg[0]
\ 'ctermfg=' . a:fg[1]
\ 'ctermbg=' . a:bg[1]
\ 'gui=' . (a:0 >= 1 ?
\ a:1 :
\ 'NONE')
\ 'cterm=' . (a:0 >= 1 ?
\ a:1 :
\ 'NONE')
\ 'guisp=' . (a:0 >= 2 ?
\ a:2[0] :
\ 'NONE')
endfunction "}}}
function! everforest#syn_gen(path, last_modified, msg) "{{{
" Generate the `after/syntax` directory.
let full_content = join(readfile(a:path), "\n") " Get the content of `colors/everforest.vim`
let syn_conent = []
let rootpath = everforest#syn_rootpath(a:path) " Get the path to place the `after/syntax` directory.
call substitute(full_content, '" syn_begin.\{-}syn_end', '\=add(syn_conent, submatch(0))', 'g') " Search for 'syn_begin.\{-}syn_end' (non-greedy) and put all the search results into a list.
for content in syn_conent
let syn_list = []
call substitute(matchstr(matchstr(content, 'syn_begin:.\{-}{{{'), ':.\{-}{{{'), '\(\w\|-\)\+', '\=add(syn_list, submatch(0))', 'g') " Get the file types. }}}}}}
for syn in syn_list
call everforest#syn_write(rootpath, syn, content) " Write the content.
endfor
endfor
call everforest#syn_write(rootpath, 'text', "let g:everforest_last_modified = '" . a:last_modified . "'") " Write the last modified time to `after/syntax/text/everforest.vim`
let syntax_relative_path = has('win32') ? '\after\syntax' : '/after/syntax'
if a:msg ==# 'update'
echohl WarningMsg | echom '[everforest] Updated ' . rootpath . syntax_relative_path | echohl None
call everforest#ftplugin_detect(a:path)
else
echohl WarningMsg | echom '[everforest] Generated ' . rootpath . syntax_relative_path | echohl None
execute 'set runtimepath+=' . fnameescape(fnamemodify(rootpath, ':p')) . 'after'
endif
endfunction "}}}
function! everforest#syn_write(rootpath, syn, content) "{{{
" Write the content.
let syn_path = a:rootpath . '/after/syntax/' . a:syn . '/everforest.vim' " The path of a syntax file.
" create a new file if it doesn't exist
if !filereadable(syn_path)
call mkdir(a:rootpath . '/after/syntax/' . a:syn, 'p')
call writefile([
\ "if !exists('g:colors_name') || g:colors_name !=# 'everforest'",
\ ' finish',
\ 'endif'
\ ], syn_path, 'a') " Abort if the current color scheme is not everforest.
call writefile([
\ "if index(g:everforest_loaded_file_types, '" . a:syn . "') ==# -1",
\ " call add(g:everforest_loaded_file_types, '" . a:syn . "')",
\ 'else',
\ ' finish',
\ 'endif'
\ ], syn_path, 'a') " Abort if this file type has already been loaded.
endif
" If there is something like `call everforest#highlight()`, then add
" code to initialize the palette and configuration.
if matchstr(a:content, 'everforest#highlight') !=# ''
call writefile([
\ 'let s:configuration = everforest#get_configuration()',
\ 'let s:palette = everforest#get_palette(s:configuration.background, s:configuration.colors_override)'
\ ], syn_path, 'a')
endif
" Append the content.
call writefile(split(a:content, "\n"), syn_path, 'a')
" Add modeline.
call writefile(['" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker fmr={{{,}}}:'], syn_path, 'a')
endfunction "}}}
function! everforest#syn_rootpath(path) "{{{
let plugin_path = fnamemodify(a:path, ':p:h:h')
" Get the directory where `after/syntax` is generated.
if (matchstr(a:path, '^/usr/share') ==# '' && filewritable(plugin_path) == 2) " Return the plugin directory. The `after/syntax` directory should never be generated in `/usr/share`, even if you are a root user.
return plugin_path
else " Use vim home directory.
if has('nvim')
return stdpath('config')
else
return expand('~') . '/.vim'
endif
endif
endfunction "}}}
function! everforest#syn_newest(path, last_modified) "{{{
" Determine whether the current syntax files are up to date by comparing the last modified time in `colors/everforest.vim` and `after/syntax/text/everforest.vim`.
let rootpath = everforest#syn_rootpath(a:path)
execute 'source ' . rootpath . '/after/syntax/text/everforest.vim'
return a:last_modified ==# g:everforest_last_modified ? 1 : 0
endfunction "}}}
function! everforest#syn_clean(path, msg) "{{{
" Clean the `after/syntax` directory.
let rootpath = everforest#syn_rootpath(a:path)
" Remove `after/syntax/**/everforest.vim`.
let file_list = split(globpath(rootpath, 'after/syntax/**/everforest.vim'), "\n")
for file in file_list
call delete(file)
endfor
" Remove empty directories.
let dir_list = split(globpath(rootpath, 'after/syntax/*'), "\n")
for dir in dir_list
if globpath(dir, '*') ==# ''
call delete(dir, 'd')
endif
endfor
if globpath(rootpath . '/after/syntax', '*') ==# ''
call delete(rootpath . '/after/syntax', 'd')
endif
if globpath(rootpath . '/after', '*') ==# ''
call delete(rootpath . '/after', 'd')
endif
if a:msg
let syntax_relative_path = has('win32') ? '\after\syntax' : '/after/syntax'
echohl WarningMsg | echom '[everforest] Cleaned ' . rootpath . syntax_relative_path | echohl None
endif
endfunction "}}}
function! everforest#syn_exists(path) "{{{
return filereadable(everforest#syn_rootpath(a:path) . '/after/syntax/text/everforest.vim')
endfunction "}}}
function! everforest#ftplugin_detect(path) "{{{
" Check if /after/ftplugin exists.
" This directory is generated in earlier versions, users may need to manually clean it.
let rootpath = everforest#syn_rootpath(a:path)
if filereadable(everforest#syn_rootpath(a:path) . '/after/ftplugin/text/everforest.vim')
let ftplugin_relative_path = has('win32') ? '\after\ftplugin' : '/after/ftplugin'
echohl WarningMsg | echom '[everforest] Detected ' . rootpath . ftplugin_relative_path | echohl None
echohl WarningMsg | echom '[everforest] This directory is no longer used, you may need to manually delete it.' | echohl None
endif
endfunction "}}}
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker fmr={{{,}}}:
+41
View File
@@ -0,0 +1,41 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Vim
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 09 Apr 2014
" -----------------------------------------------------------------------------
function! gruvbox#invert_signs_toggle()
if g:gruvbox_invert_signs == 0
let g:gruvbox_invert_signs=1
else
let g:gruvbox_invert_signs=0
endif
colorscheme gruvbox
endfunction
" Search Highlighting {{{
function! gruvbox#hls_show()
set hlsearch
call GruvboxHlsShowCursor()
endfunction
function! gruvbox#hls_hide()
set nohlsearch
call GruvboxHlsHideCursor()
endfunction
function! gruvbox#hls_toggle()
if &hlsearch
call gruvbox#hls_hide()
else
call gruvbox#hls_show()
endif
endfunction
" }}}
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
-89
View File
@@ -1,89 +0,0 @@
" Vim color file: colorful256.vim
" Last Change: 03 Oct, 2007
" License: public domain
" Maintainer:: Jagpreet<jagpreetc AT gmail DOT com>
"
" for a 256 color capable terminal
" "{{{
" You must set t_Co=256 before calling this colorscheme
"
" Color numbers (0-255) see:
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
"
" Added gui colors
"
if &t_Co != 256 && ! has("gui_running")
echomsg ""
echomsg "colors not loaded first please set t_Co=256 in your .vimrc"
echomsg ""
finish
endif
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "colorful256"
highlight Normal cterm=none ctermfg=249 ctermbg=none gui=none guifg=#b2b2b2 guibg=#000000
highlight Special cterm=none ctermfg=105 ctermbg=none gui=none guifg=#8787ff guibg=#000000
highlight Comment cterm=none ctermfg=3 ctermbg=none gui=none guifg=#808000 guibg=#000000
highlight Constant cterm=none ctermfg=9 ctermbg=none gui=none guifg=#ff0000 guibg=#000000
highlight LineNr cterm=none ctermfg=48 ctermbg=none gui=none guifg=#00ff87 guibg=#000000
highlight Number cterm=none ctermfg=209 ctermbg=none gui=none guifg=#ff875f guibg=#000000
highlight PreProc cterm=none ctermfg=10 ctermbg=none gui=none guifg=#ff00ff guibg=#000000
highlight Statement cterm=none ctermfg=51 ctermbg=none gui=none guifg=#00ffff guibg=#000000
highlight Type cterm=none ctermfg=39 ctermbg=none gui=none guifg=#00afff guibg=#000000
highlight Error cterm=none ctermfg=9 ctermbg=none gui=none guifg=#ff0000 guibg=#000000
highlight Identifier cterm=none ctermfg=207 ctermbg=none gui=none guifg=#ff5fff guibg=#000000
highlight SpecialKey cterm=none ctermfg=36 ctermbg=none gui=none guifg=#00af87 guibg=#000000
highlight NonText cterm=none ctermfg=164 ctermbg=none gui=none guifg=#df00df guibg=#000000
highlight Directory cterm=none ctermfg=34 ctermbg=none gui=none guifg=#00af00 guibg=#000000
highlight ErrorMsg cterm=none ctermfg=9 ctermbg=none gui=none guifg=#ff0000 guibg=#000000
highlight MoreMsg cterm=none ctermfg=34 ctermbg=none gui=none guifg=#00af00 guibg=#000000
highlight Title cterm=none ctermfg=199 ctermbg=none gui=none guifg=#ff00af guibg=#000000
highlight WarningMsg cterm=none ctermfg=9 ctermbg=none gui=none guifg=#ff0000 guibg=#000000
highlight DiffDelete cterm=none ctermfg=207 ctermbg=none gui=none guifg=#ff5fff guibg=#000000
highlight Search cterm=none ctermfg=15 ctermbg=160 gui=none guifg=#ffffff guibg=#df0000
highlight Visual cterm=none ctermfg=16 ctermbg=50 gui=none guifg=#000000 guibg=#00ffdf
highlight Cursor cterm=none ctermfg=16 ctermbg=33 gui=none guifg=#000000 guibg=#0087ff
highlight StatusLine cterm=reverse ctermfg=58 ctermbg=15 gui=reverse guifg=#5f5f00 guibg=#ffffff
highlight Question cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00
highlight Todo cterm=none ctermfg=160 ctermbg=184 gui=none guifg=#df0000 guibg=#dfdf00
highlight Folded cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight ModeMsg cterm=none ctermfg=16 ctermbg=46 gui=none guifg=#000000 guibg=#00ff00
highlight VisualNOS cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight WildMenu cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00
highlight FoldColumn cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight SignColumn cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight DiffText cterm=none ctermfg=16 ctermbg=34 gui=none guifg=#000000 guibg=#00af00
highlight StatusLineNC cterm=reverse ctermfg=131 ctermbg=15 gui=reverse guifg=#af5f5f guibg=#ffffff
highlight VertSplit cterm=reverse ctermfg=172 ctermbg=15 gui=reverse guifg=#df8700 guibg=#ffffff
highlight User1 cterm=none ctermbg=20 ctermfg=15 gui=none guibg=#0000df guifg=#ffffff
highlight User2 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
highlight User3 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
highlight User4 cterm=none ctermbg=20 ctermfg=50 gui=none guibg=#0000df guifg=#00ffdf
highlight User5 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
" for groups introduced in version 7
if v:version >= 700
highlight Pmenu cterm=none ctermfg=16 ctermbg=165 gui=none guifg=#000000 guibg=#df00ff
highlight PmenuSel cterm=none ctermfg=16 ctermbg=220 gui=none guifg=#000000 guibg=#ffdf00
highlight tablinesel cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight tabline cterm=none ctermfg=7 ctermbg=58 gui=none guifg=#c0c0c0 guibg=#5f5f00
highlight tablinefill cterm=none ctermfg=58 ctermbg=58 gui=none guifg=#5f5f00 guibg=#5f5f00
endif
"for taglist plugin
"
if exists('loaded_taglist')
highlight TagListTagName cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListTagScope cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListTitle cterm=none ctermfg=199 ctermbg=none gui=none guifg=#ff00af guibg=#000000
highlight TagListComment cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListFileName cterm=none ctermfg=15 ctermbg=90 gui=none guifg=#ffffff guibg=#870087
endif
+88
View File
@@ -0,0 +1,88 @@
" Vim color file: colorful256.vim
" Last Change: 03 Oct, 2007
" License: public domain
" Maintainer:: Jagpreet<jagpreetc AT gmail DOT com>
"
" for a 256 color capable terminal
" "{{{
" You must set t_Co=256 before calling this colorscheme
"
" Color numbers (0-255) see:
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
"
" Added gui colors
"
if &t_Co != 256 && ! has("gui_running")
echomsg ""
echomsg "colors not loaded first please set t_Co=256 in your .vimrc"
echomsg ""
finish
endif
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "colorful256"
highlight Normal cterm=none ctermfg=249 ctermbg=16 gui=none guifg=#b2b2b2 guibg=#000000
highlight Special cterm=none ctermfg=105 ctermbg=16 gui=none guifg=#8787ff guibg=#000000
highlight Comment cterm=none ctermfg=3 ctermbg=16 gui=none guifg=#808000 guibg=#000000
highlight Constant cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000
highlight LineNr cterm=none ctermfg=48 ctermbg=16 gui=none guifg=#00ff87 guibg=#000000
highlight Number cterm=none ctermfg=209 ctermbg=16 gui=none guifg=#ff875f guibg=#000000
highlight PreProc cterm=none ctermfg=10 ctermbg=16 gui=none guifg=#ff00ff guibg=#000000
highlight Statement cterm=none ctermfg=51 ctermbg=16 gui=none guifg=#00ffff guibg=#000000
highlight Type cterm=none ctermfg=39 ctermbg=16 gui=none guifg=#00afff guibg=#000000
highlight Error cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000
highlight Identifier cterm=none ctermfg=207 ctermbg=16 gui=none guifg=#ff5fff guibg=#000000
highlight SpecialKey cterm=none ctermfg=36 ctermbg=16 gui=none guifg=#00af87 guibg=#000000
highlight NonText cterm=none ctermfg=164 ctermbg=16 gui=none guifg=#df00df guibg=#000000
highlight Directory cterm=none ctermfg=34 ctermbg=16 gui=none guifg=#00af00 guibg=#000000
highlight ErrorMsg cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000
highlight MoreMsg cterm=none ctermfg=34 ctermbg=16 gui=none guifg=#00af00 guibg=#000000
highlight Title cterm=none ctermfg=199 ctermbg=16 gui=none guifg=#ff00af guibg=#000000
highlight WarningMsg cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000
highlight DiffDelete cterm=none ctermfg=207 ctermbg=16 gui=none guifg=#ff5fff guibg=#000000
highlight Search cterm=none ctermfg=15 ctermbg=160 gui=none guifg=#ffffff guibg=#df0000
highlight Visual cterm=none ctermfg=16 ctermbg=50 gui=none guifg=#000000 guibg=#00ffdf
highlight Cursor cterm=none ctermfg=16 ctermbg=33 gui=none guifg=#000000 guibg=#0087ff
highlight StatusLine cterm=reverse ctermfg=58 ctermbg=15 gui=reverse guifg=#5f5f00 guibg=#ffffff
highlight Question cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00
highlight Todo cterm=none ctermfg=160 ctermbg=184 gui=none guifg=#df0000 guibg=#dfdf00
highlight Folded cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight ModeMsg cterm=none ctermfg=16 ctermbg=46 gui=none guifg=#000000 guibg=#00ff00
highlight VisualNOS cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight WildMenu cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00
highlight FoldColumn cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight SignColumn cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight DiffText cterm=none ctermfg=16 ctermbg=34 gui=none guifg=#000000 guibg=#00af00
highlight StatusLineNC cterm=reverse ctermfg=131 ctermbg=15 gui=reverse guifg=#af5f5f guibg=#ffffff
highlight VertSplit cterm=reverse ctermfg=172 ctermbg=15 gui=reverse guifg=#df8700 guibg=#ffffff
highlight User1 cterm=none ctermbg=20 ctermfg=15 gui=none guibg=#0000df guifg=#ffffff
highlight User2 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
highlight User3 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
highlight User4 cterm=none ctermbg=20 ctermfg=50 gui=none guibg=#0000df guifg=#00ffdf
highlight User5 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00
" for groups introduced in version 7
if v:version >= 700
highlight Pmenu cterm=none ctermfg=16 ctermbg=165 gui=none guifg=#000000 guibg=#df00ff
highlight PmenuSel cterm=none ctermfg=16 ctermbg=220 gui=none guifg=#000000 guibg=#ffdf00
highlight tablinesel cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00
highlight tabline cterm=none ctermfg=7 ctermbg=58 gui=none guifg=#c0c0c0 guibg=#5f5f00
highlight tablinefill cterm=none ctermfg=58 ctermbg=58 gui=none guifg=#5f5f00 guibg=#5f5f00
endif
"for taglist plugin
"
if exists('loaded_taglist')
highlight TagListTagName cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListTagScope cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListTitle cterm=none ctermfg=199 ctermbg=16 gui=none guifg=#ff00af guibg=#000000
highlight TagListComment cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700
highlight TagListFileName cterm=none ctermfg=15 ctermbg=90 gui=none guifg=#ffffff guibg=#870087
endif
+388
View File
@@ -0,0 +1,388 @@
" Vim color file
"
" Name: desertink.vim
" Version: 1.2
" Author: Markus Koller <markus-koller@gmx.ch>
"
" Note: Only works in GUI and 88/256 color terminals
"
" This is a version of the default desert colorscheme with a
" darker background and more colorful foreground colors.
"
" It also adds highlighting for folds, diffs, line numbers,
" signcolumn, completion menus, and cursor line/column.
" The colors are automatically converted for 88/256 color terminals,
" adapted from http://www.vim.org/scripts/script.php?script_id=1243
"
" You can find the latest version at https://github.com/toupeira/desertink.vim
"
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="desertink"
if has("gui_running") || &t_Co >= 88
" functions {{{
" returns an approximate grey index for the given grey level
fun! <SID>grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
else
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" returns the actual grey level represented by the grey index
fun! <SID>grey_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
else
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endif
endfun
" returns the palette index for the given grey index
fun! <SID>grey_color(n)
if &t_Co == 88
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
else
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endif
endfun
" returns an approximate color index for the given color level
fun! <SID>rgb_number(x)
if &t_Co == 88
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
else
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" returns the actual color level for the given color index
fun! <SID>rgb_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
else
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endif
endfun
" returns the palette index for the given R/G/B color indices
fun! <SID>rgb_color(x, y, z)
if &t_Co == 88
return 16 + (a:x * 16) + (a:y * 4) + a:z
else
return 16 + (a:x * 36) + (a:y * 6) + a:z
endif
endfun
" returns the palette index to approximate the given R/G/B color levels
fun! <SID>color(r, g, b)
" get the closest grey
let l:gx = <SID>grey_number(a:r)
let l:gy = <SID>grey_number(a:g)
let l:gz = <SID>grey_number(a:b)
" get the closest color
let l:x = <SID>rgb_number(a:r)
let l:y = <SID>rgb_number(a:g)
let l:z = <SID>rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" there are two possibilities
let l:dgr = <SID>grey_level(l:gx) - a:r
let l:dgg = <SID>grey_level(l:gy) - a:g
let l:dgb = <SID>grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = <SID>rgb_level(l:gx) - a:r
let l:dg = <SID>rgb_level(l:gy) - a:g
let l:db = <SID>rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" use the grey
return <SID>grey_color(l:gx)
else
" use the color
return <SID>rgb_color(l:x, l:y, l:z)
endif
else
" only one possibility
return <SID>rgb_color(l:x, l:y, l:z)
endif
endfun
" returns the palette index to approximate the 'rrggbb' hex string
fun! <SID>rgb(rgb)
if a:rgb == "ffffff"
return 15
endif
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return <SID>color(l:r, l:g, l:b)
endfun
" sets the highlighting for the given group, add optional fg, bg and attr
" values to override the terminal settings
if has('gui_running') || (has('termguicolors') && &termguicolors)
fun! <SID>X(group, fg, bg, attr, ...)
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr
endif
endfun
else
fun! <SID>X(group, fg, bg, attr, ...)
let l:ctermfg = (a:0 > 0 && a:1 != "") ? a:1 : <SID>rgb(a:fg)
let l:ctermbg = (a:0 > 1 && a:2 != "") ? a:2 : <SID>rgb(a:bg)
let l:ctermattr = (a:0 > 2 && a:3 != "") ? a:3 : a:attr
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . l:ctermfg
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . l:ctermbg
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr
endif
if l:ctermattr != ""
exec "hi " . a:group . " cterm=" . l:ctermattr
endif
endfun
endif
" }}}
call <SID>X("Normal", "ffffff", "121212", "", "", "233")
call <SID>X("NonText", "addbe7", "262626", "bold", "", "235")
highlight! link TabLineFill Normal
" highlight groups
"CursorIM
"Directory
"WildMenu
"Menu
"Scrollbar
"Tooltip
call <SID>X("Cursor", "708090", "f0e68c", "")
" setting a background color for the cursor line can hide
" other background colors such as Error and ErrorMsg
call <SID>X("CursorLine", "", "1a1a1a", "", "", "235", "none")
call <SID>X("CursorColumn", "", "1a1a1a", "", "", "235")
" use only bold for the cursorline to avoid covering the background
"highlight clear CursorLine
"highlight clear CursorColumn
"highlight CursorLine cterm=bold gui=bold
"highlight CursorColumn cterm=bold gui=bold
call <SID>X("ColorColumn", "", "222222", "", "")
call <SID>X("StatusLine", "262626", "ffffff", "reverse", "", "", "reverse")
call <SID>X("StatusLineNC", "262626", "808080", "reverse", "")
call <SID>X("Question", "00ff7f", "", "bold")
call <SID>X("Error", "ffffff", "913d3b", "bold")
call <SID>X("ErrorMsg", "ffffff", "913d3b", "bold")
call <SID>X("ModeMsg", "daa520", "", "")
call <SID>X("MoreMsg", "00ff7f", "", "bold")
call <SID>X("Ignore", "666666", "", "")
call <SID>X("Todo", "f9f747", "d75f00", "bold")
call <SID>X("SpellBad", "", "913d3b", "")
"call <SID>X("VertSplit", "c2bfa5", "7f7f7f", "reverse")
highlight! link VertSplit LineNr
call <SID>X("LineNr", "3e3e3e", "080808", "", "239")
"call <SID>X("CursorLineNr", "aaaaaa", "080808", "", "253")
highlight! link CursorLineNr CursorLine
call <SID>X("Folded", "ffa500", "262626", "bold")
call <SID>X("FoldColumn", "d2b48c", "121212", "")
call <SID>X("SignColumn", "", "121212", "", "", "233")
call <SID>X("Search", "ffffff", "6b8e23", "bold")
call <SID>X("IncSearch", "ffffff", "3a663a", "bold")
call <SID>X("SpecialKey", "9acd32", "", "")
call <SID>X("Title", "cd5c5c", "", "")
call <SID>X("Visual", "", "005F87", "bold")
call <SID>X("WarningMsg", "fa8072", "", "")
call <SID>X("MatchParen", "", "606060", "bold")
call <SID>X("DiffAdd", "d7ffaf", "5f875f", "")
call <SID>X("DiffChange", "d7d7ff", "5f5f87", "")
call <SID>X("DiffDelete", "ff8080", "cc6666", "")
call <SID>X("DiffText", "5f5f87", "81a2be", "")
call <SID>X("Pmenu", "eeeeee", "444444", "")
call <SID>X("PmenuSel", "ffffff", "555555", "bold")
call <SID>X("PmenuSbar", "", "666666", "")
call <SID>X("PmenuThumb", "", "606060", "")
" syntax highlighting groups
call <SID>X("Comment", "87ceeb", "", "")
call <SID>X("Constant", "ff8080", "", "")
call <SID>X("Identifier", "98fb98", "", "none")
call <SID>X("Statement", "f0e260", "", "bold")
call <SID>X("PreProc", "cd5c5c", "", "bold")
call <SID>X("Type", "91b365", "", "bold")
call <SID>X("Special", "ffc266", "", "")
"Underlined
" delete functions {{{
delf <SID>X
delf <SID>rgb
delf <SID>color
delf <SID>rgb_color
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_color
delf <SID>grey_level
delf <SID>grey_number
" }}}
else
" basic colorscheme for 16-color terminals
highlight Statement ctermfg=Yellow
highlight Identifier ctermfg=Green
highlight Type ctermfg=DarkGreen
highlight Comment ctermfg=Cyan
highlight PreProc ctermfg=Blue
highlight LineNr ctermfg=DarkGray
highlight Special ctermfg=Brown
highlight Constant ctermfg=Red
highlight Search ctermfg=Black ctermbg=Green
highlight IncSearch ctermfg=DarkGray ctermbg=White
highlight Visual ctermfg=White ctermbg=Blue
highlight Folded cterm=bold,reverse ctermfg=DarkGray ctermbg=Brown
highlight Pmenu cterm=reverse ctermfg=DarkGray ctermbg=White
highlight PmenuSel ctermfg=Black ctermbg=White
highlight PmenuSbar ctermbg=Black
highlight PmenuThumb ctermfg=White
" use only bold for the cursorline to avoid covering the background
highlight clear CursorLine
highlight clear CursorColumn
highlight CursorLine cterm=bold gui=bold
highlight CursorColumn cterm=bold gui=bold
endif
" vim: set fdl=0 fdm=marker:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+733
View File
@@ -0,0 +1,733 @@
" Vim color file
"
" " __ _ _ _ "
" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
" " \___/ "
"
" "A colorful, dark color scheme for Vim."
"
" File: jellybeans.vim
" URL: github.com/nanotech/jellybeans.vim
" Scripts URL: vim.org/scripts/script.php?script_id=2555
" Maintainer: NanoTech (nanotech.nanotechcorp.net)
" Version: 1.7
" Last Change: June 21st, 2019
" License: MIT
" Contributors: Andrew Wong (w0ng)
" Benjamin R. Haskell (benizi)
" Brian Marshall (bmars)
" Daniel Herbert (pocketninja)
" David Liang <bmdavll at gmail dot com>
" Filipe Silva (ninrod)
" Henry So, Jr. <henryso@panix.com>
" Ihor Kalnytskyi (ikalnytskyi)
" Joe Doherty (docapotamus)
" Karl Litterfeldt (Litterfeldt)
" Keith Pitt (keithpitt)
" Mike Schreifels (schreifels)
" Philipp Rustemeier (12foo)
" Rafael Bicalho (rbika)
" Rich Healey (richo)
" Siwen Yu (yusiwen)
" Tim Willis (willist)
" Tom McLaughlin (tmcoma)
"
" Copyright (c) 2009-2019 NanoTech
"
" Permission is hereby granted, free of charge, to any per
" son obtaining a copy of this software and associated doc
" umentation files (the “Software”), to deal in the Soft
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "jellybeans"
if has("gui_running") || (has('termguicolors') && &termguicolors)
let s:true_color = 1
else
let s:true_color = 0
endif
if s:true_color || &t_Co >= 88
let s:low_color = 0
else
let s:low_color = 1
endif
" Configuration Variables:
" - g:jellybeans_overrides (default = {})
" - g:jellybeans_use_lowcolor_black (default = 0)
" - g:jellybeans_use_gui_italics (default = 1)
" - g:jellybeans_use_term_italics (default = 0)
let s:background_color = "151515"
if exists("g:jellybeans_overrides")
let s:overrides = g:jellybeans_overrides
else
let s:overrides = {}
endif
" Backwards compatibility
if exists("g:jellybeans_background_color")
\ || exists("g:jellybeans_background_color_256")
\ || exists("g:jellybeans_use_term_background_color")
let s:overrides = deepcopy(s:overrides)
if !has_key(s:overrides, "background")
let s:overrides["background"] = {}
endif
if exists("g:jellybeans_background_color")
let s:overrides["background"]["guibg"] = g:jellybeans_background_color
endif
if exists("g:jellybeans_background_color_256")
let s:overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256
endif
if exists("g:jellybeans_use_term_background_color")
\ && g:jellybeans_use_term_background_color
let s:overrides["background"]["ctermbg"] = "NONE"
let s:overrides["background"]["256ctermbg"] = "NONE"
endif
endif
if exists("g:jellybeans_use_lowcolor_black") && g:jellybeans_use_lowcolor_black
let s:termBlack = "Black"
else
let s:termBlack = "Grey"
endif
" When `termguicolors` is set, Vim[^1] ignores `hi Normal guibg=NONE`
" after Normal's `guibg` is already set to a color. See:
"
" - https://github.com/vim/vim/issues/981
" - https://github.com/nanotech/jellybeans.vim/issues/64
"
" To work around this, ensure we don't set the default background
" color before an override changes it to `NONE` by ensuring that the
" background color isn't set to a value different from its override.
"
" [^1]: Tested on 8.0.567. Does not apply to Neovim.
"
if has_key(s:overrides, "background") && has_key(s:overrides["background"], "guibg")
let s:background_color = s:overrides["background"]["guibg"]
endif
" Color approximation functions by Henry So, Jr. and David Liang {{{
" Added to jellybeans.vim by Daniel Herbert
if &t_Co == 88
" returns an approximate grey index for the given grey level
fun! s:grey_number(x)
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
endfun
" returns the actual grey level represented by the grey index
fun! s:grey_level(n)
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
endfun
" returns the palette index for the given grey index
fun! s:grey_color(n)
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
endfun
" returns an approximate color index for the given color level
fun! s:rgb_number(x)
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
endfun
" returns the actual color level for the given color index
fun! s:rgb_level(n)
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
endfun
" returns the palette index for the given R/G/B color indices
fun! s:rgb_color(x, y, z)
return 16 + (a:x * 16) + (a:y * 4) + a:z
endfun
else " assuming &t_Co == 256
" returns an approximate grey index for the given grey level
fun! s:grey_number(x)
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endfun
" returns the actual grey level represented by the grey index
fun! s:grey_level(n)
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endfun
" returns the palette index for the given grey index
fun! s:grey_color(n)
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endfun
" returns an approximate color index for the given color level
fun! s:rgb_number(x)
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endfun
" returns the actual color level for the given color index
fun! s:rgb_level(n)
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endfun
" returns the palette index for the given R/G/B color indices
fun! s:rgb_color(x, y, z)
return 16 + (a:x * 36) + (a:y * 6) + a:z
endfun
endif
" returns the palette index to approximate the given R/G/B color levels
fun! s:color(r, g, b)
" map greys directly (see xterm's 256colres.pl)
if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243
return (a:r - 8) / 10 + 232
endif
" get the closest grey
let l:gx = s:grey_number(a:r)
let l:gy = s:grey_number(a:g)
let l:gz = s:grey_number(a:b)
" get the closest color
let l:x = s:rgb_number(a:r)
let l:y = s:rgb_number(a:g)
let l:z = s:rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" there are two possibilities
let l:dgr = s:grey_level(l:gx) - a:r
let l:dgg = s:grey_level(l:gy) - a:g
let l:dgb = s:grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = s:rgb_level(l:gx) - a:r
let l:dg = s:rgb_level(l:gy) - a:g
let l:db = s:rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" use the grey
return s:grey_color(l:gx)
else
" use the color
return s:rgb_color(l:x, l:y, l:z)
endif
else
" only one possibility
return s:rgb_color(l:x, l:y, l:z)
endif
endfun
fun! s:is_empty_or_none(str)
return empty(a:str) || a:str ==? "NONE"
endfun
" returns the palette index to approximate the 'rrggbb' hex string
fun! s:rgb(rgb)
if s:is_empty_or_none(a:rgb)
return "NONE"
endif
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return s:color(l:r, l:g, l:b)
endfun
fun! s:prefix_highlight_value_with(prefix, color)
if s:is_empty_or_none(a:color)
return "NONE"
else
return a:prefix . a:color
endif
endfun
fun! s:remove_italic_attr(attr)
let l:attr = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",")
if empty(l:attr)
let l:attr = "NONE"
endif
return l:attr
endfun
" sets the highlighting for the given group
fun! s:X(group, fg, bg, attr, lcfg, lcbg)
if s:low_color
let l:cmd = "hi ".a:group.
\ " ctermfg=".s:prefix_highlight_value_with("", a:lcfg).
\ " ctermbg=".s:prefix_highlight_value_with("", a:lcbg)
else
let l:cmd = "hi ".a:group.
\ " guifg=".s:prefix_highlight_value_with("#", a:fg).
\ " guibg=".s:prefix_highlight_value_with("#", a:bg)
if !s:true_color
let l:cmd = l:cmd.
\ " ctermfg=".s:rgb(a:fg).
\ " ctermbg=".s:rgb(a:bg)
endif
endif
let l:attr = s:prefix_highlight_value_with("", a:attr)
if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics
let l:cterm_attr = l:attr
else
let l:cterm_attr = s:remove_italic_attr(l:attr)
endif
if !exists("g:jellybeans_use_gui_italics") || g:jellybeans_use_gui_italics
let l:gui_attr = l:attr
else
let l:gui_attr = s:remove_italic_attr(l:attr)
endif
let l:cmd = l:cmd." gui=".l:gui_attr." cterm=".l:cterm_attr
exec l:cmd
endfun
" }}}
call s:X("Normal","e8e8d3",s:background_color,"","White","")
set background=dark
call s:X("CursorLine","","1c1c1c","","",s:termBlack)
call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
" Some of Terminal.app's default themes have a cursor color
" too close to Jellybeans' preferred MatchParen background
" color to be easily distinguishable. Other terminals tend
" to use a brighter cursor color.
"
" Use a more distinct color in Terminal.app, and also in
" low-color terminals if the preferred background color is
" not available.
if !has('gui_running') && $TERM_PROGRAM == "Apple_Terminal"
let s:matchParenGuiFg = "dd0093"
let s:matchParenGuiBg = "000000"
else
let s:matchParenGuiFg = "ffffff"
let s:matchParenGuiBg = "556779"
endif
if s:termBlack != "Black"
let s:matchParenTermFg = "Magenta"
let s:matchParenTermBg = ""
else
let s:matchParenTermFg = ""
let s:matchParenTermBg = s:termBlack
endif
call s:X("MatchParen",s:matchParenGuiFg,s:matchParenGuiBg,"bold",
\ s:matchParenTermFg,s:matchParenTermBg)
call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
call s:X("TabLineFill","9098a0","","","",s:termBlack)
call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
" Auto-completion
call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
call s:X("Visual","","404040","","",s:termBlack)
call s:X("Cursor",s:background_color,"b0d0f0","","","")
call s:X("LineNr","605958",s:background_color,"NONE",s:termBlack,"")
call s:X("CursorLineNr","ccc5c4","","NONE","White","")
call s:X("Comment","888888","","italic","Grey","")
call s:X("Todo","c7c7c7","","bold","White",s:termBlack)
call s:X("StatusLine","000000","dddddd","italic","","White")
call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack)
call s:X("WildMenu","f0a0c0","302028","","Magenta","")
call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
call s:X("SignColumn","777777","333333","","",s:termBlack)
call s:X("ColorColumn","","000000","","",s:termBlack)
call s:X("Title","70b950","","bold","Green","")
call s:X("Constant","cf6a4c","","","Red","")
call s:X("Special","799d6a","","","Green","")
call s:X("Delimiter","668799","","","Grey","")
call s:X("String","99ad6a","","","Green","")
call s:X("StringDelimiter","556633","","","DarkGreen","")
call s:X("Identifier","c6b6ee","","","LightCyan","")
call s:X("Structure","8fbfdc","","","LightCyan","")
call s:X("Function","fad07a","","","Yellow","")
call s:X("Statement","8197bf","","","DarkBlue","")
call s:X("PreProc","8fbfdc","","","LightBlue","")
hi! link Operator Structure
hi! link Conceal Operator
call s:X("Type","ffb964","","","Yellow","")
call s:X("NonText","606060",s:background_color,"",s:termBlack,"")
call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
call s:X("Search","f0a0c0","302028","underline","Magenta","")
call s:X("Directory","dad085","","","Yellow","")
call s:X("ErrorMsg","","902020","","","DarkRed")
hi! link Error ErrorMsg
hi! link MoreMsg Special
call s:X("Question","65C254","","","Green","")
" Spell Checking
call s:X("SpellBad","","902020","underline","","DarkRed")
call s:X("SpellCap","","0000df","underline","","Blue")
call s:X("SpellRare","","540063","underline","","DarkMagenta")
call s:X("SpellLocal","","2D7067","underline","","Green")
" Diff
hi! link diffRemoved Constant
hi! link diffAdded String
" VimDiff
call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
call s:X("DiffChange","","2B5B77","","White","DarkBlue")
call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
" PHP
hi! link phpFunctions Function
call s:X("StorageClass","c59f6f","","","Red","")
hi! link phpSuperglobal Identifier
hi! link phpQuoteSingle StringDelimiter
hi! link phpQuoteDouble StringDelimiter
hi! link phpBoolean Constant
hi! link phpNull Constant
hi! link phpArrayPair Operator
hi! link phpOperator Normal
hi! link phpRelation Normal
hi! link phpVarSelector Identifier
" Python
hi! link pythonOperator Statement
" Ruby
hi! link rubySharpBang Comment
call s:X("rubyClass","447799","","","DarkBlue","")
call s:X("rubyIdentifier","c6b6fe","","","Cyan","")
hi! link rubyConstant Type
hi! link rubyFunction Function
call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","")
call s:X("rubySymbol","7697d6","","","Blue","")
hi! link rubyGlobalVariable rubyInstanceVariable
hi! link rubyModule rubyClass
call s:X("rubyControl","7597c6","","","Blue","")
hi! link rubyString String
hi! link rubyStringDelimiter StringDelimiter
hi! link rubyInterpolationDelimiter Identifier
call s:X("rubyRegexpDelimiter","540063","","","Magenta","")
call s:X("rubyRegexp","dd0093","","","DarkMagenta","")
call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
" Erlang
hi! link erlangAtom rubySymbol
hi! link erlangBIF rubyPredefinedIdentifier
hi! link erlangFunction rubyPredefinedIdentifier
hi! link erlangDirective Statement
hi! link erlangNode Identifier
" Elixir
hi! link elixirAtom rubySymbol
" JavaScript
hi! link javaScriptValue Constant
hi! link javaScriptRegexpString rubyRegexp
hi! link javaScriptTemplateVar StringDelim
hi! link javaScriptTemplateDelim Identifier
hi! link javaScriptTemplateString String
" CoffeeScript
hi! link coffeeRegExp javaScriptRegexpString
" Lua
hi! link luaOperator Conditional
" C
hi! link cFormat Identifier
hi! link cOperator Constant
" Objective-C/Cocoa
hi! link objcClass Type
hi! link cocoaClass objcClass
hi! link objcSubclass objcClass
hi! link objcSuperclass objcClass
hi! link objcDirective rubyClass
hi! link objcStatement Constant
hi! link cocoaFunction Function
hi! link objcMethodName Identifier
hi! link objcMethodArg Normal
hi! link objcMessageName Identifier
" Vimscript
hi! link vimOper Normal
" HTML
hi! link htmlTag Statement
hi! link htmlEndTag htmlTag
hi! link htmlTagName htmlTag
" XML
hi! link xmlTag Statement
hi! link xmlEndTag xmlTag
hi! link xmlTagName xmlTag
hi! link xmlEqual xmlTag
hi! link xmlEntity Special
hi! link xmlEntityPunct xmlEntity
hi! link xmlDocTypeDecl PreProc
hi! link xmlDocTypeKeyword PreProc
hi! link xmlProcessingDelim xmlAttrib
" Debugger.vim
call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
" vim-indent-guides
if !exists("g:indent_guides_auto_colors")
let g:indent_guides_auto_colors = 0
endif
call s:X("IndentGuidesOdd","","232323","","","")
call s:X("IndentGuidesEven","","1b1b1b","","","")
" Plugins, etc.
hi! link TagListFileName Directory
call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
" Manual overrides for 256-color terminals. Dark colors auto-map badly.
if !s:low_color
hi StatusLineNC ctermbg=235
hi Folded ctermbg=236
hi DiffText ctermfg=81
hi DbgBreakPt ctermbg=53
hi IndentGuidesOdd ctermbg=235
hi IndentGuidesEven ctermbg=234
endif
if !empty("s:overrides")
fun! s:current_attr(group)
let l:synid = synIDtrans(hlID(a:group))
let l:attrs = []
for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"]
if synIDattr(l:synid, l:attr, "gui") == 1
call add(l:attrs, l:attr)
endif
endfor
return join(l:attrs, ",")
endfun
fun! s:current_color(group, what, mode)
let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
if l:color == -1
return ""
else
return substitute(l:color, "^#", "", "")
endif
endfun
fun! s:load_color_def(group, def)
call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")),
\ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")),
\ get(a:def, "attr", s:current_attr(a:group)),
\ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")),
\ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm")))
if !s:low_color
for l:prop in ["ctermfg", "ctermbg"]
let l:override_key = "256".l:prop
if has_key(a:def, l:override_key)
exec "hi ".a:group." ".l:prop."=".a:def[l:override_key]
endif
endfor
endif
endfun
fun! s:load_colors(defs)
for [l:group, l:def] in items(a:defs)
if l:group == "background"
call s:load_color_def("LineNr", l:def)
call s:load_color_def("NonText", l:def)
call s:load_color_def("Normal", l:def)
else
call s:load_color_def(l:group, l:def)
endif
unlet l:group
unlet l:def
endfor
endfun
call s:load_colors(s:overrides)
delf s:load_colors
delf s:load_color_def
delf s:current_color
delf s:current_attr
endif
" delete functions {{{
delf s:X
delf s:remove_italic_attr
delf s:prefix_highlight_value_with
delf s:rgb
delf s:is_empty_or_none
delf s:color
delf s:rgb_color
delf s:rgb_level
delf s:rgb_number
delf s:grey_color
delf s:grey_level
delf s:grey_number
" }}}
+441
View File
@@ -0,0 +1,441 @@
" Vim color file
"
" Author: Liu-Cheng Xu
" URL: https://github.com/liuchengxu/space-vim-dark
"
" Note: Inspired by spacemacs-dark theme
hi clear
if v:version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists('g:syntax_on')
syntax reset
endif
endif
let g:colors_name='space-vim-dark'
" refer to http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
let s:color256 = {
\ 0 : '#000000', 1 : '#800000', 2 : '#008000', 3 : '#808000', 4 : '#000080', 5 : '#800080', 6 : '#008080' , 7 : '#c0c0c0',
\ 8 : '#808080', 9 : '#ff0000', 10 : '#00ff00', 11 : '#ffff00', 12 : '#0000ff', 13 : '#ff00ff', 14 : '#00ffff', 15 : '#ffffff',
\ 16 : '#000000', 17 : '#00005f', 18 : '#000087', 19 : '#0000af', 20 : '#0000d7', 21 : '#0000ff',
\ 22 : '#005f00', 23 : '#005f5f', 24 : '#005f87', 25 : '#005faf', 26 : '#005fd7', 27 : '#005fff',
\ 28 : '#008700', 29 : '#00875f', 30 : '#008787', 31 : '#0087af', 32 : '#0087d7', 33 : '#0087ff',
\ 34 : '#00af00', 35 : '#00af5f', 36 : '#00af87', 37 : '#00afaf', 38 : '#00afd7', 39 : '#00afff',
\ 40 : '#00d700', 41 : '#00d75f', 42 : '#00d787', 43 : '#00d7af', 44 : '#00d7d7', 45 : '#00d7ff',
\ 46 : '#00ff00', 47 : '#00ff5f', 48 : '#00ff87', 49 : '#00ffaf', 50 : '#00ffd7', 51 : '#00ffff',
\ 52 : '#5f0000', 53 : '#5f005f', 54 : '#5f0087', 55 : '#5f00af', 56 : '#5f00d7', 57 : '#5f00ff',
\ 58 : '#5f5f00', 59 : '#5f5f5f', 60 : '#5f5f87', 61 : '#5f5faf', 62 : '#5f5fd7', 63 : '#5f5fff',
\ 64 : '#5f8700', 65 : '#5f875f', 66 : '#5f8787', 67 : '#5f87af', 68 : '#5f87d7', 69 : '#5f87ff',
\ 70 : '#5faf00', 71 : '#5faf5f', 72 : '#5faf87', 73 : '#5fafaf', 74 : '#5fafd7', 75 : '#5fafff',
\ 76 : '#5fd700', 77 : '#5fd75f', 78 : '#5fd787', 79 : '#5fd7af', 80 : '#5fd7d7', 81 : '#5fd7ff',
\ 82 : '#5fff00', 83 : '#5fff5f', 84 : '#5fff87', 85 : '#5fffaf', 86 : '#5fffd7', 87 : '#5fffff',
\ 88 : '#870000', 89 : '#87005f', 90 : '#870087', 91 : '#8700af', 92 : '#8700d7', 93 : '#8700ff',
\ 94 : '#875f00', 95 : '#875f5f', 96 : '#875f87', 97 : '#875faf', 98 : '#875fd7', 99 : '#875fff',
\ 100 : '#878700', 101 : '#87875f', 102 : '#878787', 103 : '#8787af', 104 : '#8787d7', 105 : '#8787ff',
\ 106 : '#87af00', 107 : '#87af5f', 108 : '#87af87', 109 : '#87afaf', 110 : '#87afd7', 111 : '#87afff',
\ 112 : '#87d700', 113 : '#87d75f', 114 : '#87d787', 115 : '#87d7af', 116 : '#87d7d7', 117 : '#87d7ff',
\ 118 : '#87ff00', 119 : '#87ff5f', 120 : '#87ff87', 121 : '#87ffaf', 122 : '#87ffd7', 123 : '#87ffff',
\ 124 : '#af0000', 125 : '#af005f', 126 : '#af0087', 127 : '#af00af', 128 : '#af00d7', 129 : '#af00ff',
\ 130 : '#af5f00', 131 : '#af5f5f', 132 : '#af5f87', 133 : '#af5faf', 134 : '#af5fd7', 135 : '#af5fff',
\ 136 : '#af8700', 137 : '#af875f', 138 : '#af8787', 139 : '#af87af', 140 : '#af87d7', 141 : '#af87ff',
\ 142 : '#afaf00', 143 : '#afaf5f', 144 : '#afaf87', 145 : '#afafaf', 146 : '#afafd7', 147 : '#afafff',
\ 148 : '#afd700', 149 : '#afd75f', 150 : '#afd787', 151 : '#afd7af', 152 : '#afd7d7', 153 : '#afd7ff',
\ 154 : '#afff00', 155 : '#afff5f', 156 : '#afff87', 157 : '#afffaf', 158 : '#afffd7', 159 : '#afffff',
\ 160 : '#d70000', 161 : '#d7005f', 162 : '#d70087', 163 : '#d700af', 164 : '#d700d7', 165 : '#d700ff',
\ 166 : '#d75f00', 167 : '#d75f5f', 168 : '#d75f87', 169 : '#d75faf', 170 : '#d75fd7', 171 : '#d75fff',
\ 172 : '#d78700', 173 : '#d7875f', 174 : '#d78787', 175 : '#d787af', 176 : '#d787d7', 177 : '#d787ff',
\ 178 : '#d7af00', 179 : '#d7af5f', 180 : '#d7af87', 181 : '#d7afaf', 182 : '#d7afd7', 183 : '#d7afff',
\ 184 : '#d7d700', 185 : '#d7d75f', 186 : '#d7d787', 187 : '#d7d7af', 188 : '#d7d7d7', 189 : '#d7d7ff',
\ 190 : '#d7ff00', 191 : '#d7ff5f', 192 : '#d7ff87', 193 : '#d7ffaf', 194 : '#d7ffd7', 195 : '#d7ffff',
\ 196 : '#ff0000', 197 : '#ff005f', 198 : '#ff0087', 199 : '#ff00af', 200 : '#ff00d7', 201 : '#ff00ff',
\ 202 : '#ff5f00', 203 : '#ff5f5f', 204 : '#ff5f87', 205 : '#ff5faf', 206 : '#ff5fd7', 207 : '#ff5fff',
\ 208 : '#ff8700', 209 : '#ff875f', 210 : '#ff8787', 211 : '#ff87af', 212 : '#ff87d7', 213 : '#ff87ff',
\ 214 : '#ffaf00', 215 : '#ffaf5f', 216 : '#ffaf87', 217 : '#ffafaf', 218 : '#ffafd7', 219 : '#ffafff',
\ 220 : '#ffd700', 221 : '#ffd75f', 222 : '#ffd787', 223 : '#ffd7af', 224 : '#ffd7d7', 225 : '#ffd7ff',
\ 226 : '#ffff00', 227 : '#ffff5f', 228 : '#ffff87', 229 : '#ffffaf', 230 : '#ffffd7', 231 : '#ffffff',
\
\ 232 : '#080808', 233 : '#121212', 234 : '#1c1c1c', 235 : '#262626', 236 : '#303030', 237 : '#3a3a3a',
\ 238 : '#444444', 239 : '#4e4e4e', 240 : '#585858', 241 : '#606060', 242 : '#666666', 243 : '#767676',
\ 244 : '#808080', 245 : '#8a8a8a', 246 : '#949494', 247 : '#9e9e9e', 248 : '#a8a8a8', 249 : '#b2b2b2',
\ 250 : '#bcbcbc', 251 : '#c6c6c6', 252 : '#d0d0d0', 253 : '#dadada', 254 : '#e4e4e4', 255 : '#eeeeee',
\ }
" ========|===========
" Red | 160 168
" Blue | 67 68 111
" Yellow | 114 179
" Orange | 173 178
" Purple | 140
" Magenta | 128
" ========|===========
let s:colors = {
\ 16: '#292b2e', 24: '#3C8380', 28: '#c269fe', 30: '#2aa1ae', 36: '#20af81', 40: '#00ff00',
\ 59: '#FF73B9', 68: '#4f97d7', 75: '#FF62B0', 76: '#86dc2f', 81: '#f9bb00', 88: '#330033',
\ 104: '#df90ff', 114: '#67b11d', 128: '#e76a49', 135: '#B7B7FF', 136: '#dc752f', 139: '#d698fe',
\ 140: '#b888e2', 141: '#9a9aba', 151: '#74BAAC', 160: '#e0211d', 161: '#E469FE', 167: '#ce537a',
\ 168: '#ce537a', 169: '#bc6ec5', 170: '#bc6ec5', 171: '#6094DB', 173: '#e18254', 176: '#E697E6',
\ 177: '#D881ED', 178: '#d1951d', 179: '#d4b261', 196: '#e0211d', 204: '#ce537a', 207: '#FF68DD',
\ 214: '#FF4848', 218: '#d19a66', 225: '#FFC8C8', 229: '#fff06a', 233: '#303030', 234: '#212026',
\ 235: '#292b2e', 236: '#34323e', 238: '#544a65', 239: '#44505c', 241: '#534b5d', 243: '#65737e',
\ 244: '#b4d1b6',
\ }
function! s:hi(item, fg, bg, cterm, gui)
let l:fg = empty(a:fg) ? '' : printf('ctermfg=%d guifg=%s', a:fg, get(s:colors, a:fg, s:color256[a:fg]))
let l:bg = empty(a:bg) ? '' : printf('ctermbg=%d guibg=%s', a:bg, get(s:colors, a:bg, s:color256[a:bg]))
let l:style = printf('cterm=%s gui=%s', a:cterm, a:gui)
execute 'hi '.a:item.' '.l:fg.' '.l:bg.' '.l:style
endfunction
let s:fg = 249
let s:bg = get(g:, 'space_vim_dark_background', 235)
let s:bg = max([s:bg, 233])
let s:bias = s:bg - 235
let s:bg0 = s:bg - 1
let s:bg1 = s:bg + 1
let s:bg2 = s:bg + 2
let s:bg3 = s:bg + 3
let s:bg4 = s:bg + 4
" call s:hi(item, fg, bg, cterm, gui)
call s:hi('Normal' , 249 , s:bg , 'None' , 'None')
call s:hi('Cursor' , 235 , 178 , 'bold' , 'bold')
call s:hi('LineNr' , 239+s:bias , s:bg0 , 'None' , 'None')
call s:hi('CursorLine' , '' , s:bg0 , 'None' , 'None')
call s:hi('CursorLineNr' , 170 , s:bg0 , 'None' , 'None')
call s:hi('CursorColumn' , '' , s:bg0 , 'None' , 'None')
call s:hi('ColorColumn' , '' , s:bg0 , 'None' , 'None')
" bug. opposite here.
call s:hi('StatusLine' , 140 , s:bg2 , 'None' , 'None')
call s:hi('StatusLineNC' , 242 , s:bg1 , 'None' , 'None')
call s:hi('StatusLineTerm' , 140 , s:bg2 , 'bold' , 'bold')
call s:hi('StatusLineTermNC' , 244 , s:bg1 , 'bold' , 'bold')
call s:hi('TabLine' , 66 , s:bg3 , 'None' , 'None')
call s:hi('TabLineSel' , 178 , s:bg4 , 'None' , 'None')
call s:hi('TabLineFill' , 145 , s:bg2 , 'None' , 'None')
call s:hi('WildMenu' , 214 , s:bg3 , 'None' , 'None')
call s:hi('Boolean' , 178 , '' , 'None' , 'None')
call s:hi('Character' , 75 , '' , 'None' , 'None')
call s:hi('Number' , 176 , '' , 'None' , 'None')
call s:hi('Float' , 135 , '' , 'None' , 'None')
call s:hi('String' , 36 , '' , 'None' , 'None')
call s:hi('Conditional' , 68 , '' , 'bold' , 'bold')
call s:hi('Constant' , 218 , '' , 'None' , 'None')
call s:hi('Debug' , 225 , '' , 'None' , 'None')
call s:hi('Define' , 177 , '' , 'None' , 'None')
call s:hi('Delimiter' , 151 , '' , 'None' , 'None')
hi DiffAdd term=bold cterm=reverse ctermfg=107 ctermbg=235 gui=reverse guifg=#8ec07c guibg=#32322c
hi DiffChange term=bold cterm=reverse ctermfg=142 ctermbg=235 gui=reverse guifg=#b8bb26 guibg=#29422d
hi DiffDelete term=bold cterm=reverse ctermfg=160 ctermbg=235 gui=reverse guifg=#e0211d guibg=#282828
hi DiffText term=reverse cterm=reverse ctermfg=214 ctermbg=235 gui=reverse guifg=#fabd2f guibg=#282828
call s:hi('Exception' , 204 , '' , 'bold' , 'bold')
call s:hi('Function' , 169 , '' , 'bold' , 'bold')
call s:hi('Identifier' , 167 , '' , 'None' , 'None')
call s:hi('Ignore' , 244 , '' , 'None' , 'None')
call s:hi('Operator' , 111 , '' , 'None' , 'None')
call s:hi('FoldColumn' , 67 , s:bg1 , 'None' , 'None')
call s:hi('Folded' , 133 , s:bg1 , 'bold' , 'bold')
call s:hi('PreCondit' , 139 , '' , 'None' , 'None')
call s:hi('PreProc' , 176 , '' , 'None' , 'None')
call s:hi('Question' , 81 , '' , 'None' , 'None')
call s:hi('Directory' , 67 , '' , 'bold' , 'bold')
call s:hi('Repeat' , 68 , '' , 'bold' , 'bold')
call s:hi('Keyword' , 68 , '' , 'bold' , 'bold')
call s:hi('Statement' , 68 , '' , 'None' , 'None')
call s:hi('Structure' , 68 , '' , 'bold' , 'bold')
call s:hi('Label' , 104 , '' , 'None' , 'None')
call s:hi('Macro' , 140 , '' , 'None' , 'None')
call s:hi('Type' , 68 , '' , 'None' , 'None')
call s:hi('Typedef' , 68 , '' , 'None' , 'None')
call s:hi('Underlined' , '' , '' , 'underline' , 'underline')
call s:hi('Search' , 16 , 76 , 'bold' , 'bold')
call s:hi('IncSearch' , 16 , 167 , 'bold' , 'bold')
call s:hi('MatchParen', 40 , s:bg0 , 'bold,underline', 'bold,underline')
call s:hi('ModeMsg' , 229 , '' , 'None' , 'None')
" Popup menu
call s:hi('Pmenu' , 141 , s:bg1 , 'None' , 'None')
call s:hi('PmenuSel' , 251 , 97 , 'None' , 'None')
call s:hi('PmenuSbar' , 28 , 233 , 'None' , 'None')
call s:hi('PmenuThumb' , 160 , 97 , 'None' , 'None')
" SignColumn may relate to ale sign
call s:hi('SignColumn' , 118 , s:bg , 'None' , 'None')
call s:hi('Todo' , 172 , s:bg , 'bold' , 'bold')
" VertSplit consistent with normal background to hide it
call s:hi('VertSplit' , s:bg0 , '' , 'None' , 'None')
call s:hi('Warning' , 136 , '' , 'bold' , 'bold')
call s:hi('WarningMsg' , 136 , '' , 'bold' , 'bold')
call s:hi('Error' , 160 , s:bg , 'bold' , 'bold')
call s:hi('ErrorMsg' , 196 , s:bg , 'bold' , 'bold')
call s:hi('Special' , 169 , '' , 'None' , 'None')
call s:hi('SpecialKey' , 59 , '' , 'None' , 'None')
call s:hi('SpecialChar' , 171 , '' , 'bold' , 'bold')
call s:hi('SpecialComment' , 243 , '' , 'None' , 'None')
call s:hi('SpellBad' , 168 , 52 , 'underline' , 'undercurl')
call s:hi('SpellCap' , 110 , 25 , 'underline' , 'undercurl')
call s:hi('SpellLocal' , 253 , '' , 'underline' , 'undercurl')
call s:hi('SpellRare' , 218 , '' , 'underline' , 'undercurl')
call s:hi('Tag' , 161 , '' , 'None' , 'None')
call s:hi('Title' , 176 , '' , 'None' , 'None')
call s:hi('StorageClass' , 178 , '' , 'bold' , 'bold')
call s:hi('Comment' , 30 , '' , 'None' , 'italic')
call s:hi('Visual' , '' , s:bg3 , 'None' , 'None')
call s:hi('VisualNOS' , '' , s:bg3 , 'None' , 'None')
" tilde group
call s:hi('NonText' , 241 , '' , 'None' , 'None')
call s:hi('Terminal' , 249 , s:bg , 'None' , 'None')
call s:hi('diffAdded' , 36 , '' , 'None' , 'None')
call s:hi('diffRemoved' , 167 , '' , 'None' , 'None')
hi MatchParen guibg=NONE
hi SignColumn guibg=NONE
hi link qfLineNr Type
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Language
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" markdown
call s:hi('markdownH1' , 68 , '' , 'bold' , 'bold')
call s:hi('markdownH2' , 36 , '' , 'bold' , 'bold')
call s:hi('markdownH3' , 114 , '' , 'bold' , 'bold')
call s:hi('markdownH4' , 178 , '' , 'bold' , 'bold')
call s:hi('markdownH5' , 68 , '' , 'None' , 'None')
call s:hi('markdownH6' , 36 , '' , 'None' , 'None')
call s:hi('mkdCode' , 114 , '' , 'None' , 'None')
call s:hi('mkdItalic' , 36 , '' , 'None' , 'italic')
" c
call s:hi('cConstant' , 178 , '' , 'none' , 'none')
call s:hi('cCustomClass' , 167 , '' , 'bold' , 'bold')
" cpp
call s:hi('cppSTLexception', 199, '', 'bold', 'bold')
call s:hi('cppSTLnamespace', 178, '', 'bold', 'bold')
" css
call s:hi('cssTagName' , 68 , '' , 'bold' , 'bold')
call s:hi('cssProp' , 169 , '' , 'bold' , 'bold')
" dot
call s:hi('dotKeyChar' , 176 , '' , 'none' , 'none')
call s:hi('dotType' , 178 , '' , 'none' , 'none')
" sh
call s:hi('shSet' , 68 , '' , 'bold' , 'bold')
call s:hi('shLoop' , 68 , '' , 'bold' , 'bold')
call s:hi('shFunctionKey' , 68 , '' , 'bold' , 'bold')
call s:hi('shTestOpr' , 178 , '' , 'none' , 'none')
" solidity
call s:hi('solContract' , 178 , '' , 'bold' , 'bold')
call s:hi('solContractName' , 168 , '' , 'bold' , 'bold')
call s:hi('solBuiltinType' , 176 , '' , 'none' , 'none')
" vimL
call s:hi('vimLet' , 68 , '' , 'bold' , 'bold')
call s:hi('vimFuncKey' , 68 , '' , 'bold' , 'bold')
call s:hi('vimCommand' , 68 , '' , 'bold' , 'bold')
call s:hi('vimMap' , 68 , '' , 'none' , 'none')
call s:hi('vimGroup' , 67 , '' , 'bold' , 'bold')
call s:hi('vimHiGroup' , 67 , '' , 'bold' , 'bold')
" rust
call s:hi('rustKeyword' , 68 , '' , 'bold' , 'bold')
call s:hi('rustModPath' , 68 , '' , 'none' , 'none')
call s:hi('rustTrait' , 168 , '' , 'bold' , 'bold')
" toml
call s:hi('tomlTable' , 169 , '' , 'bold' , 'bold')
call s:hi('tomlKey' , 68 , '' , 'none' , 'none')
call s:hi('tomlComment' , 30 , '' , 'none' , 'italic')
" json
call s:hi('jsonStringSQError', 160, '', 'none', 'none')
" xml
call s:hi('xmlTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlEndTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlTagName' , 167 , '' , 'none' , 'none')
" js
call s:hi('jsReturn' , 68 , '' , 'bold' , 'bold')
hi link jsObjectKey Type
hi link jsFuncBlock Identifier
hi link jsVariableDef Title
" go
call s:hi('goType' , 176 , '' , 'none' , 'none')
call s:hi('goFloat' , 135 , '' , 'none' , 'none')
call s:hi('goField' , 68 , '' , 'none' , 'none')
call s:hi('goTypeName' , 169 , '' , 'bold' , 'bold')
call s:hi('goFunction' , 169 , '' , 'bold' , 'bold')
call s:hi('goMethodCall' , 168 , '' , 'bold' , 'bold')
call s:hi('goReceiverType' , 114 , '' , 'none' , 'none')
call s:hi('goFunctionCall' , 169 , '' , 'bold' , 'bold')
call s:hi('goFormatSpecifier' , 68 , '' , 'none' , 'none')
call s:hi('goTypeConstructor' , 178 , '' , 'none' , 'none')
call s:hi('goPredefinedIdentifiers' , 140 , '' , 'none' , 'none')
" make
call s:hi('makeCommands' , 68 , '' , 'none' , 'none')
call s:hi('makeSpecTarget' , 68 , '' , 'bold' , 'bold')
" java
call s:hi('rustScopeDecl' , 68 , '' , 'bold' , 'bold')
call s:hi('javaClassDecl' , 168 , '' , 'bold' , 'bold')
" scala
call s:hi('scalaKeyword' , 68 , '' , 'bold' , 'bold')
call s:hi('scalaNameDefinition' , 68 , '' , 'bold' , 'bold')
" ruby
call s:hi('rubyClass' , 68 , '' , 'bold' , 'bold')
call s:hi('rubyDefine' , 68 , '' , 'bold' , 'bold')
call s:hi('rubyInterpolationDelimiter' , 176 , '' , 'none' , 'none')
" html
hi link htmlSpecialTagName Tag
call s:hi('htmlItalic' , 36 , '' , 'None' , 'italic')
hi htmlBold cterm=bold gui=bold
" python-mode
call s:hi('pythonLambdaExpr' , 105 , '' , 'none' , 'none')
call s:hi('pythonClass' , 207 , '' , 'bold' , 'bold')
call s:hi('pythonParameters' , 147 , '' , 'none' , 'none')
call s:hi('pythonParam' , 108 , '' , 'none' , 'none')
call s:hi('pythonBrackets' , 183 , '' , 'none' , 'none')
call s:hi('pythonClassParameters' , 111 , '' , 'none' , 'none')
call s:hi('pythonBuiltinType' , 68 , '' , 'none' , 'none')
call s:hi('pythonBuiltinObj' , 71 , '' , 'bold' , 'bold')
call s:hi('pythonBuiltinFunc' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonOperator' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonInclude' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonSelf' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonStatement' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonDottedName' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonDecorator' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonException' , 166 , '' , 'bold' , 'bold')
call s:hi('pythonError' , 195 , '' , 'none' , 'none')
call s:hi('pythonIndentError' , 196 , '' , 'none' , 'none')
call s:hi('pythonSpaceError' , 196 , '' , 'none' , 'none')
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ALE
hi link ALEErrorSign Error
hi link ALEWarningSign Warning
" vim-easymotion
call s:hi('EasyMotionTarget' , 76 , '' , 'bold' , 'bold')
call s:hi('EasyMotionTarget2First' , 162 , '' , 'bold' , 'bold')
call s:hi('EasyMotionTarget2Second' , 69 , '' , 'bold' , 'bold')
" vim-markdown
call s:hi('htmlH1' , 68 , '' , 'bold' , 'bold')
call s:hi('htmlH2' , 36 , '' , 'bold' , 'bold')
call s:hi('htmlH3' , 114 , '' , 'bold' , 'bold')
call s:hi('htmlH4' , 178 , '' , 'bold' , 'bold')
call s:hi('htmlH5' , 68 , '' , 'None' , 'None')
call s:hi('htmlH6' , 36 , '' , 'None' , 'None')
" vim-indent-guides
let g:indent_guides_auto_colors = 0
call s:hi('IndentGuidesOdd' , '' , 237 , 'none' , 'none')
call s:hi('IndentGuidesEven' , '' , 239 , 'none' , 'none')
" vim-gitgutter
call s:hi('GitGutterAdd' , 36 , '' , 'none' , 'none')
call s:hi('GitGutterChange' , 178 , '' , 'none' , 'none')
call s:hi('GitGutterDelete' , 160 , '' , 'none' , 'none')
call s:hi('GitGutterChangeDelete' , 140 , '' , 'none' , 'none')
" vim-signify
call s:hi('SignifySignAdd' , 36 , '' , 'none' , 'none')
call s:hi('SignifySignChange' , 178 , '' , 'none' , 'none')
call s:hi('SignifySignDelete' , 160 , '' , 'none' , 'none')
call s:hi('SignifySignChangeDelete', 140 , '' , 'none' , 'none')
" vim-startify
hi link StartifyFile Normal
call s:hi('StartifyHeader' , 177 , '' , 'none' , 'none')
call s:hi('startifySection' , 68 , '' , 'bold' , 'bold')
" YouCompleteMe
call s:hi('YcmErrorSection' , 249 , 5 , 'none' , 'none')
call s:hi('YcmWarningSection' , 249 , 60 , 'none' , 'none')
" vim-leader-guide
hi link LeaderGuideDesc Normal
call s:hi('LeaderGuideKeys' , 169 , '' , 'bold' , 'bold')
call s:hi('LeaderGuideBrackets' , 36 , '' , 'none' , 'none')
" NERDTree
call s:hi('NERDTreeCWD' , 169 , '' , 'bold' , 'bold')
call s:hi('NERDTreeUp' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeDir' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeDirSlash' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeOpenable' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeClosable' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeExecFile' , 167 , '' , 'bold' , 'bold')
hi link NERDTreeLinkTarget Macro
" Tagbar
call s:hi('TagbarKind' , 169 , '' , 'bold' , 'bold')
call s:hi('TagbarScope' , 169 , '' , 'bold' , 'bold')
call s:hi('TagbarHighlight' , 16 , 36 , 'bold' , 'bold')
call s:hi('TagbarNestedKind' , 68 , '' , 'bold' , 'bold')
call s:hi('TagbarVisibilityPublic' , 34 , '' , 'none' , 'none')
" vim-signature
call s:hi('SignatureMarkText', 178, '', 'bold', 'bold')
" vim_current_word
call s:hi('CurrentWord' , '' , s:bg1 , 'underline' , 'underline')
call s:hi('CurrentWordTwins' , '' , s:bg1 , 'none' , 'none')
" quick-scope
call s:hi('QuickScopePrimary' , 155 , '' , 'underline' , 'underline')
call s:hi('QuickScopeSecondary' , 81 , '' , 'underline' , 'underline')
delf s:hi
unlet s:color256 s:colors s:bg
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark
+28 -2
View File
@@ -6,9 +6,35 @@ set softtabstop=4
set expandtab
filetype plugin indent on
set t_Co=256
set background=dark
set termguicolors
syntax enable
colorscheme colorful256
" https://www.vim.org/scripts/script.php?script_id=2034
"colorscheme colorful256
" https://github.com/toupeira/vim-desertink
colorscheme desertink
" https://github.com/sainnhe/everforest
"colorscheme everforest
" https://github.com/morhetz/gruvbox
"colorscheme gruvbox
" https://github.com/nanotech/jellybeans.vim
"colorscheme jellybeans
" https://github.com/liuchengxu/space-vim-dark
"colorscheme space-vim-dark
" force transparent background (not recommended for colorful256)
hi Normal ctermbg=NONE guibg=NONE
" ignore built-in colors except default
set wildignore+=blue.vim,darkblue.vim,delek.vim,desert.vim,elflord.vim,evening.vim,
\habamax.vim,industry.vim,koehler.vim,lunaperche.vim,morning.vim,murphy.vim,
\pablo.vim,peachpuff.vim,quiet.vim,ron.vim,shine.vim,slate.vim,torte.vim,zellner.vim
map <esc>OH <home>
map <esc>OF <end>