Changed the worktree to one directory back (i.e. $HOME) and simplified the setup
This commit is contained in:
162
.vim/colors/campo-dark-blue.vim
Normal file
162
.vim/colors/campo-dark-blue.vim
Normal file
@@ -0,0 +1,162 @@
|
||||
" A simple dark vim colorscheme.
|
||||
" Created by Michael Campagnaro (https://git.michael.is)
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 0
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
echoerr "Don't have expected color support!"
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
syntax reset
|
||||
|
||||
source $HOME/.vim/colors/utils
|
||||
let g:colors_name = "campo-dark-blue"
|
||||
|
||||
" Shared colors
|
||||
let s:blue = "3699cc"
|
||||
let s:purple = "ce93d8"
|
||||
let s:grey = "b0bec5"
|
||||
let s:orange = "ffb74d"
|
||||
let s:yellow = "fff176"
|
||||
let s:green = "88b888"
|
||||
let s:red = "ef2929"
|
||||
let s:text = "f1f1e8" " A majority of the syntax will use this.
|
||||
let s:bg = "072730"
|
||||
let s:select = "546e8f"
|
||||
let s:window = "37474f"
|
||||
let s:comment = "5dea82"
|
||||
let s:tab = "03404a"
|
||||
let s:error = "e40e0e"
|
||||
let s:proc = "0eefcb"
|
||||
let s:warn = "dcd53e"
|
||||
let s:spell = "aaf53e"
|
||||
|
||||
" Vim
|
||||
call X("Normal", s:text, s:bg, "")
|
||||
call X("LineNr", s:grey, "", "")
|
||||
call X("NonText", s:text, "", "")
|
||||
call X("SpecialKey", s:blue, "", "")
|
||||
call X("Search", s:text, s:select, "")
|
||||
call X("TabLineSel", s:text, s:bg, "bold")
|
||||
call X("TabLine", "dddddd", s:tab, "none")
|
||||
call X("TabLineFill", "", s:tab, "none") " The tab line region that doesn't contain tab entries.
|
||||
call X("StatusLine", s:window, s:text, "reverse")
|
||||
call X("StatusLineNC", s:window, s:comment, "reverse")
|
||||
call X("VertSplit", s:window, s:window, "none")
|
||||
call X("Visual", "", s:select, "")
|
||||
call X("Directory", s:blue, "", "")
|
||||
call X("ModeMsg", s:green, "", "")
|
||||
call X("MoreMsg", s:green, "", "")
|
||||
call X("Question", s:green, "", "")
|
||||
call X("MatchParen", "", s:select, "")
|
||||
call X("Folded", s:comment, s:bg, "")
|
||||
call X("FoldColumn", s:comment, s:bg, "")
|
||||
call X("SpellBad", s:spell, s:bg, "bold")
|
||||
call X("SpellCap", s:text, s:bg, "") " A word that should start with a capital
|
||||
call X("SpellLocal", s:spell, s:bg, "bold") " Correctly spelled but used in another region.
|
||||
call X("SpellRare", s:text, s:bg, "") " A correctly spelled that is hardly ever used. Don't care about this.
|
||||
call X("ErrorMsg", s:error, s:bg, "bold")
|
||||
if version >= 700
|
||||
call X("PMenu", s:text, s:select, "none") " Autocompletion menu
|
||||
call X("PMenuSel", s:text, "027990", "bold") " Selected autocompletion item
|
||||
call X("SignColumn", "", s:bg, "none")
|
||||
call X("CursorLine", "", "022f36", "none") " Horizontal line at the cursor.
|
||||
call X("CursorColumn", "", "022c33", "none") " Vertical line at the cursor.
|
||||
end
|
||||
if version >= 703
|
||||
call X("ColorColumn", "", "022c33", "none") " Vertical line set by colorcolumn option.
|
||||
end
|
||||
|
||||
" Standard Highlighting
|
||||
call X("Comment", s:comment, "", "")
|
||||
call X("Title", s:comment, "", "")
|
||||
call X("Cursor", "", s:text, "")
|
||||
call X("Identifier", s:grey, "", "none")
|
||||
call X("Statement", s:text, "", "") " 'return', 'goto', 'case', 'break', etc
|
||||
call X("Conditional", s:text, "", "")
|
||||
call X("Repeat", s:text, "", "") " 'for' and 'while'
|
||||
call X("Structure", "ae90ea", "", "")
|
||||
call X("Function", s:proc, "", "")
|
||||
call X("Constant", s:text, "", "") " Constants, e.g. SOME_CONST
|
||||
call X("Boolean", s:text, "", "") " true, false
|
||||
call X("String", s:text, "", "")
|
||||
call X("Special", s:text, "", "")
|
||||
call X("PreProc", s:text, "", "")
|
||||
call X("Operator", s:text, "", "none")
|
||||
call X("Type", s:text, "", "") " Data types
|
||||
call X("Define", "a5bce4", "", "none")
|
||||
call X("Include", s:text, "", "") " #include in C/C++
|
||||
call X("Number", s:text, "", "")
|
||||
|
||||
" Notes
|
||||
call X("Todo", "b8fbb0", s:bg, "underline")
|
||||
call X("Bugs", "d8fbb0", s:bg, "standout")
|
||||
call X("Notes", "ffffff", s:bg, "standout")
|
||||
call X("Notices", s:warn, s:bg, "bold")
|
||||
|
||||
" Build markers
|
||||
call X("BuildError", s:error, s:bg, "bold")
|
||||
call X("BuildWarn", s:warn, s:bg, "bold")
|
||||
call X("BuildInfo", s:text, s:bg, "bold")
|
||||
|
||||
" Jai Highlighting
|
||||
call X("jaiVariableDeclaration", s:text, "", "")
|
||||
call X("jaiTagNote", s:orange, "", "bold")
|
||||
|
||||
" airblade/vim-gitgutter
|
||||
call X("GitGutterAdd", s:green, "", "")
|
||||
call X("GitGutterDelete", s:red, "", "")
|
||||
call X("GitGutterChange", s:yellow, "", "")
|
||||
call X("GitGutterChangeDelete", s:orange, "", "")
|
||||
|
||||
" C Highlighting
|
||||
call X("cType", s:text, "", "")
|
||||
call X("cStorageClass", s:text, "", "")
|
||||
call X("cConditional", s:text, "", "")
|
||||
call X("cRepeat", s:text, "", "")
|
||||
|
||||
" Python Highlighting
|
||||
call X("pythonInclude", s:red, "", "")
|
||||
call X("pythonStatement", s:blue, "", "")
|
||||
call X("pythonConditional", s:purple, "", "")
|
||||
call X("pythonRepeat", s:purple, "", "")
|
||||
call X("pythonException", s:purple, "", "")
|
||||
call X("pythonFunction", s:proc, "", "")
|
||||
call X("pythonSelf", s:grey, "", "")
|
||||
call X("pythonOperator", s:purple, "", "")
|
||||
call X("pythonExtraOperator", s:purple, "", "")
|
||||
call X("pythonClass", s:proc, "", "")
|
||||
call X("pythonDecorator", s:orange, "", "")
|
||||
call X("pythonDocstring", s:comment, "", "")
|
||||
call X("pythonBuiltinObj", s:yellow, "", "")
|
||||
call X("pythonBuiltinType", s:orange, "", "")
|
||||
call X("pythonNumber", s:orange, "", "")
|
||||
|
||||
" JS Highlighting
|
||||
call X("javaScriptBraces", s:text, "", "")
|
||||
call X("javaScriptFunction", s:purple, "", "")
|
||||
call X("javaScriptConditional", s:purple, "", "")
|
||||
call X("javaScriptRepeat", s:purple, "", "")
|
||||
call X("javaScriptNumber", s:orange, "", "")
|
||||
call X("javaScriptMember", s:orange, "", "")
|
||||
|
||||
" HTML Highlighting
|
||||
call X("htmlTag", s:text, "", "")
|
||||
call X("htmlTagName", s:text, "", "")
|
||||
call X("htmlArg", s:text, "", "")
|
||||
call X("htmlScriptTag", s:blue, "", "")
|
||||
|
||||
" Diff Highlighting
|
||||
call X("DiffAdd", s:window, s:green, "none")
|
||||
call X("DiffDelete", s:window, s:red, "none")
|
||||
call X("DiffChange", s:window, s:yellow, "none")
|
||||
call X("DiffText", s:bg, s:yellow, "none")
|
||||
|
||||
480
.vim/colors/campo-dark-greenish.vim
Normal file
480
.vim/colors/campo-dark-greenish.vim
Normal file
@@ -0,0 +1,480 @@
|
||||
" A simple dark vim colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
"
|
||||
" The theme file original copied from the Tomorrow theme.
|
||||
" See https://github.com/chriskempson/vim-tomorrow-theme.git for it.
|
||||
" Hex color conversion functions borrowed from the theme "Desert256".
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 0
|
||||
|
||||
let s:blue = "3699cc"
|
||||
let s:purple = "ce93d8"
|
||||
let s:grey = "b0bec5"
|
||||
let s:orange = "ffb74d"
|
||||
let s:yellow = "fff176"
|
||||
let s:green = "88b888"
|
||||
let s:red = "ef2929"
|
||||
|
||||
let s:text = "f1f1f1"
|
||||
|
||||
let s:foreground = s:text
|
||||
let s:background = "08363c"
|
||||
let s:selection = "546e7a"
|
||||
let s:window = "37474f"
|
||||
let s:line = "034a4a"
|
||||
let s:color_column = "034a4a" " Vertical line set by colorcolumn option.
|
||||
let s:cursor_line = "014242" " Horizontal line at the cursor.
|
||||
let s:cursor_column = "014242" " Vertical line at the cursor.
|
||||
let s:active_tab_bg = s:background
|
||||
let s:active_tab_fg = s:text
|
||||
let s:inactive_tab_bg = s:line
|
||||
let s:inactive_tab_fg = "dddddd"
|
||||
let s:tab_line_bg = s:inactive_tab_bg
|
||||
let s:bad_spelling = "ee877d"
|
||||
let s:todo = "b8fbb0"
|
||||
let s:bugs = "b8fbb0"
|
||||
let s:error_msg_background = s:background
|
||||
let s:error_msg_foreground = "e40e0e"
|
||||
|
||||
let s:function_name = "0effdd"
|
||||
let s:pre_processor = s:text
|
||||
let s:define = "a5bce4"
|
||||
let s:struct = "de90ea"
|
||||
let s:number = s:text
|
||||
|
||||
" things like 'return', 'goto', 'case', 'break'
|
||||
let s:statement = s:text
|
||||
|
||||
" this like 'inline'
|
||||
let s:type = s:text
|
||||
|
||||
" #include
|
||||
let s:include = s:text
|
||||
|
||||
let s:string = s:text
|
||||
let s:comment = "6df97e"
|
||||
|
||||
" true, false, etc
|
||||
let s:constant = s:text
|
||||
|
||||
let s:c_type = s:text
|
||||
let s:c_storage_class = s:text
|
||||
let s:c_conditional = s:text
|
||||
let s:c_loops = s:text
|
||||
|
||||
let s:vim_command = s:text
|
||||
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-dark-blue"
|
||||
|
||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||
" 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_colour(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 colour index for the given colour 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 colour level for the given colour 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 colour indices
|
||||
fun <SID>rgb_colour(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 colour levels
|
||||
fun <SID>colour(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 colour
|
||||
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_colour(l:gx)
|
||||
else
|
||||
" Use the colour
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" Only one possibility
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
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>colour(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" Sets the highlighting for the given group
|
||||
fun <SID>X(group, fg, bg, attr)
|
||||
if a:fg != ""
|
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||
endif
|
||||
if a:bg != ""
|
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("Normal", s:foreground, s:background, "")
|
||||
call <SID>X("LineNr", s:grey, "", "")
|
||||
call <SID>X("NonText", s:foreground, "", "")
|
||||
call <SID>X("SpecialKey", s:blue, "", "")
|
||||
call <SID>X("Search", s:foreground, s:selection, "")
|
||||
call <SID>X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold")
|
||||
call <SID>X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none")
|
||||
call <SID>X("TabLineFill", "", s:tab_line_bg, "none")
|
||||
call <SID>X("StatusLine", s:window, s:foreground, "reverse")
|
||||
call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
|
||||
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||
call <SID>X("Visual", "", s:selection, "")
|
||||
call <SID>X("Directory", s:blue, "", "")
|
||||
call <SID>X("ModeMsg", s:green, "", "")
|
||||
call <SID>X("MoreMsg", s:green, "", "")
|
||||
call <SID>X("Question", s:green, "", "")
|
||||
call <SID>X("WarningMsg", s:red, "", "")
|
||||
call <SID>X("MatchParen", "", s:selection, "")
|
||||
call <SID>X("Folded", s:comment, s:background, "")
|
||||
call <SID>X("FoldColumn", s:comment, s:background, "")
|
||||
if version >= 700
|
||||
call <SID>X("CursorLine", "", s:cursor_line, "none")
|
||||
call <SID>X("CursorColumn", "", s:cursor_column, "none")
|
||||
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||
call <SID>X("SignColumn", "", s:background, "none")
|
||||
end
|
||||
if version >= 703
|
||||
call <SID>X("ColorColumn", "", s:color_column, "none")
|
||||
end
|
||||
|
||||
" Standard Highlighting
|
||||
call <SID>X("Comment", s:comment, "", "")
|
||||
call <SID>X("Title", s:comment, "", "")
|
||||
call <SID>X("Cursor", "", s:foreground, "")
|
||||
call <SID>X("Identifier", s:grey, "", "none")
|
||||
call <SID>X("Statement", s:statement, "", "")
|
||||
call <SID>X("Conditional", s:foreground, "", "")
|
||||
call <SID>X("Repeat", s:yellow, "", "")
|
||||
call <SID>X("Structure", s:struct, "", "")
|
||||
call <SID>X("Function", s:function_name, "", "")
|
||||
call <SID>X("Constant", s:constant, "", "")
|
||||
call <SID>X("String", s:string, "", "")
|
||||
call <SID>X("Special", s:foreground, "", "")
|
||||
call <SID>X("PreProc", s:pre_processor, "", "")
|
||||
call <SID>X("Operator", s:foreground, "", "none")
|
||||
call <SID>X("Type", s:type, "", "")
|
||||
call <SID>X("Define", s:define, "", "none")
|
||||
call <SID>X("Include", s:include, "", "")
|
||||
call <SID>X("Number", s:number, "", "")
|
||||
call <SID>X("SpellBad", s:bad_spelling, s:background, "underline,bold")
|
||||
|
||||
" Custom TODO/NOTE colors
|
||||
call <SID>X("Todo", s:todo, s:background, "underline")
|
||||
call <SID>X("Bugs", s:bugs, s:background, "standout")
|
||||
call <SID>X("Notes","ffffff",s:background,"standout")
|
||||
call <SID>X("Notices","dcd53e",s:background,"bold")
|
||||
call <SID>X("ErrorMsg", s:error_msg_foreground, s:error_msg_background, "bold")
|
||||
|
||||
"call <SID>X("Ignore", "666666", "", "")
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("vimCommand", s:vim_command, "", "")
|
||||
|
||||
" C Highlighting
|
||||
call <SID>X("cType", s:c_type, "", "")
|
||||
call <SID>X("cStorageClass", s:c_storage_class, "", "")
|
||||
call <SID>X("cConditional", s:c_conditional, "", "")
|
||||
call <SID>X("cRepeat", s:c_loops, "", "")
|
||||
|
||||
" PHP Highlighting
|
||||
call <SID>X("phpVarSelector", s:red, "", "")
|
||||
call <SID>X("phpIdentifier", s:red, "", "")
|
||||
call <SID>X("phpFCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpSCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpKeyword", s:purple, "", "")
|
||||
call <SID>X("phpType", s:purple, "", "")
|
||||
call <SID>X("phpRepeat", s:red, "", "")
|
||||
call <SID>X("phpDefine", s:purple, "", "")
|
||||
call <SID>X("phpDocTags", s:function_name, "", "")
|
||||
call <SID>X("phpDocParam", s:green, "", "")
|
||||
call <SID>X("phpFunction", s:blue, "", "")
|
||||
call <SID>X("phpFunctions", s:blue, "", "")
|
||||
call <SID>X("phpClass", s:blue, "", "")
|
||||
call <SID>X("phpClasses", s:orange, "", "")
|
||||
call <SID>X("phpMagicConstants", s:yellow, "", "")
|
||||
call <SID>X("phpMemberSelector", s:grey, "", "")
|
||||
|
||||
" Ruby Highlighting
|
||||
call <SID>X("rubySymbol", s:green, "", "")
|
||||
call <SID>X("rubyConstant", s:foreground, "", "")
|
||||
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||
call <SID>X("rubyInclude", s:blue, "", "")
|
||||
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||
call <SID>X("rubyConditional", s:purple, "", "")
|
||||
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||
|
||||
" Python Highlighting
|
||||
call <SID>X("pythonInclude", s:red, "", "")
|
||||
call <SID>X("pythonStatement", s:blue, "", "")
|
||||
call <SID>X("pythonConditional", s:purple, "", "")
|
||||
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||
call <SID>X("pythonException", s:purple, "", "")
|
||||
call <SID>X("pythonFunction", s:function_name, "", "")
|
||||
call <SID>X("pythonSelf", s:grey, "", "")
|
||||
call <SID>X("pythonOperator", s:purple, "", "")
|
||||
call <SID>X("pythonExtraOperator", s:purple, "", "")
|
||||
call <SID>X("pythonClass", s:function_name, "", "")
|
||||
call <SID>X("pythonDecorator", s:orange, "", "")
|
||||
call <SID>X("pythonDocstring", s:comment, "", "")
|
||||
call <SID>X("pythonBuiltinObj", s:yellow, "", "")
|
||||
call <SID>X("pythonBuiltinType", s:orange, "", "")
|
||||
call <SID>X("pythonNumber", s:orange, "", "")
|
||||
|
||||
" Go Highlighting
|
||||
call <SID>X("goStatement", s:purple, "", "")
|
||||
call <SID>X("goConditional", s:purple, "", "")
|
||||
call <SID>X("goRepeat", s:purple, "", "")
|
||||
call <SID>X("goException", s:purple, "", "")
|
||||
call <SID>X("goDeclaration", s:blue, "", "")
|
||||
call <SID>X("goConstants", s:yellow, "", "")
|
||||
call <SID>X("goBuiltins", s:orange, "", "")
|
||||
|
||||
" CoffeeScript Highlighting
|
||||
call <SID>X("coffeeKeyword", s:purple, "", "")
|
||||
call <SID>X("coffeeConditional", s:purple, "", "")
|
||||
call <SID>X("coffeeSpecialVar", s:orange, "", "")
|
||||
call <SID>X("coffeeSpecialIdent", s:red, "", "")
|
||||
call <SID>X("coffeeObject", s:orange, "", "")
|
||||
call <SID>X("coffeeObjAssign", s:blue, "", "")
|
||||
call <SID>X("coffeeArrow", s:purple, "", "")
|
||||
call <SID>X("coffeeBoolean", s:foreground, "", "")
|
||||
call <SID>X("coffeeGlobal", s:foreground, "", "")
|
||||
call <SID>X("coffeeModuleKeyword", s:function_name, "", "")
|
||||
call <SID>X("coffeeFuncCall", s:blue, "", "")
|
||||
|
||||
" JavaScript Highlighting
|
||||
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||
|
||||
" HTML Highlighting
|
||||
call <SID>X("htmlTag", s:foreground, "", "")
|
||||
call <SID>X("htmlTagName", s:foreground, "", "")
|
||||
call <SID>X("htmlArg", s:foreground, "", "")
|
||||
call <SID>X("htmlScriptTag", s:blue, "", "")
|
||||
|
||||
" Blade Tempalte Highlight
|
||||
call <SID>X("bladeDelimiter", s:orange, "", "")
|
||||
call <SID>X("bladeKeyword", s:blue, "", "")
|
||||
|
||||
" Diff Highlighting
|
||||
call <SID>X("DiffAdd", s:window, s:green, "none")
|
||||
call <SID>X("DiffDelete", s:window, s:red, "none")
|
||||
call <SID>X("DiffChange", s:window, s:yellow, "none")
|
||||
call <SID>X("DiffText", s:background, s:yellow, "none")
|
||||
|
||||
call <SID>X("GitGutterAdd", s:green, "", "")
|
||||
call <SID>X("GitGutterDelete", s:red, "", "")
|
||||
call <SID>X("GitGutterChange", s:yellow, "", "")
|
||||
call <SID>X("GitGutterChangeDelete", s:orange, "", "")
|
||||
|
||||
call <SID>X("VimwikiHeader1", s:red, "", "")
|
||||
call <SID>X("VimwikiHeader2", s:green, "", "")
|
||||
call <SID>X("VimwikiHeader3", s:blue, "", "")
|
||||
call <SID>X("VimwikiHeader4", s:function_name, "", "")
|
||||
call <SID>X("VimwikiHeader5", s:orange, "", "")
|
||||
call <SID>X("VimwikiHeader6", s:yellow, "", "")
|
||||
|
||||
" YAML
|
||||
call <SID>X("yamlBlockMappingKey", s:blue, "", "")
|
||||
|
||||
" Delete Functions
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>colour
|
||||
delf <SID>rgb_colour
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_colour
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
endif
|
||||
447
.vim/colors/campo-dark-grey-blue.vim
Normal file
447
.vim/colors/campo-dark-grey-blue.vim
Normal file
@@ -0,0 +1,447 @@
|
||||
" A simple dark vim colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
"
|
||||
" The theme file original copied from the Tomorrow theme.
|
||||
" See https://github.com/chriskempson/vim-tomorrow-theme.git for it.
|
||||
" Hex color conversion functions borrowed from the theme "Desert256".
|
||||
|
||||
" @TODO port these colors over to a copy of campo-dark-greyscale so that I
|
||||
" have better control over the C syntax highlighting.
|
||||
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
|
||||
let g:campo_theme_use_rainbow_parens = 0
|
||||
|
||||
" Default GUI colors
|
||||
let s:foreground = "cfd8dc"
|
||||
let s:background = "1f2431"
|
||||
let s:selection = "546e7a"
|
||||
let s:window = "394051"
|
||||
let s:active_tab_bg = s:background
|
||||
let s:active_tab_fg = "ffffff"
|
||||
let s:inactive_tab_bg = "2a3142"
|
||||
let s:inactive_tab_fg = "dddddd"
|
||||
let s:tab_line_bg = s:inactive_tab_bg
|
||||
let s:line = "323643"
|
||||
let s:comment = "96a2c1"
|
||||
let s:red = "f27c71"
|
||||
let s:orange = "fcd8a2"
|
||||
let s:yellow = "fff176"
|
||||
let s:green = "80d580"
|
||||
let s:aqua = "2dd7e2"
|
||||
let s:blue = "2dd7e2"
|
||||
let s:purple = "ce93d8"
|
||||
let s:grey = "bac7ce"
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-dark-grey-blue"
|
||||
|
||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||
" 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_colour(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 colour index for the given colour 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 colour level for the given colour 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 colour indices
|
||||
fun <SID>rgb_colour(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 colour levels
|
||||
fun <SID>colour(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 colour
|
||||
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_colour(l:gx)
|
||||
else
|
||||
" Use the colour
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" Only one possibility
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
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>colour(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" Sets the highlighting for the given group
|
||||
fun <SID>X(group, fg, bg, attr)
|
||||
if a:fg != ""
|
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||
endif
|
||||
if a:bg != ""
|
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("Normal", s:foreground, s:background, "")
|
||||
call <SID>X("LineNr", s:grey, "", "")
|
||||
call <SID>X("NonText", s:foreground, "", "")
|
||||
call <SID>X("SpecialKey", s:blue, "", "")
|
||||
call <SID>X("Search", s:foreground, s:selection, "")
|
||||
call <SID>X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold")
|
||||
call <SID>X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none")
|
||||
call <SID>X("TabLineFill", "", s:tab_line_bg, "none")
|
||||
call <SID>X("StatusLine", s:window, s:foreground, "reverse")
|
||||
call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
|
||||
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||
call <SID>X("Visual", "", s:selection, "")
|
||||
call <SID>X("Directory", s:blue, "", "")
|
||||
call <SID>X("ModeMsg", s:green, "", "")
|
||||
call <SID>X("MoreMsg", s:green, "", "")
|
||||
call <SID>X("Question", s:green, "", "")
|
||||
call <SID>X("WarningMsg", s:red, "", "")
|
||||
call <SID>X("MatchParen", "", s:selection, "")
|
||||
call <SID>X("Folded", s:comment, s:background, "")
|
||||
call <SID>X("FoldColumn", s:comment, s:background, "")
|
||||
if version >= 700
|
||||
call <SID>X("CursorLine", "", s:line, "none")
|
||||
call <SID>X("CursorColumn", "", s:line, "none")
|
||||
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||
call <SID>X("SignColumn", "", s:background, "none")
|
||||
end
|
||||
if version >= 703
|
||||
call <SID>X("ColorColumn", "", s:line, "none")
|
||||
end
|
||||
|
||||
" Standard Highlighting
|
||||
call <SID>X("Comment", s:comment, "", "")
|
||||
call <SID>X("Title", s:comment, "", "")
|
||||
call <SID>X("Cursor", "", s:foreground, "")
|
||||
call <SID>X("Identifier", s:grey, "", "none")
|
||||
call <SID>X("Statement", s:yellow, "", "")
|
||||
call <SID>X("Conditional", s:foreground, "", "")
|
||||
call <SID>X("Repeat", s:yellow, "", "")
|
||||
call <SID>X("Structure", s:purple, "", "")
|
||||
call <SID>X("Function", s:aqua, "", "")
|
||||
call <SID>X("Constant", s:foreground, "", "")
|
||||
call <SID>X("String", s:green, "", "")
|
||||
call <SID>X("Special", s:foreground, "", "")
|
||||
call <SID>X("PreProc", s:aqua, "", "")
|
||||
call <SID>X("Operator", s:foreground, "", "none")
|
||||
call <SID>X("Type", s:blue, "", "")
|
||||
call <SID>X("Define", s:purple, "", "none")
|
||||
call <SID>X("Include", s:blue, "", "")
|
||||
call <SID>X("Number", s:orange, "", "")
|
||||
call <SID>X("SpellBad", s:red, s:background, "underline,bold")
|
||||
|
||||
" Custom TODO/NOTE colors
|
||||
call <SID>X("Todo", s:red, s:background, "underline")
|
||||
call <SID>X("Bugs", s:red, s:background, "standout")
|
||||
call <SID>X("Notes","ffffff",s:background,"standout")
|
||||
call <SID>X("Notices","dcd53e",s:background,"bold")
|
||||
|
||||
"call <SID>X("Ignore", "666666", "", "")
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("vimCommand", s:blue, "", "")
|
||||
|
||||
" C Highlighting
|
||||
call <SID>X("cType", s:blue, "", "")
|
||||
call <SID>X("cStorageClass", s:blue, "", "")
|
||||
call <SID>X("cConditional", s:red, "", "")
|
||||
call <SID>X("cRepeat", s:red, "", "")
|
||||
|
||||
" PHP Highlighting
|
||||
call <SID>X("phpVarSelector", s:red, "", "")
|
||||
call <SID>X("phpIdentifier", s:red, "", "")
|
||||
call <SID>X("phpFCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpSCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpKeyword", s:purple, "", "")
|
||||
call <SID>X("phpType", s:purple, "", "")
|
||||
call <SID>X("phpRepeat", s:red, "", "")
|
||||
call <SID>X("phpDefine", s:purple, "", "")
|
||||
call <SID>X("phpDocTags", s:aqua, "", "")
|
||||
call <SID>X("phpDocParam", s:green, "", "")
|
||||
call <SID>X("phpFunction", s:blue, "", "")
|
||||
call <SID>X("phpFunctions", s:blue, "", "")
|
||||
call <SID>X("phpClass", s:blue, "", "")
|
||||
call <SID>X("phpClasses", s:orange, "", "")
|
||||
call <SID>X("phpMagicConstants", s:yellow, "", "")
|
||||
call <SID>X("phpMemberSelector", s:grey, "", "")
|
||||
|
||||
" Ruby Highlighting
|
||||
call <SID>X("rubySymbol", s:green, "", "")
|
||||
call <SID>X("rubyConstant", s:foreground, "", "")
|
||||
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||
call <SID>X("rubyInclude", s:blue, "", "")
|
||||
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||
call <SID>X("rubyConditional", s:purple, "", "")
|
||||
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||
|
||||
" Python Highlighting
|
||||
call <SID>X("pythonInclude", s:red, "", "")
|
||||
call <SID>X("pythonStatement", s:blue, "", "")
|
||||
call <SID>X("pythonConditional", s:purple, "", "")
|
||||
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||
call <SID>X("pythonException", s:purple, "", "")
|
||||
call <SID>X("pythonFunction", s:aqua, "", "")
|
||||
call <SID>X("pythonSelf", s:grey, "", "")
|
||||
call <SID>X("pythonOperator", s:purple, "", "")
|
||||
call <SID>X("pythonExtraOperator", s:purple, "", "")
|
||||
call <SID>X("pythonClass", s:aqua, "", "")
|
||||
call <SID>X("pythonDecorator", s:orange, "", "")
|
||||
call <SID>X("pythonDocstring", s:comment, "", "")
|
||||
call <SID>X("pythonBuiltinObj", s:yellow, "", "")
|
||||
call <SID>X("pythonBuiltinType", s:orange, "", "")
|
||||
call <SID>X("pythonNumber", s:orange, "", "")
|
||||
|
||||
" Go Highlighting
|
||||
call <SID>X("goStatement", s:purple, "", "")
|
||||
call <SID>X("goConditional", s:purple, "", "")
|
||||
call <SID>X("goRepeat", s:purple, "", "")
|
||||
call <SID>X("goException", s:purple, "", "")
|
||||
call <SID>X("goDeclaration", s:blue, "", "")
|
||||
call <SID>X("goConstants", s:yellow, "", "")
|
||||
call <SID>X("goBuiltins", s:orange, "", "")
|
||||
|
||||
" CoffeeScript Highlighting
|
||||
call <SID>X("coffeeKeyword", s:purple, "", "")
|
||||
call <SID>X("coffeeConditional", s:purple, "", "")
|
||||
call <SID>X("coffeeSpecialVar", s:orange, "", "")
|
||||
call <SID>X("coffeeSpecialIdent", s:red, "", "")
|
||||
call <SID>X("coffeeObject", s:orange, "", "")
|
||||
call <SID>X("coffeeObjAssign", s:blue, "", "")
|
||||
call <SID>X("coffeeArrow", s:purple, "", "")
|
||||
call <SID>X("coffeeBoolean", s:foreground, "", "")
|
||||
call <SID>X("coffeeGlobal", s:foreground, "", "")
|
||||
call <SID>X("coffeeModuleKeyword", s:aqua, "", "")
|
||||
call <SID>X("coffeeFuncCall", s:blue, "", "")
|
||||
|
||||
" JavaScript Highlighting
|
||||
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||
|
||||
" HTML Highlighting
|
||||
call <SID>X("htmlTag", s:foreground, "", "")
|
||||
call <SID>X("htmlTagName", s:foreground, "", "")
|
||||
call <SID>X("htmlArg", s:foreground, "", "")
|
||||
call <SID>X("htmlScriptTag", s:blue, "", "")
|
||||
|
||||
" Blade Tempalte Highlight
|
||||
call <SID>X("bladeDelimiter", s:orange, "", "")
|
||||
call <SID>X("bladeKeyword", s:blue, "", "")
|
||||
|
||||
" Diff Highlighting
|
||||
call <SID>X("DiffAdd", s:window, s:green, "none")
|
||||
call <SID>X("DiffDelete", s:window, s:red, "none")
|
||||
call <SID>X("DiffChange", s:window, s:yellow, "none")
|
||||
call <SID>X("DiffText", s:background, s:yellow, "none")
|
||||
|
||||
call <SID>X("GitGutterAdd", s:green, "", "")
|
||||
call <SID>X("GitGutterDelete", s:red, "", "")
|
||||
call <SID>X("GitGutterChange", s:yellow, "", "")
|
||||
call <SID>X("GitGutterChangeDelete", s:orange, "", "")
|
||||
|
||||
call <SID>X("VimwikiHeader1", s:red, "", "")
|
||||
call <SID>X("VimwikiHeader2", s:green, "", "")
|
||||
call <SID>X("VimwikiHeader3", s:blue, "", "")
|
||||
call <SID>X("VimwikiHeader4", s:aqua, "", "")
|
||||
call <SID>X("VimwikiHeader5", s:orange, "", "")
|
||||
call <SID>X("VimwikiHeader6", s:yellow, "", "")
|
||||
|
||||
" YAML
|
||||
call <SID>X("yamlBlockMappingKey", s:blue, "", "")
|
||||
|
||||
" Delete Functions
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>colour
|
||||
delf <SID>rgb_colour
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_colour
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
endif
|
||||
465
.vim/colors/campo-dark-greyscale.vim
Normal file
465
.vim/colors/campo-dark-greyscale.vim
Normal file
@@ -0,0 +1,465 @@
|
||||
" A simple dark greyscale colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
"
|
||||
" Hex color conversion functions borrowed from the theme "Desert256".
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 0
|
||||
|
||||
let s:blue = "3699cc"
|
||||
let s:purple = "ce93d8"
|
||||
let s:grey = "b0bec5"
|
||||
let s:orange = "ffb74d"
|
||||
let s:yellow = "fff176"
|
||||
let s:green = "88b888"
|
||||
let s:red = "ef2929"
|
||||
|
||||
let s:text = "ffffff"
|
||||
|
||||
let s:foreground = s:text
|
||||
let s:background = "1f2431"
|
||||
let s:selection = "546e7a"
|
||||
let s:window = "394051"
|
||||
let s:line = "333946"
|
||||
let s:active_tab_bg = s:background
|
||||
let s:active_tab_fg = s:text
|
||||
let s:inactive_tab_bg = s:line
|
||||
let s:inactive_tab_fg = "dddddd"
|
||||
let s:tab_line_bg = s:inactive_tab_bg
|
||||
let s:bad_spelling = "ee877d"
|
||||
let s:todo = "b8fbb0"
|
||||
let s:bugs = "b8fbb0"
|
||||
let s:error_msg_background = s:background
|
||||
let s:error_msg_foreground = "e40e0e"
|
||||
|
||||
let s:function_name = s:text
|
||||
let s:pre_processor = s:text
|
||||
let s:define = s:text
|
||||
let s:struct = s:text
|
||||
let s:statement = s:text " Things like 'return'
|
||||
let s:number = s:text
|
||||
let s:type = s:text " Things like 'inline'
|
||||
let s:include = s:text " #include
|
||||
let s:string = s:text
|
||||
let s:comment = "aaaaaa"
|
||||
let s:constant = s:text
|
||||
|
||||
let s:c_type = s:pre_processor
|
||||
let s:c_storage_class = s:text
|
||||
let s:c_conditional = "ffffff"
|
||||
let s:c_loops = "ffffff"
|
||||
|
||||
let s:vim_command = "ffffff"
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-dark-greyscale"
|
||||
|
||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||
" 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_colour(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 colour index for the given colour 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 colour level for the given colour 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 colour indices
|
||||
fun <SID>rgb_colour(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 colour levels
|
||||
fun <SID>colour(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 colour
|
||||
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_colour(l:gx)
|
||||
else
|
||||
" Use the colour
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" Only one possibility
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
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>colour(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" Sets the highlighting for the given group
|
||||
fun <SID>X(group, fg, bg, attr)
|
||||
if a:fg != ""
|
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||
endif
|
||||
if a:bg != ""
|
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("Normal", s:foreground, s:background, "")
|
||||
call <SID>X("LineNr", s:grey, "", "")
|
||||
call <SID>X("NonText", s:foreground, "", "")
|
||||
call <SID>X("SpecialKey", s:blue, "", "")
|
||||
call <SID>X("Search", s:foreground, s:selection, "")
|
||||
call <SID>X("TabLineSel", s:active_tab_fg, s:active_tab_bg, "bold")
|
||||
call <SID>X("TabLine", s:inactive_tab_fg, s:inactive_tab_bg, "none")
|
||||
call <SID>X("TabLineFill", "", s:tab_line_bg, "none")
|
||||
call <SID>X("StatusLine", s:window, s:foreground, "reverse")
|
||||
call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
|
||||
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||
call <SID>X("Visual", "", s:selection, "")
|
||||
call <SID>X("Directory", s:blue, "", "")
|
||||
call <SID>X("ModeMsg", s:green, "", "")
|
||||
call <SID>X("MoreMsg", s:green, "", "")
|
||||
call <SID>X("Question", s:green, "", "")
|
||||
call <SID>X("WarningMsg", s:red, "", "")
|
||||
call <SID>X("MatchParen", "", s:selection, "")
|
||||
call <SID>X("Folded", s:comment, s:background, "")
|
||||
call <SID>X("FoldColumn", s:comment, s:background, "")
|
||||
if version >= 700
|
||||
call <SID>X("CursorLine", "", s:line, "none")
|
||||
call <SID>X("CursorColumn", "", s:line, "none")
|
||||
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||
call <SID>X("SignColumn", "", s:background, "none")
|
||||
end
|
||||
if version >= 703
|
||||
call <SID>X("ColorColumn", "", s:line, "none")
|
||||
end
|
||||
|
||||
" Standard Highlighting
|
||||
call <SID>X("Comment", s:comment, "", "")
|
||||
call <SID>X("Title", s:comment, "", "")
|
||||
call <SID>X("Cursor", "", s:foreground, "")
|
||||
call <SID>X("Identifier", s:grey, "", "none")
|
||||
call <SID>X("Statement", s:statement, "", "")
|
||||
call <SID>X("Conditional", s:foreground, "", "")
|
||||
call <SID>X("Repeat", s:yellow, "", "")
|
||||
call <SID>X("Structure", s:struct, "", "")
|
||||
call <SID>X("Function", s:function_name, "", "")
|
||||
call <SID>X("Constant", s:constant, "", "")
|
||||
call <SID>X("String", s:string, "", "")
|
||||
call <SID>X("Special", s:foreground, "", "")
|
||||
call <SID>X("PreProc", s:pre_processor, "", "")
|
||||
call <SID>X("Operator", s:foreground, "", "none")
|
||||
call <SID>X("Type", s:type, "", "")
|
||||
call <SID>X("Define", s:define, "", "none")
|
||||
call <SID>X("Include", s:include, "", "")
|
||||
call <SID>X("Number", s:number, "", "")
|
||||
call <SID>X("SpellBad", s:bad_spelling, s:background, "underline,bold")
|
||||
|
||||
" Custom TODO/NOTE colors
|
||||
call <SID>X("Todo", s:todo, s:background, "underline")
|
||||
call <SID>X("Bugs", s:bugs, s:background, "standout")
|
||||
call <SID>X("Notes","ffffff",s:background,"standout")
|
||||
call <SID>X("Notices","dcd53e",s:background,"bold")
|
||||
call <SID>X("ErrorMsg", s:error_msg_foreground, s:error_msg_background, "bold")
|
||||
|
||||
"call <SID>X("Ignore", "666666", "", "")
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("vimCommand", s:vim_command, "", "")
|
||||
|
||||
" C Highlighting
|
||||
call <SID>X("cType", s:c_type, "", "")
|
||||
call <SID>X("cStorageClass", s:c_storage_class, "", "")
|
||||
call <SID>X("cConditional", s:c_conditional, "", "")
|
||||
call <SID>X("cRepeat", s:c_loops, "", "")
|
||||
|
||||
" PHP Highlighting
|
||||
call <SID>X("phpVarSelector", s:red, "", "")
|
||||
call <SID>X("phpIdentifier", s:red, "", "")
|
||||
call <SID>X("phpFCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpSCKeyword", s:purple, "", "")
|
||||
call <SID>X("phpKeyword", s:purple, "", "")
|
||||
call <SID>X("phpType", s:purple, "", "")
|
||||
call <SID>X("phpRepeat", s:red, "", "")
|
||||
call <SID>X("phpDefine", s:purple, "", "")
|
||||
call <SID>X("phpDocTags", s:function_name, "", "")
|
||||
call <SID>X("phpDocParam", s:green, "", "")
|
||||
call <SID>X("phpFunction", s:blue, "", "")
|
||||
call <SID>X("phpFunctions", s:blue, "", "")
|
||||
call <SID>X("phpClass", s:blue, "", "")
|
||||
call <SID>X("phpClasses", s:orange, "", "")
|
||||
call <SID>X("phpMagicConstants", s:yellow, "", "")
|
||||
call <SID>X("phpMemberSelector", s:grey, "", "")
|
||||
|
||||
" Ruby Highlighting
|
||||
call <SID>X("rubySymbol", s:green, "", "")
|
||||
call <SID>X("rubyConstant", s:foreground, "", "")
|
||||
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||
call <SID>X("rubyInclude", s:blue, "", "")
|
||||
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||
call <SID>X("rubyConditional", s:purple, "", "")
|
||||
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||
|
||||
" Python Highlighting
|
||||
call <SID>X("pythonInclude", s:red, "", "")
|
||||
call <SID>X("pythonStatement", s:blue, "", "")
|
||||
call <SID>X("pythonConditional", s:purple, "", "")
|
||||
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||
call <SID>X("pythonException", s:purple, "", "")
|
||||
call <SID>X("pythonFunction", s:function_name, "", "")
|
||||
call <SID>X("pythonSelf", s:grey, "", "")
|
||||
call <SID>X("pythonOperator", s:purple, "", "")
|
||||
call <SID>X("pythonExtraOperator", s:purple, "", "")
|
||||
call <SID>X("pythonClass", s:function_name, "", "")
|
||||
call <SID>X("pythonDecorator", s:orange, "", "")
|
||||
call <SID>X("pythonDocstring", s:comment, "", "")
|
||||
call <SID>X("pythonBuiltinObj", s:yellow, "", "")
|
||||
call <SID>X("pythonBuiltinType", s:orange, "", "")
|
||||
call <SID>X("pythonNumber", s:orange, "", "")
|
||||
|
||||
" Go Highlighting
|
||||
call <SID>X("goStatement", s:purple, "", "")
|
||||
call <SID>X("goConditional", s:purple, "", "")
|
||||
call <SID>X("goRepeat", s:purple, "", "")
|
||||
call <SID>X("goException", s:purple, "", "")
|
||||
call <SID>X("goDeclaration", s:blue, "", "")
|
||||
call <SID>X("goConstants", s:yellow, "", "")
|
||||
call <SID>X("goBuiltins", s:orange, "", "")
|
||||
|
||||
" CoffeeScript Highlighting
|
||||
call <SID>X("coffeeKeyword", s:purple, "", "")
|
||||
call <SID>X("coffeeConditional", s:purple, "", "")
|
||||
call <SID>X("coffeeSpecialVar", s:orange, "", "")
|
||||
call <SID>X("coffeeSpecialIdent", s:red, "", "")
|
||||
call <SID>X("coffeeObject", s:orange, "", "")
|
||||
call <SID>X("coffeeObjAssign", s:blue, "", "")
|
||||
call <SID>X("coffeeArrow", s:purple, "", "")
|
||||
call <SID>X("coffeeBoolean", s:foreground, "", "")
|
||||
call <SID>X("coffeeGlobal", s:foreground, "", "")
|
||||
call <SID>X("coffeeModuleKeyword", s:function_name, "", "")
|
||||
call <SID>X("coffeeFuncCall", s:blue, "", "")
|
||||
|
||||
" JavaScript Highlighting
|
||||
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||
|
||||
" HTML Highlighting
|
||||
call <SID>X("htmlTag", s:foreground, "", "")
|
||||
call <SID>X("htmlTagName", s:foreground, "", "")
|
||||
call <SID>X("htmlArg", s:foreground, "", "")
|
||||
call <SID>X("htmlScriptTag", s:blue, "", "")
|
||||
|
||||
" Blade Tempalte Highlight
|
||||
call <SID>X("bladeDelimiter", s:orange, "", "")
|
||||
call <SID>X("bladeKeyword", s:blue, "", "")
|
||||
|
||||
" Diff Highlighting
|
||||
call <SID>X("DiffAdd", s:window, s:green, "none")
|
||||
call <SID>X("DiffDelete", s:window, s:red, "none")
|
||||
call <SID>X("DiffChange", s:window, s:yellow, "none")
|
||||
call <SID>X("DiffText", s:background, s:yellow, "none")
|
||||
|
||||
call <SID>X("GitGutterAdd", s:green, "", "")
|
||||
call <SID>X("GitGutterDelete", s:red, "", "")
|
||||
call <SID>X("GitGutterChange", s:yellow, "", "")
|
||||
call <SID>X("GitGutterChangeDelete", s:orange, "", "")
|
||||
|
||||
call <SID>X("VimwikiHeader1", s:red, "", "")
|
||||
call <SID>X("VimwikiHeader2", s:green, "", "")
|
||||
call <SID>X("VimwikiHeader3", s:blue, "", "")
|
||||
call <SID>X("VimwikiHeader4", s:function_name, "", "")
|
||||
call <SID>X("VimwikiHeader5", s:orange, "", "")
|
||||
call <SID>X("VimwikiHeader6", s:yellow, "", "")
|
||||
|
||||
" YAML
|
||||
call <SID>X("yamlBlockMappingKey", s:blue, "", "")
|
||||
|
||||
" Delete Functions
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>colour
|
||||
delf <SID>rgb_colour
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_colour
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
endif
|
||||
107
.vim/colors/campo-dark-simple.vim
Normal file
107
.vim/colors/campo-dark-simple.vim
Normal file
@@ -0,0 +1,107 @@
|
||||
" A simple dark colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
"
|
||||
" Adapted from https://github.com/tek256/simple-dark
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 0
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-dark-simple"
|
||||
|
||||
if has("gui_running") || &t_Co == 256
|
||||
hi NonText cterm=NONE ctermfg=black ctermbg=black gui=NONE guifg=bg guibg=#0a0a0a
|
||||
hi Normal cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#ffffff guibg=#0a0a0a
|
||||
hi Keyword cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#ffffff guibg=#0a0a0a
|
||||
hi Constant cterm=NONE ctermfg=252 ctermbg=black gui=NONE guifg=#d0d0d0 guibg=#0a0a0a
|
||||
hi String cterm=NONE ctermfg=245 ctermbg=black gui=NONE guifg=#aaaaaa guibg=#0a0a0a
|
||||
hi Comment cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#777777 guibg=#0a0a0a
|
||||
hi Number cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#ff0000 guibg=#0a0a0a
|
||||
hi LineNr cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#454545 guibg=#0a0a0a
|
||||
hi Error cterm=NONE ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#eeeeee guibg=#0a0a0a " Should match the text colors
|
||||
hi ErrorMsg cterm=bold ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#ff0000 guibg=#0a0a0a
|
||||
hi Search cterm=NONE ctermfg=245 ctermbg=Gray gui=NONE guifg=#fff229 guibg=#0a0a0a
|
||||
hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#ffffff guibg=#0a0a0a
|
||||
hi DiffChange cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#8a8a8a guibg=#0a0a0a
|
||||
hi DiffText cterm=bold ctermfg=255 ctermbg=DarkGray gui=bold guifg=#bcbcbc guibg=#0a0a0a
|
||||
hi SignColumn cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#0a0a0a
|
||||
hi SpellBad cterm=underline ctermfg=255 ctermbg=245 gui=undercurl guifg=#ff0000 guibg=#0a0a0a
|
||||
hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#0a0a0a
|
||||
hi SpellRare cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#8a8a8a guibg=#0a0a0a
|
||||
hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#0a0a0a
|
||||
hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#333333
|
||||
hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#444444
|
||||
hi PmenuSel cterm=bold,reverse ctermfg=250 ctermbg=black gui=reverse guifg=#bcbcbc guibg=#0a0a0a
|
||||
hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#eeeeee guibg=#0a0a0a
|
||||
hi MatchParen cterm=bold ctermfg=white ctermbg=black gui=NONE guifg=#bcbcbc guibg=#454545
|
||||
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#111111
|
||||
hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#111111
|
||||
hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=255 gui=NONE guifg=NONE guibg=#171717 " The column line set by colorcolumn
|
||||
hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=black gui=bold,reverse guifg=#8a8a8a guibg=#0a0a0a
|
||||
hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=black gui=reverse guifg=#303030 guibg=#0a0a0a
|
||||
hi Visual cterm=reverse ctermfg=250 ctermbg=black gui=reverse guifg=#bcbcbc guibg=#0a0a0a
|
||||
hi VertSplit cterm=NONE ctermfg=Gray ctermbg=black gui=NONE guifg=#0a0a0a guibg=#454545
|
||||
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE
|
||||
hi TabLineSel cterm=bold ctermfg=250 ctermbg=black gui=NONE guifg=#cccccc guibg=#0a0a0a " Active tab label
|
||||
hi TabLine cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#888888 guibg=#1d1d1d " Inactive tab label
|
||||
endif
|
||||
|
||||
highlight! link Boolean Normal
|
||||
highlight! link Delimiter Normal
|
||||
highlight! link Identifier Normal
|
||||
highlight! link Title Normal
|
||||
highlight! link TabLineFill TabLine " Tabline background
|
||||
highlight! link Debug Normal
|
||||
highlight! link Exception Normal
|
||||
highlight! link FoldColumn Normal
|
||||
highlight! link Macro Normal
|
||||
highlight! link ModeMsg Normal
|
||||
highlight! link MoreMsg Normal
|
||||
highlight! link Question Normal
|
||||
highlight! link Conditional Keyword
|
||||
highlight! link Statement Keyword
|
||||
highlight! link Operator Keyword
|
||||
highlight! link Structure Keyword
|
||||
highlight! link Function Keyword
|
||||
highlight! link Include Keyword
|
||||
highlight! link Type Keyword
|
||||
highlight! link Typedef Keyword
|
||||
highlight! link Todo Keyword
|
||||
highlight! link Label Keyword
|
||||
highlight! link Define Keyword
|
||||
highlight! link DiffAdd Keyword
|
||||
highlight! link Directory Keyword
|
||||
highlight! link PreCondit Keyword
|
||||
highlight! link PreProc Keyword
|
||||
highlight! link Repeat Keyword
|
||||
highlight! link Special Keyword
|
||||
highlight! link SpecialChar Keyword
|
||||
highlight! link StorageClass Keyword
|
||||
highlight! link SpecialComment String
|
||||
highlight! link CursorLineNr Keyword
|
||||
highlight! link Character Number
|
||||
highlight! link Float Number
|
||||
highlight! link Tag Number
|
||||
highlight! link Folded Number
|
||||
highlight! link WarningMsg Number
|
||||
highlight! link iCursor SpecialKey
|
||||
highlight! link SpellLocal SpellCap
|
||||
highlight! link NonText NonText
|
||||
highlight! link DiffDelete Comment
|
||||
highlight! link PmenuSbar Visual
|
||||
highlight! link VisualNOS Visual
|
||||
highlight! link VertSplit VertSplit
|
||||
highlight! link Cursor StatusLine
|
||||
highlight! link Underlined SpellRare
|
||||
highlight! link rstEmphasis SpellRare
|
||||
105
.vim/colors/campo-light-greyscale.vim
Normal file
105
.vim/colors/campo-light-greyscale.vim
Normal file
@@ -0,0 +1,105 @@
|
||||
" A very simple light colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 1
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=light
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-light-greyscale"
|
||||
|
||||
if has("gui_running") || &t_Co == 256
|
||||
hi NonText cterm=NONE ctermfg=black ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Normal cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Keyword cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Constant cterm=NONE ctermfg=252 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi String cterm=NONE ctermfg=245 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Comment cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#7c7c7c guibg=#fbfbfb
|
||||
hi Number cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Error cterm=NONE ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#263238 guibg=#fbfbfb " Should match the text colors
|
||||
hi ErrorMsg cterm=bold ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi Search cterm=NONE ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#cccccc
|
||||
hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#fbfbfb
|
||||
hi DiffChange cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi DiffText cterm=bold ctermfg=255 ctermbg=DarkGray gui=bold guifg=#263238 guibg=#fbfbfb
|
||||
hi SignColumn cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi SpellBad cterm=undercurl ctermfg=255 ctermbg=245 gui=undercurl guifg=#ff0000 guibg=#fbfbfb
|
||||
hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi SpellRare cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#fbfbfb
|
||||
hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#333333 " autocomplete menu
|
||||
hi PmenuSel cterm=bold ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#454545 " autocomplete menu selection
|
||||
hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#cccccc " autocomplete scroller bar
|
||||
hi PmenuSbar cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#454545 " autocomplete scroller background
|
||||
hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#ff00ff guibg=#fbfbfb
|
||||
hi MatchParen cterm=bold ctermfg=white ctermbg=black gui=NONE guifg=#000000 guibg=#dddddd
|
||||
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#dddddd
|
||||
hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#dddddd
|
||||
hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=255 gui=NONE guifg=NONE guibg=#dddddd
|
||||
hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=black gui=bold,reverse guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=black gui=reverse guifg=#303030 guibg=#fbfbfb
|
||||
hi Visual cterm=reverse ctermfg=250 ctermbg=black gui=reverse guifg=#263238 guibg=#fbfbfb
|
||||
hi VertSplit cterm=NONE ctermfg=Gray ctermbg=black gui=NONE guifg=#aaaaaa guibg=#dddddd
|
||||
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE
|
||||
hi TabLineSel cterm=bold ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb " Active tab label
|
||||
hi TabLine cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#4a4a4a guibg=#aaaaaa " Inactive tab label
|
||||
endif
|
||||
|
||||
highlight! link Boolean Normal
|
||||
highlight! link Delimiter Normal
|
||||
highlight! link Identifier Normal
|
||||
highlight! link Title Normal
|
||||
highlight! link TabLineFill TabLine " Tabline background
|
||||
highlight! link Debug Normal
|
||||
highlight! link Exception Normal
|
||||
highlight! link FoldColumn Normal
|
||||
highlight! link Macro Normal
|
||||
highlight! link ModeMsg Normal
|
||||
highlight! link MoreMsg Normal
|
||||
highlight! link Question Normal
|
||||
highlight! link Conditional Keyword
|
||||
highlight! link Statement Keyword
|
||||
highlight! link Operator Keyword
|
||||
highlight! link Structure Keyword
|
||||
highlight! link Function Keyword
|
||||
highlight! link Include Keyword
|
||||
highlight! link Type Keyword
|
||||
highlight! link Typedef Keyword
|
||||
highlight! link Todo Keyword
|
||||
highlight! link Label Keyword
|
||||
highlight! link Define Keyword
|
||||
highlight! link DiffAdd Keyword
|
||||
highlight! link Directory Keyword
|
||||
highlight! link PreCondit Keyword
|
||||
highlight! link PreProc Keyword
|
||||
highlight! link Repeat Keyword
|
||||
highlight! link Special Keyword
|
||||
highlight! link SpecialChar Keyword
|
||||
highlight! link StorageClass Keyword
|
||||
highlight! link SpecialComment String
|
||||
highlight! link CursorLineNr String
|
||||
highlight! link Character Number
|
||||
highlight! link Float Number
|
||||
highlight! link Tag Number
|
||||
highlight! link Folded Number
|
||||
highlight! link WarningMsg Number
|
||||
highlight! link iCursor SpecialKey
|
||||
highlight! link SpellLocal SpellCap
|
||||
highlight! link LineNr Comment
|
||||
highlight! link NonText NonText
|
||||
highlight! link DiffDelete Comment
|
||||
highlight! link VisualNOS Visual
|
||||
highlight! link VertSplit VertSplit
|
||||
highlight! link Cursor StatusLine
|
||||
highlight! link Underlined SpellRare
|
||||
highlight! link rstEmphasis SpellRare
|
||||
107
.vim/colors/campo-light-simple.vim
Normal file
107
.vim/colors/campo-light-simple.vim
Normal file
@@ -0,0 +1,107 @@
|
||||
" A simple light colorscheme.
|
||||
" Maintainer: Michael Campagnaro
|
||||
" Version: 1.0
|
||||
"
|
||||
" Adapted from https://github.com/tek256/simple-dark
|
||||
|
||||
if has('termguicolors')
|
||||
" Supports 24-bit color range
|
||||
set termguicolors
|
||||
let g:campo_theme_use_rainbow_parens = 1
|
||||
else
|
||||
echoerr "This theme requires 'termguicolors' support!"
|
||||
endif
|
||||
|
||||
set background=light
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-light-simple"
|
||||
|
||||
if has("gui_running") || &t_Co == 256
|
||||
hi NonText cterm=NONE ctermfg=black ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Normal cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Keyword cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Constant cterm=NONE ctermfg=252 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi String cterm=NONE ctermfg=245 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb
|
||||
hi Comment cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#7c7c7c guibg=#fbfbfb
|
||||
hi Number cterm=NONE ctermfg=255 ctermbg=black gui=NONE guifg=#0000ff guibg=#fbfbfb
|
||||
hi Error cterm=NONE ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#263238 guibg=#fbfbfb " Should match the text colors
|
||||
hi ErrorMsg cterm=bold ctermfg=255 ctermbg=DarkGray gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi Search cterm=NONE ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#cccccc
|
||||
hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#263238 guibg=#fbfbfb
|
||||
hi DiffChange cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi DiffText cterm=bold ctermfg=255 ctermbg=DarkGray gui=bold guifg=#263238 guibg=#fbfbfb
|
||||
hi SignColumn cterm=NONE ctermfg=240 ctermbg=black gui=NONE guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi SpellBad cterm=undercurl ctermfg=255 ctermbg=245 gui=undercurl guifg=#ff0000 guibg=#fbfbfb
|
||||
hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi SpellRare cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#ff0000 guibg=#fbfbfb
|
||||
hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#fbfbfb
|
||||
hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#333333 " autocomplete menu
|
||||
hi PmenuSel cterm=bold ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#454545 " autocomplete menu selection
|
||||
hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#cccccc " autocomplete scroller bar
|
||||
hi PmenuSbar cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=NONE guibg=#454545 " autocomplete scroller background
|
||||
hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#ff00ff guibg=#fbfbfb
|
||||
hi MatchParen cterm=bold ctermfg=white ctermbg=black gui=NONE guifg=#000000 guibg=#dddddd
|
||||
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#eeeeee
|
||||
hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#eeeeee
|
||||
hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=255 gui=NONE guifg=NONE guibg=#eeeeee " The column line set by colorcolumn
|
||||
hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=black gui=bold,reverse guifg=#8a8a8a guibg=#fbfbfb
|
||||
hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=black gui=reverse guifg=#303030 guibg=#fbfbfb
|
||||
hi Visual cterm=reverse ctermfg=250 ctermbg=black gui=reverse guifg=#263238 guibg=#fbfbfb
|
||||
hi VertSplit cterm=NONE ctermfg=Gray ctermbg=black gui=NONE guifg=#aaaaaa guibg=#dddddd
|
||||
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE
|
||||
hi TabLineSel cterm=bold ctermfg=250 ctermbg=black gui=NONE guifg=#263238 guibg=#fbfbfb " Active tab label
|
||||
hi TabLine cterm=NONE ctermfg=250 ctermbg=black gui=NONE guifg=#4a4a4a guibg=#aaaaaa " Inactive tab label
|
||||
endif
|
||||
|
||||
highlight! link Boolean Normal
|
||||
highlight! link Delimiter Normal
|
||||
highlight! link Identifier Normal
|
||||
highlight! link Title Normal
|
||||
highlight! link TabLineFill TabLine " Tabline background
|
||||
highlight! link Debug Normal
|
||||
highlight! link Exception Normal
|
||||
highlight! link FoldColumn Normal
|
||||
highlight! link Macro Normal
|
||||
highlight! link ModeMsg Normal
|
||||
highlight! link MoreMsg Normal
|
||||
highlight! link Question Normal
|
||||
highlight! link Conditional Keyword
|
||||
highlight! link Statement Keyword
|
||||
highlight! link Operator Keyword
|
||||
highlight! link Structure Keyword
|
||||
highlight! link Function Keyword
|
||||
highlight! link Include Keyword
|
||||
highlight! link Type Keyword
|
||||
highlight! link Typedef Keyword
|
||||
highlight! link Todo Keyword
|
||||
highlight! link Label Keyword
|
||||
highlight! link Define Keyword
|
||||
highlight! link DiffAdd Keyword
|
||||
highlight! link Directory Keyword
|
||||
highlight! link PreCondit Keyword
|
||||
highlight! link PreProc Keyword
|
||||
highlight! link Repeat Keyword
|
||||
highlight! link Special Keyword
|
||||
highlight! link SpecialChar Keyword
|
||||
highlight! link StorageClass Keyword
|
||||
highlight! link SpecialComment String
|
||||
highlight! link CursorLineNr String
|
||||
highlight! link Character Number
|
||||
highlight! link Float Number
|
||||
highlight! link Tag Number
|
||||
highlight! link Folded Number
|
||||
highlight! link WarningMsg Number
|
||||
highlight! link iCursor SpecialKey
|
||||
highlight! link SpellLocal SpellCap
|
||||
highlight! link LineNr Comment
|
||||
highlight! link NonText NonText
|
||||
highlight! link DiffDelete Comment
|
||||
highlight! link VisualNOS Visual
|
||||
highlight! link VertSplit VertSplit
|
||||
highlight! link Cursor StatusLine
|
||||
highlight! link Underlined SpellRare
|
||||
highlight! link rstEmphasis SpellRare
|
||||
403
.vim/colors/campo-light.vim
Normal file
403
.vim/colors/campo-light.vim
Normal file
@@ -0,0 +1,403 @@
|
||||
" A simple light vim colorscheme.
|
||||
" Maintainer: Michael Campagnaro <mikecampo@gmail.com>
|
||||
" Version: 1.0
|
||||
"
|
||||
" The theme file original copied from the Tomorrow theme.
|
||||
" See https://github.com/chriskempson/vim-tomorrow-theme.git for it.
|
||||
" Hex color conversion functions borrowed from the theme "Desert256".
|
||||
|
||||
let g:campo_theme_use_rainbow_parens = 1
|
||||
|
||||
" Default GUI colors
|
||||
let s:foreground = "263238"
|
||||
let s:background = "fbfbfb"
|
||||
let s:selection = "e3fc8d"
|
||||
let s:line = "d5d5d5"
|
||||
let s:comment = "7c7c7c"
|
||||
let s:red = "d62a28"
|
||||
let s:orange = "ff7800"
|
||||
let s:yellow = "eab700"
|
||||
let s:green = "409b1c"
|
||||
let s:aqua = "00897b"
|
||||
let s:blue = "3b5bb5"
|
||||
let s:purple = "673ab7"
|
||||
let s:black = "000000"
|
||||
let s:window = "cfd8dc"
|
||||
|
||||
let s:error_msg_background = s:background
|
||||
let s:error_msg_foreground = "e40e0e"
|
||||
|
||||
set background=light
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "campo-light"
|
||||
|
||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||
" 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_colour(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 colour index for the given colour 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 colour level for the given colour 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 colour indices
|
||||
fun <SID>rgb_colour(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 colour levels
|
||||
fun <SID>colour(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 colour
|
||||
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_colour(l:gx)
|
||||
else
|
||||
" Use the colour
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" Only one possibility
|
||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
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>colour(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" Sets the highlighting for the given group
|
||||
fun <SID>X(group, fg, bg, attr)
|
||||
if a:fg != ""
|
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||
endif
|
||||
if a:bg != ""
|
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("Normal", s:foreground, s:background, "")
|
||||
call <SID>X("LineNr", s:comment, "", "none")
|
||||
call <SID>X("NonText", s:foreground, "", "")
|
||||
call <SID>X("SpecialKey", s:blue, "", "")
|
||||
call <SID>X("Search", s:foreground, s:selection, "")
|
||||
call <SID>X("TabLine", s:foreground, s:background, "reverse")
|
||||
call <SID>X("StatusLine", s:window, s:foreground, "reverse")
|
||||
call <SID>X("StatusLineNC", s:window, s:comment, "reverse")
|
||||
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||
call <SID>X("Visual", "", s:selection, "")
|
||||
call <SID>X("Directory", s:blue, "", "")
|
||||
call <SID>X("ModeMsg", s:green, "", "")
|
||||
call <SID>X("MoreMsg", s:green, "", "")
|
||||
call <SID>X("Question", s:green, "", "")
|
||||
call <SID>X("WarningMsg", s:red, "", "")
|
||||
call <SID>X("MatchParen", "", s:selection, "")
|
||||
call <SID>X("Folded", s:comment, s:background, "")
|
||||
call <SID>X("FoldColumn", s:comment, s:background, "")
|
||||
if version >= 700
|
||||
call <SID>X("CursorLine", "", s:line, "none")
|
||||
call <SID>X("CursorColumn", "", s:line, "none")
|
||||
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||
call <SID>X("SignColumn", "", s:background, "none")
|
||||
end
|
||||
if version >= 703
|
||||
call <SID>X("ColorColumn", "", s:line, "none")
|
||||
end
|
||||
|
||||
" Standard Highlighting
|
||||
call <SID>X("Comment", s:comment, "", "none")
|
||||
call <SID>X("Title", s:comment, "", "")
|
||||
call <SID>X("Cursor", "", s:foreground, "")
|
||||
call <SID>X("Identifier", s:aqua, "", "none")
|
||||
call <SID>X("Statement", s:foreground, "", "")
|
||||
call <SID>X("Conditional", s:foreground, "", "")
|
||||
call <SID>X("Repeat", s:foreground, "", "")
|
||||
call <SID>X("Structure", s:purple, "", "")
|
||||
call <SID>X("Function", s:blue, "", "")
|
||||
call <SID>X("Constant", s:foreground, "", "")
|
||||
call <SID>X("String", s:green, "", "")
|
||||
call <SID>X("Special", s:foreground, "", "")
|
||||
call <SID>X("PreProc", s:aqua, "", "")
|
||||
call <SID>X("Operator", s:foreground, "", "none")
|
||||
call <SID>X("Type", s:blue, "", "none")
|
||||
call <SID>X("Define", s:purple, "", "none")
|
||||
call <SID>X("Include", s:blue, "", "")
|
||||
call <SID>X("Number", s:black, "", "")
|
||||
"call <SID>X("Ignore", "666666", "", "")
|
||||
|
||||
" Custom TODO/NOTE colors
|
||||
call <SID>X("Todo", s:red, s:background, "underline")
|
||||
call <SID>X("Bugs", s:red, s:background, "standout")
|
||||
call <SID>X("Notes","666666", "ffffff","bold")
|
||||
call <SID>X("Notices","dcd53e",s:background,"bold")
|
||||
call <SID>X("ErrorMsg", s:error_msg_foreground, s:error_msg_background, "underline")
|
||||
|
||||
|
||||
" Vim Highlighting
|
||||
call <SID>X("vimCommand", s:blue, "", "none")
|
||||
|
||||
" C Highlighting
|
||||
call <SID>X("cType", s:blue, "", "")
|
||||
call <SID>X("cStorageClass", s:blue, "", "")
|
||||
call <SID>X("cConditional", s:red, "", "")
|
||||
call <SID>X("cRepeat", s:red, "", "")
|
||||
|
||||
" PHP Highlighting
|
||||
call <SID>X("phpVarSelector", s:aqua, "", "")
|
||||
call <SID>X("phpKeyword", s:blue, "", "")
|
||||
call <SID>X("phpRepeat", s:red, "", "")
|
||||
call <SID>X("phpConditional", s:blue, "", "")
|
||||
call <SID>X("phpStatement", s:blue, "", "")
|
||||
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||
|
||||
" Ruby Highlighting
|
||||
call <SID>X("rubySymbol", s:green, "", "")
|
||||
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||
call <SID>X("rubyInclude", s:blue, "", "")
|
||||
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||
call <SID>X("rubyConditional", s:purple, "", "")
|
||||
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||
|
||||
" Python Highlighting
|
||||
call <SID>X("pythonInclude", s:red, "", "")
|
||||
call <SID>X("pythonStatement", s:aqua, "", "")
|
||||
call <SID>X("pythonConditional", s:blue, "", "")
|
||||
call <SID>X("pythonRepeat", s:blue, "", "")
|
||||
call <SID>X("pythonException", s:blue, "", "")
|
||||
call <SID>X("pythonFunction", s:purple, "", "")
|
||||
call <SID>X("pythonSelf", s:comment, "", "")
|
||||
call <SID>X("pythonOperator", s:blue, "", "")
|
||||
call <SID>X("pythonExtraOperator", s:blue, "", "")
|
||||
call <SID>X("pythonClass", s:blue, "", "")
|
||||
call <SID>X("pythonDecorator", s:yellow, "", "")
|
||||
call <SID>X("pythonDocstring", s:comment, "", "")
|
||||
call <SID>X("pythonBuiltinObj", s:red, "", "")
|
||||
call <SID>X("pythonBuiltinType", s:orange, "", "")
|
||||
call <SID>X("pythonNumber", s:black, "", "")
|
||||
|
||||
|
||||
" Go Highlighting
|
||||
call <SID>X("goStatement", s:purple, "", "")
|
||||
call <SID>X("goConditional", s:purple, "", "")
|
||||
call <SID>X("goRepeat", s:purple, "", "")
|
||||
call <SID>X("goException", s:purple, "", "")
|
||||
call <SID>X("goDeclaration", s:blue, "", "")
|
||||
call <SID>X("goConstants", s:yellow, "", "")
|
||||
call <SID>X("goBuiltins", s:orange, "", "")
|
||||
|
||||
" CoffeeScript Highlighting
|
||||
call <SID>X("coffeeKeyword", s:purple, "", "")
|
||||
call <SID>X("coffeeConditional", s:purple, "", "")
|
||||
|
||||
" JavaScript Highlighting
|
||||
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||
call <SID>X("javaScriptNumber", s:black, "", "")
|
||||
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||
|
||||
" HTML Highlighting
|
||||
call <SID>X("htmlTag", s:blue, "", "")
|
||||
call <SID>X("htmlTagName", s:blue, "", "")
|
||||
call <SID>X("htmlArg", s:aqua, "", "")
|
||||
call <SID>X("htmlScriptTag", s:blue, "", "")
|
||||
|
||||
" Diff Highlighting
|
||||
call <SID>X("DiffAdd", s:window, s:green, "none")
|
||||
call <SID>X("DiffDelete", s:window, s:red, "none")
|
||||
call <SID>X("DiffChange", s:window, s:yellow, "none")
|
||||
call <SID>X("DiffText", s:background, s:yellow, "none")
|
||||
|
||||
call <SID>X("GitGutterAdd", s:green, "", "")
|
||||
call <SID>X("GitGutterDelete", s:red, "", "")
|
||||
call <SID>X("GitGutterChange", s:yellow, "", "")
|
||||
call <SID>X("GitGutterChangeDelete", s:orange, "", "")
|
||||
|
||||
" YAML
|
||||
call <SID>X("yamlBlockMappingKey", s:blue, "", "")
|
||||
|
||||
" Delete Functions
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>colour
|
||||
delf <SID>rgb_colour
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_colour
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
endif
|
||||
215
.vim/colors/hemisu.vim
Normal file
215
.vim/colors/hemisu.vim
Normal file
@@ -0,0 +1,215 @@
|
||||
" hemisu.vim - Vim color scheme
|
||||
" ----------------------------------------------------------
|
||||
" Author: Noah Frederick (http://noahfrederick.com/)
|
||||
" Version: 3.4
|
||||
" License: Creative Commons Attribution-NonCommercial
|
||||
" 3.0 Unported License (see README.md)
|
||||
" ----------------------------------------------------------
|
||||
|
||||
" Setup ----------------------------------------------------{{{
|
||||
" Reset syntax highlighting
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
" Declare theme name
|
||||
let g:colors_name = "hemisu"
|
||||
|
||||
"}}}
|
||||
" The Colors -----------------------------------------------{{{
|
||||
" Define reusable colors
|
||||
let s:black = { "gui": "#000000", "cterm": "16" }
|
||||
let s:white = { "gui": "#FFFFFF", "cterm": "231" }
|
||||
let s:almostWhite = { "gui": "#EEEEEE", "cterm": "255" }
|
||||
let s:almostBlack = { "gui": "#111111", "cterm": "233" }
|
||||
let s:middleDarkGrey = { "gui": "#777777", "cterm": "241" }
|
||||
let s:middleLightGrey = { "gui": "#999999", "cterm": "246" }
|
||||
let s:lightGrey = { "gui": "#BBBBBB", "cterm": "249" }
|
||||
let s:darkGrey = { "gui": "#444444", "cterm": "238" }
|
||||
|
||||
let s:darkPink = { "gui": "#63001C", "cterm": "88" }
|
||||
let s:middleDarkPink = { "gui": "#FF0055", "cterm": "197" }
|
||||
let s:middleLightPink = { "gui": "#D65E76", "cterm": "167" }
|
||||
let s:lightPink = { "gui": "#FFAFAF", "cterm": "217" }
|
||||
|
||||
let s:darkBlue = { "gui": "#005F87", "cterm": "24" }
|
||||
let s:middleDarkBlue = { "gui": "#538192", "cterm": "24" }
|
||||
let s:middleLightBlue = { "gui": "#9FD3E6", "cterm": "116" }
|
||||
let s:lightBlue = { "gui": "#CBE4EE", "cterm": "195" }
|
||||
|
||||
let s:darkGreen = { "gui": "#5F5F00", "cterm": "58" }
|
||||
let s:middleDarkGreen = { "gui": "#739200", "cterm": "64" }
|
||||
let s:middleLightGreen = { "gui": "#B1D631", "cterm": "149" }
|
||||
let s:lightGreen = { "gui": "#BBFFAA", "cterm": "157" }
|
||||
|
||||
let s:darkTan = { "gui": "#503D15", "cterm": "52" }
|
||||
let s:lightTan = { "gui": "#ECE1C8", "cterm": "230" }
|
||||
|
||||
" Assign to semantic categories based on background color
|
||||
if &background == "dark"
|
||||
" Dark theme
|
||||
let s:bg = s:black
|
||||
let s:norm = s:almostWhite
|
||||
let s:comment = s:middleDarkGrey
|
||||
let s:dimmed = s:middleLightGrey
|
||||
let s:subtle = s:darkGrey
|
||||
let s:faint = s:almostBlack
|
||||
let s:accent1 = s:middleLightBlue
|
||||
let s:accent2 = s:middleLightGreen
|
||||
let s:accent3 = s:lightGreen
|
||||
let s:accent4 = s:lightTan
|
||||
let s:normRed = s:middleLightPink
|
||||
let s:normGreen = s:middleLightGreen
|
||||
let s:normBlue = s:middleLightBlue
|
||||
let s:faintRed = s:darkPink
|
||||
let s:faintGreen = s:darkGreen
|
||||
let s:faintBlue = s:darkBlue
|
||||
else
|
||||
" Light theme
|
||||
let s:bg = s:white
|
||||
let s:norm = s:almostBlack
|
||||
let s:comment = s:middleLightGrey
|
||||
let s:dimmed = s:middleDarkGrey
|
||||
let s:subtle = s:lightGrey
|
||||
let s:faint = s:almostWhite
|
||||
let s:accent1 = s:middleDarkBlue
|
||||
let s:accent2 = s:middleDarkGreen
|
||||
let s:accent3 = s:middleDarkPink
|
||||
let s:accent4 = s:darkTan
|
||||
let s:normRed = s:middleDarkPink
|
||||
let s:normGreen = s:middleDarkGreen
|
||||
let s:normBlue = s:middleDarkBlue
|
||||
let s:faintRed = s:lightPink
|
||||
let s:faintGreen = s:lightGreen
|
||||
let s:faintBlue = s:lightBlue
|
||||
endif
|
||||
|
||||
"}}}
|
||||
" Utility Function -----------------------------------------{{{
|
||||
function! s:h(group, style)
|
||||
execute "highlight" a:group
|
||||
\ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE")
|
||||
\ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE")
|
||||
\ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE")
|
||||
\ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE")
|
||||
\ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE")
|
||||
\ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE")
|
||||
\ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE")
|
||||
endfunction
|
||||
|
||||
"}}}
|
||||
" Highlights - Vim >= 7 ------------------------------------{{{
|
||||
if version >= 700
|
||||
call s:h("CursorLine", { "bg": s:faint })
|
||||
call s:h("MatchParen", { "fg": s:accent1, "bg": s:faint, "gui": "bold" })
|
||||
call s:h("Pmenu", { "bg": s:faint })
|
||||
call s:h("PmenuThumb", { "bg": s:norm })
|
||||
call s:h("PmenuSBar", { "bg": s:subtle })
|
||||
call s:h("PmenuSel", { "bg": s:faintBlue })
|
||||
call s:h("ColorColumn", { "bg": s:faintRed })
|
||||
call s:h("SpellBad", { "sp": s:normRed, "gui": "undercurl" })
|
||||
call s:h("SpellCap", { "sp": s:accent1, "gui": "undercurl" })
|
||||
call s:h("SpellRare", { "sp": s:normGreen, "gui": "undercurl" })
|
||||
call s:h("SpellLocal", { "sp": s:accent4, "gui": "undercurl" })
|
||||
hi! link CursorColumn CursorLine
|
||||
|
||||
" Use background for cterm Spell*, which does not support undercurl
|
||||
execute "hi! SpellBad ctermbg=" s:faintRed.cterm
|
||||
execute "hi! SpellCap ctermbg=" s:faintBlue.cterm
|
||||
execute "hi! SpellRare ctermbg=" s:faintGreen.cterm
|
||||
execute "hi! SpellLocal ctermbg=" s:faint.cterm
|
||||
endif
|
||||
|
||||
"}}}
|
||||
" Highlights - UI ------------------------------------------{{{
|
||||
call s:h("Normal", { "fg": s:norm, "bg": s:bg })
|
||||
call s:h("NonText", { "fg": s:subtle })
|
||||
call s:h("Cursor", { "fg": s:bg, "bg": s:accent3 })
|
||||
call s:h("Visual", { "bg": s:faintBlue })
|
||||
call s:h("IncSearch", { "bg": s:faintBlue })
|
||||
call s:h("Search", { "bg": s:faintGreen })
|
||||
call s:h("StatusLine", { "fg": s:norm, "bg": s:faint, "gui": "bold", "cterm": "bold" })
|
||||
call s:h("StatusLineNC", { "fg": s:dimmed, "bg": s:faint })
|
||||
call s:h("SignColumn", { "fg": s:norm })
|
||||
call s:h("VertSplit", { "fg": s:subtle, "bg": s:faint })
|
||||
call s:h("TabLine", { "fg": s:dimmed, "bg": s:faint })
|
||||
call s:h("TabLineSel", { "gui": "bold", "cterm": "bold" })
|
||||
call s:h("Folded", { "fg": s:comment, "bg": s:faint })
|
||||
call s:h("Directory", { "fg": s:accent1 })
|
||||
call s:h("Title", { "fg": s:accent4, "gui": "bold", "cterm": "bold" })
|
||||
call s:h("ErrorMsg", { "bg": s:faintRed })
|
||||
call s:h("DiffAdd", { "bg": s:faintGreen })
|
||||
call s:h("DiffChange", { "bg": s:faintRed })
|
||||
call s:h("DiffDelete", { "fg": s:normRed, "bg": s:faintRed })
|
||||
call s:h("DiffText", { "bg": s:faintRed, "gui": "bold", "cterm": "bold" })
|
||||
call s:h("User1", { "fg": s:bg, "bg": s:normGreen })
|
||||
call s:h("User2", { "fg": s:bg, "bg": s:normRed })
|
||||
call s:h("User3", { "fg": s:bg, "bg": s:normBlue })
|
||||
hi! link WildMenu IncSearch
|
||||
hi! link FoldColumn SignColumn
|
||||
hi! link WarningMsg ErrorMsg
|
||||
hi! link MoreMsg Title
|
||||
hi! link Question MoreMsg
|
||||
hi! link ModeMsg MoreMsg
|
||||
hi! link TabLineFill StatusLineNC
|
||||
hi! link LineNr NonText
|
||||
hi! link SpecialKey NonText
|
||||
|
||||
"}}}
|
||||
" Highlights - Generic Syntax ------------------------------{{{
|
||||
call s:h("Delimiter", { "fg": s:dimmed })
|
||||
call s:h("Comment", { "fg": s:comment, "gui": "italic" })
|
||||
call s:h("Underlined", { "fg": s:accent1, "gui": "underline", "cterm": "underline" })
|
||||
call s:h("Type", { "fg": s:accent3 })
|
||||
call s:h("String", { "fg": s:accent2 })
|
||||
call s:h("Keyword", { "fg": s:accent2, "gui": "bold", "cterm": "bold" })
|
||||
call s:h("Todo", { "fg": s:normRed, "gui": "bold", "cterm": "bold" })
|
||||
call s:h("Function", { "gui": "bold", "cterm": "bold" })
|
||||
hi! link Identifier Function
|
||||
hi! link Statement Type
|
||||
hi! link Constant Directory
|
||||
hi! link Number Constant
|
||||
hi! link Special Constant
|
||||
hi! link PreProc Constant
|
||||
hi! link Error ErrorMsg
|
||||
|
||||
"}}}
|
||||
" Highlights - HTML ----------------------------------------{{{
|
||||
hi! link htmlLink Underlined
|
||||
hi! link htmlTag Type
|
||||
hi! link htmlEndTag htmlTag
|
||||
|
||||
"}}}
|
||||
" Highlights - CSS -----------------------------------------{{{
|
||||
hi! link cssBraces Delimiter
|
||||
hi! link cssSelectorOp cssBraces
|
||||
hi! link cssClassName Normal
|
||||
|
||||
"}}}
|
||||
" Highlights - Markdown ------------------------------------{{{
|
||||
hi! link mkdListItem mkdDelimiter
|
||||
|
||||
"}}}
|
||||
" Highlights - Shell ---------------------------------------{{{
|
||||
hi! link shOperator Delimiter
|
||||
hi! link shCaseBar Delimiter
|
||||
|
||||
"}}}
|
||||
" Highlights - JavaScript ----------------------------------{{{
|
||||
hi! link javaScriptValue Constant
|
||||
hi! link javaScriptNull Constant
|
||||
hi! link javaScriptBraces Normal
|
||||
|
||||
"}}}
|
||||
" Highlights - Help ----------------------------------------{{{
|
||||
hi! link helpExample String
|
||||
hi! link helpHeadline Title
|
||||
hi! link helpSectionDelim Comment
|
||||
hi! link helpHyperTextEntry Statement
|
||||
hi! link helpHyperTextJump Underlined
|
||||
hi! link helpURL Underlined
|
||||
|
||||
"}}}
|
||||
|
||||
" vim: fdm=marker:sw=2:sts=2:et
|
||||
209
.vim/colors/utils
Normal file
209
.vim/colors/utils
Normal file
@@ -0,0 +1,209 @@
|
||||
" Hex color conversion functions are from https://github.com/vim-scripts/desert256.vim/blob/master/colors/desert256.vim
|
||||
|
||||
" Returns an approximate grey index for the given grey level
|
||||
function! GreyNumber(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
|
||||
function! GreyLevel(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
|
||||
function! GreyColor(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 colour index for the given colour level
|
||||
function! RGBNumber(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 colour level for the given colour index
|
||||
function! RGBLevel(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 colour indices
|
||||
function! RGBColor(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 colour levels
|
||||
function! Color(r, g, b)
|
||||
" Get the closest grey
|
||||
let l:gx = GreyNumber(a:r)
|
||||
let l:gy = GreyNumber(a:g)
|
||||
let l:gz = GreyNumber(a:b)
|
||||
|
||||
" Get the closest colour
|
||||
let l:x = RGBNumber(a:r)
|
||||
let l:y = RGBNumber(a:g)
|
||||
let l:z = RGBNumber(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" There are two possibilities
|
||||
let l:dgr = GreyLevel(l:gx) - a:r
|
||||
let l:dgg = GreyLevel(l:gy) - a:g
|
||||
let l:dgb = GreyLevel(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = RGBLevel(l:gx) - a:r
|
||||
let l:dg = RGBLevel(l:gy) - a:g
|
||||
let l:db = RGBLevel(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 GreyColor(l:gx)
|
||||
else
|
||||
" Use the colour
|
||||
return RGBColor(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" Only one possibility
|
||||
return RGBColor(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||
function! RGB(rgb)
|
||||
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 Color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" Sets the highlighting for the given group
|
||||
function! X(group, fg, bg, attr)
|
||||
if a:fg != ""
|
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . RGB(a:fg)
|
||||
endif
|
||||
if a:bg != ""
|
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . RGB(a:bg)
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
Reference in New Issue
Block a user