mirror of
https://github.com/gryf/.vim.git
synced 2025-12-18 03:50:30 +01:00
Moja prawie współczesna konfiguracja. Dużo rzeczy :)
This commit is contained in:
215
colors/lettuce.vim
Normal file
215
colors/lettuce.vim
Normal file
@@ -0,0 +1,215 @@
|
||||
" Vim color file
|
||||
" Version: 1.2 2007.08.08
|
||||
" Author: Valyaeff Valentin <hhyperr AT gmail DOT com>
|
||||
" License: GPL
|
||||
"
|
||||
" Copyright 2007 Valyaeff Valentin
|
||||
"
|
||||
" This program is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
"
|
||||
" This program is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
"
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name="lettuce"
|
||||
|
||||
|
||||
augroup Syntax_extensions
|
||||
au!
|
||||
au Syntax c,cpp,ruby,javascript syn match Operator "[*/%&|!=><^~,.;:?+-]\+" display contains=TOP
|
||||
au Syntax c,cpp syn region cParen matchgroup=Operator transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
|
||||
au Syntax c,cpp syn region cCppParen matchgroup=Operator transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||
au Syntax c,cpp syn region cBracket matchgroup=Operator transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
|
||||
au Syntax c,cpp syn region cCppBracket matchgroup=Operator transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
|
||||
au Syntax c,cpp syn region cBlock matchgroup=OperatorCurlyBrackets start="{" end="}" transparent fold
|
||||
au Syntax ruby syn match rubyBlockParameter "\%(\%(\<do\>\|{\)\s*\)\@<=|\s*[( ,a-zA-Z0-9_*)]\+\ze\s*|"hs=s+1 display
|
||||
au Syntax ruby syn region rubyCurlyBlock matchgroup=Operator start="{" end="}" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold
|
||||
au Syntax ruby syn region rubyParentheses matchgroup=Operator start="(" end=")" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
|
||||
au Syntax ruby syn region rubySquareBrackets matchgroup=Operator start="\[" end="\]" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
|
||||
au Syntax javascript syn region javascriptCurlyBrackets matchgroup=Operator start="{" end="}" transparent fold
|
||||
au Syntax javascript syn region javascriptParentheses matchgroup=Operator start="(" end=")" transparent
|
||||
au Syntax javascript syn region javascriptSquareBrackets matchgroup=Operator start="\[" end="\]" transparent
|
||||
augroup END
|
||||
|
||||
|
||||
if !has("gui_running")
|
||||
|
||||
hi rubyGlobalVariable cterm=none ctermfg=64
|
||||
hi rubyPredefinedIdentifier cterm=bold ctermfg=64
|
||||
hi def link rubyStringDelimiter String
|
||||
|
||||
hi Normal cterm=none ctermbg=232 ctermfg=189
|
||||
hi StatusLine cterm=none ctermbg=236 ctermfg=231
|
||||
hi StatusLineNC cterm=none ctermbg=236 ctermfg=103
|
||||
hi User1 cterm=bold ctermbg=236 ctermfg=223
|
||||
hi User2 cterm=none ctermbg=236 ctermfg=240
|
||||
hi VertSplit cterm=none ctermbg=236 ctermfg=103
|
||||
hi TabLine cterm=none ctermbg=236 ctermfg=145
|
||||
hi TabLineFill cterm=none ctermbg=236
|
||||
hi TabLineSel cterm=none ctermbg=240 ctermfg=253
|
||||
hi LineNr cterm=none ctermfg=238
|
||||
hi NonText cterm=bold ctermbg=233 ctermfg=241
|
||||
hi Folded cterm=none ctermbg=234 ctermfg=136
|
||||
hi FoldColumn cterm=none ctermbg=236 ctermfg=103
|
||||
hi SignColumn cterm=none ctermbg=236 ctermfg=103
|
||||
hi CursorColumn cterm=none ctermbg=234
|
||||
hi CursorLine cterm=none ctermbg=234
|
||||
hi IncSearch cterm=bold ctermbg=63 ctermfg=232
|
||||
hi Search cterm=none ctermbg=36 ctermfg=232
|
||||
hi Visual cterm=none ctermbg=24
|
||||
hi WildMenu cterm=bold ctermbg=35 ctermfg=232
|
||||
hi ModeMsg cterm=bold ctermfg=110
|
||||
hi MoreMsg cterm=bold ctermfg=121
|
||||
hi Question cterm=bold ctermfg=121
|
||||
hi ErrorMsg cterm=none ctermbg=88 ctermfg=255
|
||||
hi WarningMsg cterm=none ctermbg=58 ctermfg=255
|
||||
hi SpecialKey cterm=none ctermfg=77
|
||||
hi Title cterm=bold ctermfg=147
|
||||
hi Directory ctermfg=105
|
||||
hi DiffAdd cterm=none ctermbg=18
|
||||
hi DiffChange cterm=none ctermbg=58
|
||||
hi DiffDelete cterm=none ctermbg=52 ctermfg=58
|
||||
hi DiffText cterm=none ctermbg=53
|
||||
hi Pmenu cterm=none ctermbg=17 ctermfg=121
|
||||
hi PmenuSel cterm=none ctermbg=24 ctermfg=121
|
||||
hi PmenuSbar cterm=none ctermbg=19
|
||||
hi PmenuThumb cterm=none ctermbg=37
|
||||
hi MatchParen cterm=bold ctermbg=24
|
||||
hi SpellBad cterm=none ctermbg=88
|
||||
hi SpellCap cterm=none ctermbg=18
|
||||
hi SpellLocal cterm=none ctermbg=30
|
||||
hi SpellRare cterm=none ctermbg=90
|
||||
|
||||
hi Comment cterm=none ctermfg=138
|
||||
hi Constant cterm=none ctermfg=215
|
||||
hi String cterm=none ctermbg=235 ctermfg=215
|
||||
hi Character cterm=none ctermbg=235 ctermfg=215
|
||||
hi Number cterm=none ctermfg=34
|
||||
hi Float cterm=none ctermfg=41
|
||||
hi Identifier cterm=none ctermfg=186
|
||||
hi Function cterm=none ctermfg=210
|
||||
hi Statement cterm=bold ctermfg=63
|
||||
hi Exception cterm=bold ctermfg=99
|
||||
hi Operator cterm=none ctermfg=75
|
||||
hi Label cterm=none ctermfg=63
|
||||
hi PreProc cterm=bold ctermfg=36
|
||||
hi Type cterm=bold ctermfg=71
|
||||
hi Special cterm=none ctermbg=235 ctermfg=87
|
||||
hi Underlined cterm=underline ctermfg=227
|
||||
hi Ignore cterm=bold ctermfg=235
|
||||
hi Error cterm=bold ctermbg=52 ctermfg=231
|
||||
hi Todo cterm=bold ctermbg=143 ctermfg=16
|
||||
|
||||
hi OperatorCurlyBrackets cterm=bold ctermfg=75
|
||||
|
||||
" highlight modes
|
||||
autocmd InsertEnter * hi StatusLine ctermbg=52
|
||||
autocmd InsertEnter * hi User1 ctermbg=52
|
||||
autocmd InsertEnter * hi User2 ctermbg=52
|
||||
autocmd InsertLeave * hi User2 ctermbg=236
|
||||
autocmd InsertLeave * hi User1 ctermbg=236
|
||||
autocmd InsertLeave * hi StatusLine ctermbg=236
|
||||
autocmd CmdwinEnter * hi StatusLine ctermbg=22
|
||||
autocmd CmdwinEnter * hi User1 ctermbg=22
|
||||
autocmd CmdwinEnter * hi User2 ctermbg=22
|
||||
autocmd CmdwinLeave * hi User2 ctermbg=236
|
||||
autocmd CmdwinLeave * hi User1 ctermbg=236
|
||||
autocmd CmdwinLeave * hi StatusLine ctermbg=236
|
||||
|
||||
else
|
||||
|
||||
hi rubyGlobalVariable gui=none guifg=#5f8700
|
||||
hi rubyPredefinedIdentifier gui=bold guifg=#5f8700
|
||||
hi def link rubyStringDelimiter String
|
||||
|
||||
hi Normal gui=none guibg=#080808 guifg=#dfdfff
|
||||
hi StatusLine gui=none guibg=#303030 guifg=#ffffff
|
||||
hi StatusLineNC gui=none guibg=#303030 guifg=#8787af
|
||||
hi User1 gui=bold guibg=#303030 guifg=#ffdfaf
|
||||
hi User2 gui=none guibg=#303030 guifg=#585858
|
||||
hi VertSplit gui=none guibg=#303030 guifg=#8787af
|
||||
hi TabLine gui=none guibg=#303030 guifg=#afafaf
|
||||
hi TabLineFill gui=none guibg=#303030
|
||||
hi TabLineSel gui=none guibg=#585858 guifg=#dadada
|
||||
hi LineNr gui=none guifg=#444444
|
||||
hi NonText gui=bold guibg=#121212 guifg=#606060
|
||||
hi Folded gui=none guibg=#1c1c1c guifg=#af8700
|
||||
hi FoldColumn gui=none guibg=#303030 guifg=#8787af
|
||||
hi SignColumn gui=none guibg=#303030 guifg=#8787af
|
||||
hi CursorColumn gui=none guibg=#1c1c1c
|
||||
hi CursorLine gui=none guibg=#1c1c1c
|
||||
hi IncSearch gui=bold guibg=#5f5fff guifg=#080808
|
||||
hi Search gui=none guibg=#00af87 guifg=#080808
|
||||
hi Visual gui=none guibg=#005f87
|
||||
hi WildMenu gui=bold guibg=#00af5f guifg=#080808
|
||||
hi ModeMsg gui=bold guifg=#87afdf
|
||||
hi MoreMsg gui=bold guifg=#87ffaf
|
||||
hi Question gui=bold guifg=#87ffaf
|
||||
hi ErrorMsg gui=none guibg=#870000 guifg=#eeeeee
|
||||
hi WarningMsg gui=none guibg=#5f5f00 guifg=#eeeeee
|
||||
hi SpecialKey gui=none guifg=#5fdf5f
|
||||
hi Title gui=bold guifg=#afafff
|
||||
hi Directory guifg=#8787ff
|
||||
hi DiffAdd gui=none guibg=#000087
|
||||
hi DiffChange gui=none guibg=#5f5f00
|
||||
hi DiffDelete gui=none guibg=#5f0000 guifg=#5f5f00
|
||||
hi DiffText gui=none guibg=#5f005f
|
||||
hi Pmenu gui=none guibg=#00005f guifg=#87ffaf
|
||||
hi PmenuSel gui=none guibg=#005f87 guifg=#87ffaf
|
||||
hi PmenuSbar gui=none guibg=#0000af
|
||||
hi PmenuThumb gui=none guibg=#00afaf
|
||||
hi MatchParen gui=bold guibg=#005f87
|
||||
hi SpellBad gui=none guibg=#870000
|
||||
hi SpellCap gui=none guibg=#000087
|
||||
hi SpellLocal gui=none guibg=#008787
|
||||
hi SpellRare gui=none guibg=#870087
|
||||
|
||||
hi Comment gui=none guifg=#af8787
|
||||
hi Constant gui=none guifg=#ffaf5f
|
||||
hi String gui=none guibg=#262626 guifg=#ffaf5f
|
||||
hi Character gui=none guibg=#262626 guifg=#ffaf5f
|
||||
hi Number gui=none guifg=#00af00
|
||||
hi Float gui=none guifg=#00df5f
|
||||
hi Identifier gui=none guifg=#dfdf87
|
||||
hi Function gui=none guifg=#ff8787
|
||||
hi Statement gui=bold guifg=#5f5fff
|
||||
hi Exception gui=bold guifg=#875fff
|
||||
hi Operator gui=none guifg=#5fafff
|
||||
hi Label gui=none guifg=#5f5fff
|
||||
hi PreProc gui=bold guifg=#00af87
|
||||
hi Type gui=bold guifg=#5faf5f
|
||||
hi Special gui=none guibg=#262626 guifg=#5fffff
|
||||
hi Underlined gui=underline guifg=#ffff5f
|
||||
hi Ignore gui=bold guifg=#262626
|
||||
hi Error gui=bold guibg=#5f0000 guifg=#ffffff
|
||||
hi Todo gui=bold guibg=#afaf5f guifg=#000000
|
||||
|
||||
hi OperatorCurlyBrackets gui=bold guifg=#5fafff
|
||||
|
||||
" highlight modes
|
||||
autocmd InsertEnter * hi StatusLine guibg=#5f0000
|
||||
autocmd InsertEnter * hi User1 guibg=#5f0000
|
||||
autocmd InsertEnter * hi User2 guibg=#5f0000
|
||||
autocmd InsertLeave * hi User2 guibg=#303030
|
||||
autocmd InsertLeave * hi User1 guibg=#303030
|
||||
autocmd InsertLeave * hi StatusLine guibg=#303030
|
||||
autocmd CmdwinEnter * hi StatusLine guibg=#005f00
|
||||
autocmd CmdwinEnter * hi User1 guibg=#005f00
|
||||
autocmd CmdwinEnter * hi User2 guibg=#005f00
|
||||
autocmd CmdwinLeave * hi User2 guibg=#303030
|
||||
autocmd CmdwinLeave * hi User1 guibg=#303030
|
||||
autocmd CmdwinLeave * hi StatusLine guibg=#303030
|
||||
|
||||
end
|
||||
346
colors/lucius.vim
Normal file
346
colors/lucius.vim
Normal file
@@ -0,0 +1,346 @@
|
||||
" Vim color file
|
||||
" Maintainer: Jonathan Filip <jfilip1024@gmail.com>
|
||||
" Last Modified: Wed Oct 21, 2009 11:39AM
|
||||
" Version: 3.1
|
||||
"
|
||||
" GUI / 256 color terminal
|
||||
"
|
||||
" I started out trying to combine my favorite parts of other schemes and ended
|
||||
" up with this (oceandeep, moria, peaksea, wombat, zenburn).
|
||||
"
|
||||
" This file also tries to have descriptive comments for each higlighting group
|
||||
" so it is easy to understand what each part does.
|
||||
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let colors_name="lucius"
|
||||
|
||||
" Some other colors to save
|
||||
" blue: 3eb8e5
|
||||
" green: 92d400
|
||||
" c green: d5f876, cae682
|
||||
" new blue: 002D62
|
||||
" new gray: CCCCCC
|
||||
|
||||
|
||||
" Base color
|
||||
" ----------
|
||||
hi Normal guifg=#e0e0e0 guibg=#202020
|
||||
hi Normal ctermfg=253 ctermbg=235
|
||||
|
||||
|
||||
" Comment Group
|
||||
" -------------
|
||||
" any comment
|
||||
hi Comment guifg=#606060 gui=none
|
||||
hi Comment ctermfg=240 cterm=none
|
||||
|
||||
|
||||
" Constant Group
|
||||
" --------------
|
||||
" any constant
|
||||
hi Constant guifg=#8cd0d3 gui=none
|
||||
hi Constant ctermfg=116 cterm=none
|
||||
" strings
|
||||
hi String guifg=#80c0d9 gui=none
|
||||
hi String ctermfg=110 cterm=none
|
||||
" character constant
|
||||
hi Character guifg=#80c0d9 gui=none
|
||||
hi Character ctermfg=110 cterm=none
|
||||
" numbers decimal/hex
|
||||
hi Number guifg=#8cd0d3 gui=none
|
||||
hi Number ctermfg=116 cterm=none
|
||||
" true, false
|
||||
hi Boolean guifg=#8cd0d3 gui=none
|
||||
hi Boolean ctermfg=116 cterm=none
|
||||
" float
|
||||
hi Float guifg=#8cd0d3 gui=none
|
||||
hi Float ctermfg=116 cterm=none
|
||||
|
||||
|
||||
" Identifier Group
|
||||
" ----------------
|
||||
" any variable name
|
||||
hi Identifier guifg=#efaf7f gui=none
|
||||
hi Identifier ctermfg=216 cterm=none
|
||||
" function, method, class
|
||||
hi Function guifg=#efaf7f gui=none
|
||||
hi Function ctermfg=216 cterm=none
|
||||
|
||||
|
||||
" Statement Group
|
||||
" ---------------
|
||||
" any statement
|
||||
hi Statement guifg=#b3d38c gui=none
|
||||
hi Statement ctermfg=150 cterm=none
|
||||
" if, then, else
|
||||
hi Conditional guifg=#b3d38c gui=none
|
||||
hi Conditional ctermfg=150 cterm=none
|
||||
" try, catch, throw, raise
|
||||
hi Exception guifg=#b3d38c gui=none
|
||||
hi Exception ctermfg=150 cterm=none
|
||||
" for, while, do
|
||||
hi Repeat guifg=#b3d38c gui=none
|
||||
hi Repeat ctermfg=150 cterm=none
|
||||
" case, default
|
||||
hi Label guifg=#b3d38c gui=none
|
||||
hi Label ctermfg=150 cterm=none
|
||||
" sizeof, +, *
|
||||
hi Operator guifg=#b3d38c gui=none
|
||||
hi Operator ctermfg=150 cterm=none
|
||||
" any other keyword
|
||||
hi Keyword guifg=#b3d38c gui=none
|
||||
hi Keyword ctermfg=150 cterm=none
|
||||
|
||||
|
||||
" Preprocessor Group
|
||||
" ------------------
|
||||
" generic preprocessor
|
||||
hi PreProc guifg=#f0dfaf gui=none
|
||||
hi PreProc ctermfg=223 cterm=none
|
||||
" #include
|
||||
hi Include guifg=#f0dfaf gui=none
|
||||
hi Include ctermfg=223 cterm=none
|
||||
" #define
|
||||
hi Define guifg=#f0dfaf gui=none
|
||||
hi Define ctermfg=223 cterm=none
|
||||
" same as define
|
||||
hi Macro guifg=#f0dfaf gui=none
|
||||
hi Macro ctermfg=223 cterm=none
|
||||
" #if, #else, #endif
|
||||
hi PreCondit guifg=#f0dfaf gui=none
|
||||
hi PreCondit ctermfg=223 cterm=none
|
||||
|
||||
|
||||
" Type Group
|
||||
" ----------
|
||||
" int, long, char
|
||||
hi Type guifg=#93d6a9 gui=none
|
||||
hi Type ctermfg=115 cterm=none
|
||||
" static, register, volative
|
||||
hi StorageClass guifg=#93d6a9 gui=none
|
||||
hi StorageClass ctermfg=115 cterm=none
|
||||
" struct, union, enum
|
||||
hi Structure guifg=#93d6a9 gui=none
|
||||
hi Structure ctermfg=115 cterm=none
|
||||
" typedef
|
||||
hi Typedef guifg=#93d6a9 gui=none
|
||||
hi Typedef ctermfg=115 cterm=none
|
||||
|
||||
|
||||
" Special Group
|
||||
" -------------
|
||||
" any special symbol
|
||||
hi Special guifg=#cca3b3 gui=none
|
||||
hi Special ctermfg=181 cterm=none
|
||||
" special character in a constant
|
||||
hi SpecialChar guifg=#cca3b3 gui=none
|
||||
hi SpecialChar ctermfg=181 cterm=none
|
||||
" things you can CTRL-]
|
||||
hi Tag guifg=#cca3b3 gui=none
|
||||
hi Tag ctermfg=181 cterm=none
|
||||
" character that needs attention
|
||||
hi Delimiter guifg=#cca3b3 gui=none
|
||||
hi Delimiter ctermfg=181 cterm=none
|
||||
" special things inside a comment
|
||||
hi SpecialComment guifg=#cca3b3 gui=none
|
||||
hi SpecialComment ctermfg=181 cterm=none
|
||||
" debugging statements
|
||||
hi Debug guifg=#cca3b3 guibg=NONE gui=none
|
||||
hi Debug ctermfg=181 ctermbg=NONE cterm=none
|
||||
|
||||
|
||||
" Underlined Group
|
||||
" ----------------
|
||||
" text that stands out, html links
|
||||
hi Underlined guifg=fg gui=underline
|
||||
hi Underlined ctermfg=fg cterm=underline
|
||||
|
||||
|
||||
" Ignore Group
|
||||
" ------------
|
||||
" left blank, hidden
|
||||
hi Ignore guifg=bg
|
||||
hi Ignore ctermfg=bg
|
||||
|
||||
|
||||
" Error Group
|
||||
" -----------
|
||||
" any erroneous construct
|
||||
hi Error guifg=#e37170 guibg=#432323 gui=none
|
||||
hi Error ctermfg=167 ctermbg=52 cterm=none
|
||||
|
||||
|
||||
" Todo Group
|
||||
" ----------
|
||||
" todo, fixme, note, xxx
|
||||
hi Todo guifg=#efef8f guibg=NONE gui=underline
|
||||
hi Todo ctermfg=228 ctermbg=NONE cterm=underline
|
||||
|
||||
|
||||
" Spelling
|
||||
" --------
|
||||
" word not recognized
|
||||
hi SpellBad guisp=#ee0000 gui=undercurl
|
||||
hi SpellBad ctermbg=9 cterm=undercurl
|
||||
" word not capitalized
|
||||
hi SpellCap guisp=#eeee00 gui=undercurl
|
||||
hi SpellCap ctermbg=12 cterm=undercurl
|
||||
" rare word
|
||||
hi SpellRare guisp=#ffa500 gui=undercurl
|
||||
hi SpellRare ctermbg=13 cterm=undercurl
|
||||
" wrong spelling for selected region
|
||||
hi SpellLocal guisp=#ffa500 gui=undercurl
|
||||
hi SpellLocal ctermbg=14 cterm=undercurl
|
||||
|
||||
|
||||
" Cursor
|
||||
" ------
|
||||
" character under the cursor
|
||||
hi Cursor guifg=bg guibg=#a3e3ed
|
||||
hi Cursor ctermfg=bg ctermbg=153
|
||||
" like cursor, but used when in IME mode
|
||||
hi CursorIM guifg=bg guibg=#96cdcd
|
||||
hi CursorIM ctermfg=bg ctermbg=116
|
||||
" cursor column
|
||||
hi CursorColumn guifg=NONE guibg=#202438 gui=none
|
||||
hi CursorColumn ctermfg=NONE ctermbg=236 cterm=none
|
||||
" cursor line/row
|
||||
hi CursorLine gui=NONE guibg=#202438 gui=none
|
||||
hi CursorLine cterm=NONE ctermbg=236 cterm=none
|
||||
|
||||
|
||||
" Misc
|
||||
" ----
|
||||
" directory names and other special names in listings
|
||||
hi Directory guifg=#c0e0b0 gui=none
|
||||
hi Directory ctermfg=151 cterm=none
|
||||
" error messages on the command line
|
||||
hi ErrorMsg guifg=#ee0000 guibg=NONE gui=none
|
||||
hi ErrorMsg ctermfg=196 ctermbg=NONE cterm=none
|
||||
" column separating vertically split windows
|
||||
hi VertSplit guifg=#777777 guibg=#363946 gui=none
|
||||
hi VertSplit ctermfg=242 ctermbg=237 cterm=none
|
||||
" columns where signs are displayed (used in IDEs)
|
||||
hi SignColumn guifg=#9fafaf guibg=#181818 gui=none
|
||||
hi SignColumn ctermfg=145 ctermbg=233 cterm=none
|
||||
" line numbers
|
||||
hi LineNr guifg=#818698 guibg=#363946
|
||||
hi LineNr ctermfg=102 ctermbg=237
|
||||
" match parenthesis, brackets
|
||||
hi MatchParen guifg=#00ff00 guibg=NONE gui=bold
|
||||
hi MatchParen ctermfg=46 ctermbg=NONE cterm=bold
|
||||
" the 'more' prompt when output takes more than one line
|
||||
hi MoreMsg guifg=#2e8b57 gui=none
|
||||
hi MoreMsg ctermfg=29 cterm=none
|
||||
" text showing what mode you are in
|
||||
hi ModeMsg guifg=#76d5f8 guibg=NONE gui=none
|
||||
hi ModeMsg ctermfg=117 ctermbg=NONE cterm=none
|
||||
" the '~' and '@' and showbreak, '>' double wide char doesn't fit on line
|
||||
hi NonText guifg=#404040 gui=none
|
||||
hi NonText ctermfg=235 cterm=none
|
||||
" the hit-enter prompt (show more output) and yes/no questions
|
||||
hi Question guifg=fg gui=none
|
||||
hi Question ctermfg=fg cterm=none
|
||||
" meta and special keys used with map, unprintable characters
|
||||
hi SpecialKey guifg=#404040
|
||||
hi SpecialKey ctermfg=237
|
||||
" titles for output from :set all, :autocmd, etc
|
||||
hi Title guifg=#62bdde gui=none
|
||||
hi Title ctermfg=74 cterm=none
|
||||
"hi Title guifg=#5ec8e5 gui=none
|
||||
" warning messages
|
||||
hi WarningMsg guifg=#e5786d gui=none
|
||||
hi WarningMsg ctermfg=173 cterm=none
|
||||
" current match in the wildmenu completion
|
||||
hi WildMenu guifg=#cae682 guibg=#363946 gui=bold,underline
|
||||
hi WildMenu ctermfg=16 ctermbg=186 cterm=bold
|
||||
|
||||
|
||||
" Diff
|
||||
" ----
|
||||
" added line
|
||||
hi DiffAdd guifg=#80a090 guibg=#313c36 gui=none
|
||||
hi DiffAdd ctermfg=108 ctermbg=22 cterm=none
|
||||
" changed line
|
||||
hi DiffChange guifg=NONE guibg=#4a343a gui=none
|
||||
hi DiffChange ctermfg=fg ctermbg=52 cterm=none
|
||||
" deleted line
|
||||
hi DiffDelete guifg=#6c6661 guibg=#3c3631 gui=none
|
||||
hi DiffDelete ctermfg=59 ctermbg=58 cterm=none
|
||||
" changed text within line
|
||||
hi DiffText guifg=#f05060 guibg=#4a343a gui=bold
|
||||
hi DiffText ctermfg=203 ctermbg=52 cterm=bold
|
||||
|
||||
|
||||
" Folds
|
||||
" -----
|
||||
" line used for closed folds
|
||||
hi Folded guifg=#91d6f8 guibg=#363946 gui=none
|
||||
hi Folded ctermfg=117 ctermbg=238 cterm=none
|
||||
" column on side used to indicated open and closed folds
|
||||
hi FoldColumn guifg=#91d6f8 guibg=#363946 gui=none
|
||||
hi FoldColumn ctermfg=117 ctermbg=238 cterm=none
|
||||
|
||||
|
||||
" Search
|
||||
" ------
|
||||
" highlight incremental search text; also highlight text replaced with :s///c
|
||||
hi IncSearch guifg=#66ffff gui=reverse
|
||||
hi IncSearch ctermfg=87 cterm=reverse
|
||||
" hlsearch (last search pattern), also used for quickfix
|
||||
hi Search guibg=#ffaa33 gui=none
|
||||
hi Search ctermbg=214 cterm=none
|
||||
|
||||
|
||||
" Popup Menu
|
||||
" ----------
|
||||
" normal item in popup
|
||||
hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none
|
||||
hi Pmenu ctermfg=253 ctermbg=233 cterm=none
|
||||
" selected item in popup
|
||||
hi PmenuSel guifg=#cae682 guibg=#505860 gui=none
|
||||
hi PmenuSel ctermfg=186 ctermbg=237 cterm=none
|
||||
" scrollbar in popup
|
||||
hi PMenuSbar guibg=#505860 gui=none
|
||||
hi PMenuSbar ctermbg=59 cterm=none
|
||||
" thumb of the scrollbar in the popup
|
||||
hi PMenuThumb guibg=#808890 gui=none
|
||||
hi PMenuThumb ctermbg=102 cterm=none
|
||||
|
||||
|
||||
" Status Line
|
||||
" -----------
|
||||
" status line for current window
|
||||
hi StatusLine guifg=#e0e0e0 guibg=#363946 gui=bold
|
||||
hi StatusLine ctermfg=254 ctermbg=237 cterm=bold
|
||||
" status line for non-current windows
|
||||
hi StatusLineNC guifg=#767986 guibg=#363946 gui=none
|
||||
hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none
|
||||
|
||||
|
||||
" Tab Lines
|
||||
" ---------
|
||||
" tab pages line, not active tab page label
|
||||
hi TabLine guifg=#b6bf98 guibg=#363946 gui=none
|
||||
hi TabLine ctermfg=244 ctermbg=236 cterm=none
|
||||
" tab pages line, where there are no labels
|
||||
hi TabLineFill guifg=#cfcfaf guibg=#363946 gui=none
|
||||
hi TabLineFill ctermfg=187 ctermbg=236 cterm=none
|
||||
" tab pages line, active tab page label
|
||||
hi TabLineSel guifg=#efefef guibg=#414658 gui=bold
|
||||
hi TabLineSel ctermfg=254 ctermbg=236 cterm=bold
|
||||
|
||||
|
||||
" Visual
|
||||
" ------
|
||||
" visual mode selection
|
||||
hi Visual guifg=NONE guibg=#364458
|
||||
hi Visual ctermfg=NONE ctermbg=24
|
||||
" visual mode selection when vim is not owning the selection (x11 only)
|
||||
hi VisualNOS guifg=fg gui=underline
|
||||
hi VisualNOS ctermfg=fg cterm=underline
|
||||
267
colors/tolerable256.vim
Normal file
267
colors/tolerable256.vim
Normal file
@@ -0,0 +1,267 @@
|
||||
" Vim color file
|
||||
" Maintainer: Ian Langworth
|
||||
" Last Change: 2004 Dec 24
|
||||
" Email: <langworth.com>
|
||||
|
||||
" Color settings inspired by BBEdit for Mac OS, plus I liked
|
||||
" the low-contrast comments from the 'oceandeep' colorscheme
|
||||
"
|
||||
" gryf: Nice colorscheme for printing in white, or to generate html in dark on
|
||||
" bright. Added functions for converting it into terminal 256xterm codes.
|
||||
|
||||
set background=light
|
||||
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:colors_name="tolerable"
|
||||
|
||||
" functions {{{
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun! <SID>grey_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
else
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun! <SID>grey_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun! <SID>grey_color(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun! <SID>rgb_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
else
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun! <SID>rgb_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun! <SID>rgb_color(x, y, z)
|
||||
if &t_Co == 88
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
else
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun! <SID>color(r, g, b)
|
||||
" get the closest grey
|
||||
let l:gx = <SID>grey_number(a:r)
|
||||
let l:gy = <SID>grey_number(a:g)
|
||||
let l:gz = <SID>grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = <SID>rgb_number(a:r)
|
||||
let l:y = <SID>rgb_number(a:g)
|
||||
let l:z = <SID>rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return <SID>grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun! <SID>rgb(rgb)
|
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||
return <SID>color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
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 != ""
|
||||
if a:attr == 'italic'
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=none"
|
||||
else
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=".a:attr
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
call <SID>X("Cursor", "006400", "", "none")
|
||||
call <SID>X("CursorLine", "", "eeeeee", "none")
|
||||
call <SID>X("CursorColumn", "", "eeeeee", "none")
|
||||
|
||||
call <SID>X("Normal", "000000", "ffffff", "none")
|
||||
call <SID>X("NonText", "ffae1b", "", "none")
|
||||
|
||||
call <SID>X("Statement", "0000ff", "", "none")
|
||||
call <SID>X("Special", "ff0000", "", "none")
|
||||
call <SID>X("Constant", "8b0000", "", "none")
|
||||
call <SID>X("Comment", "555555", "", "none")
|
||||
call <SID>X("Preproc", "008b8b", "", "none")
|
||||
call <SID>X("Type", "8b008b", "", "none")
|
||||
call <SID>X("Identifier", "006400", "", "none")
|
||||
call <SID>X("Title", "000000", "", "none")
|
||||
|
||||
call <SID>X("StatusLine", "ffffff", "333333", "none")
|
||||
call <SID>X("StatusLineNC", "ffffff", "333333", "none")
|
||||
call <SID>X("VertSplit", "ffffff", "333333", "none")
|
||||
|
||||
call <SID>X("Visual", "000000", "00ff00", "none")
|
||||
call <SID>X("Search", "", "ffff00", "none")
|
||||
call <SID>X("Directory", "00008b", "", "none")
|
||||
call <SID>X("WarningMsg", "ff0000", "", "none")
|
||||
call <SID>X("Error", "ffffff", "ff0000", "none")
|
||||
call <SID>X("Todo", "000000", "ffff00", "none")
|
||||
|
||||
call <SID>X("MoreMsg", "", "", "none")
|
||||
call <SID>X("ModeMsg", "", "", "none")
|
||||
|
||||
" vim:set ts=4 sw=4 noet fdm=marker:
|
||||
51
colors/wombat.vim
Normal file
51
colors/wombat.vim
Normal file
@@ -0,0 +1,51 @@
|
||||
" Maintainer: Lars H. Nielsen (dengmao@gmail.com)
|
||||
" Last Change: January 22 2007
|
||||
|
||||
set background=dark
|
||||
|
||||
hi clear
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "wombat"
|
||||
|
||||
|
||||
" Vim >= 7.0 specific colors
|
||||
if version >= 700
|
||||
hi CursorLine guibg=#2d2d2d
|
||||
hi CursorColumn guibg=#2d2d2d
|
||||
hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold
|
||||
hi Pmenu guifg=#f6f3e8 guibg=#444444
|
||||
hi PmenuSel guifg=#000000 guibg=#cae682
|
||||
endif
|
||||
|
||||
" General colors
|
||||
hi Cursor guifg=NONE guibg=#656565 gui=none
|
||||
hi Normal guifg=#f6f3e8 guibg=#242424 gui=none
|
||||
hi NonText guifg=#808080 guibg=#303030 gui=none
|
||||
hi LineNr guifg=#857b6f guibg=#000000 gui=none
|
||||
hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic
|
||||
hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none
|
||||
hi VertSplit guifg=#444444 guibg=#444444 gui=none
|
||||
hi Folded guibg=#384048 guifg=#a0a8b0 gui=none
|
||||
hi Title guifg=#f6f3e8 guibg=NONE gui=bold
|
||||
hi Visual guifg=#f6f3e8 guibg=#444444 gui=none
|
||||
hi SpecialKey guifg=#808080 guibg=#343434 gui=none
|
||||
|
||||
" Syntax highlighting
|
||||
hi Comment guifg=#99968b gui=italic
|
||||
hi Todo guifg=#8f8f8f gui=italic
|
||||
hi Constant guifg=#e5786d gui=none
|
||||
hi String guifg=#95e454 gui=italic
|
||||
hi Identifier guifg=#cae682 gui=none
|
||||
hi Function guifg=#cae682 gui=none
|
||||
hi Type guifg=#cae682 gui=none
|
||||
hi Statement guifg=#8ac6f2 gui=none
|
||||
hi Keyword guifg=#8ac6f2 gui=none
|
||||
hi PreProc guifg=#e5786d gui=none
|
||||
hi Number guifg=#e5786d gui=none
|
||||
hi Special guifg=#e7f6da gui=none
|
||||
|
||||
|
||||
359
colors/wombat256.vim
Normal file
359
colors/wombat256.vim
Normal file
@@ -0,0 +1,359 @@
|
||||
" Vim color file
|
||||
" Maintainer: David Liang (bmdavll at gmail dot com)
|
||||
" Last Change: November 28 2008
|
||||
"
|
||||
" wombat256.vim - a modified version of Wombat by Lars Nielsen that also
|
||||
" works on xterms with 88 or 256 colors. The algorithm for approximating the
|
||||
" GUI colors with the xterm palette is from desert256.vim by Henry So Jr.
|
||||
|
||||
set background=dark
|
||||
|
||||
if version > 580
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
|
||||
let g:colors_name = "wombat256"
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
|
||||
" functions {{{
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun <SID>grey_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
else
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun <SID>grey_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun <SID>grey_color(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun <SID>rgb_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
else
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun <SID>rgb_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun <SID>rgb_color(x, y, z)
|
||||
if &t_Co == 88
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
else
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun <SID>color(r, g, b)
|
||||
" get the closest grey
|
||||
let l:gx = <SID>grey_number(a:r)
|
||||
let l:gy = <SID>grey_number(a:g)
|
||||
let l:gz = <SID>grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = <SID>rgb_number(a:r)
|
||||
let l:y = <SID>rgb_number(a:g)
|
||||
let l:z = <SID>rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return <SID>grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||
return <SID>color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
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 != ""
|
||||
if a:attr == 'italic'
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=none"
|
||||
else
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=".a:attr
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
" italic only in gui and only where font is not fixed-misc!
|
||||
|
||||
if has("gui_running") && &guifont !~ "Fixed"
|
||||
let s:italic = "italic"
|
||||
else
|
||||
let s:italic = "none"
|
||||
endif
|
||||
|
||||
|
||||
" X(fg, bg, attr)
|
||||
call <SID>X("Normal", "dddddd", "242424", "none")
|
||||
call <SID>X("NonText", "4c4c36", "", "none")
|
||||
call <SID>X("Cursor", "222222", "ecee90", "none")
|
||||
call <SID>X("CursorLine", "", "32322e", "none")
|
||||
call <SID>X("CursorColumn", "", "2d2d2d", "")
|
||||
"CursorIM
|
||||
"Question
|
||||
"IncSearch
|
||||
call <SID>X("Search", "444444", "af87d7", "")
|
||||
call <SID>X("MatchParen", "ecee90", "857b6f", "bold")
|
||||
call <SID>X("SpecialKey", "6c6c6c", "2d2d2d", "none")
|
||||
call <SID>X("Visual", "ecee90", "597418", "none")
|
||||
call <SID>X("LineNr", "857b6f", "121212", "none")
|
||||
call <SID>X("SignColumn", "", "121212", "none")
|
||||
call <SID>X("Folded", "a0a8b0", "404048", "none")
|
||||
call <SID>X("Title", "f6f3e8", "", "bold")
|
||||
call <SID>X("VertSplit", "444444", "444444", "none")
|
||||
call <SID>X("StatusLine", "f6f3e8", "444444", s:italic)
|
||||
call <SID>X("StatusLineNC", "857b6f", "444444", "none")
|
||||
"Scrollbar
|
||||
"Tooltip
|
||||
"Menu
|
||||
"WildMenu
|
||||
call <SID>X("Pmenu", "f6f3e8", "444444", "")
|
||||
call <SID>X("PmenuSel", "121212", "caeb82", "")
|
||||
call <SID>X("WarningMsg", "ff0000", "", "")
|
||||
"ErrorMsg
|
||||
"ModeMsg
|
||||
"MoreMsg
|
||||
"Directory
|
||||
"DiffAdd
|
||||
"DiffChange
|
||||
"DiffDelete
|
||||
"DiffText
|
||||
|
||||
" syntax highlighting
|
||||
call <SID>X("Number", "e5786d", "", "none")
|
||||
call <SID>X("Constant", "e5786d", "", "none")
|
||||
call <SID>X("String", "95e454", "", s:italic)
|
||||
call <SID>X("Comment", "c0bc6c", "", s:italic)
|
||||
call <SID>X("Identifier", "caeb82", "", "none")
|
||||
call <SID>X("Keyword", "87afff", "", "none")
|
||||
call <SID>X("Statement", "87afff", "", "none")
|
||||
call <SID>X("Function", "caeb82", "", "none")
|
||||
call <SID>X("PreProc", "e5786d", "", "none")
|
||||
call <SID>X("Type", "caeb82", "", "none")
|
||||
call <SID>X("Special", "ffdead", "", "none")
|
||||
call <SID>X("Todo", "857b6f", "", s:italic)
|
||||
"Underlined
|
||||
"Error
|
||||
"Ignore
|
||||
hi! link VisualNOS Visual
|
||||
hi! link FoldColumn Folded
|
||||
hi! link TabLineSel StatusLine
|
||||
hi! link TabLineFill StatusLineNC
|
||||
hi! link TabLine StatusLineNC
|
||||
call <SID>X("TabLineSel", "f6f3e8", "", "none")
|
||||
|
||||
" Python Highlighting for python.vim
|
||||
"call <SID>X("pythonCoding", "ff0086", "", "none")
|
||||
"call <SID>X("pythonRun", "ff0086", "", "none")
|
||||
"call <SID>X("pythonBuiltinObji", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonBuiltinFunc", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonException", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonExClass", "66cd66", "", "bold")
|
||||
"call <SID>X("pythonSpaceError", "270000", "", "none")
|
||||
"call <SID>X("pythonDocTest", "2f5f49", "", "none")
|
||||
"call <SID>X("pythonDocTest2", "3b916a", "", "none")
|
||||
"call <SID>X("pythonFunction", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonClass", "ff0086", "", "bold")
|
||||
|
||||
call <SID>X("ShowMarksHLl", "ab8042", "121212", "bold")
|
||||
"call <SID>X("ShowMarksHLu", "ab4242", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLu", "aaab42", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLo", "42ab47", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLm", "aaab42", "121212", "bold")
|
||||
|
||||
" Diff colors
|
||||
"call <SID>X("DiffAdd", "", "1d1d50", "bold")
|
||||
"call <SID>X("DiffText", "", "9f1e1e", "bold")
|
||||
"call <SID>X("DiffDelete", "", "1d5050", "bold")
|
||||
"call <SID>X("DiffChange", "", "4c1c4c", "bold")
|
||||
|
||||
call <SID>X("DiffAdd", "", "646464", "bold")
|
||||
call <SID>X("DiffText", "", "bf5f00", "bold")
|
||||
call <SID>X("DiffDelete", "343434", "101010", "bold")
|
||||
call <SID>X("DiffChange", "", "424242", "bold")
|
||||
|
||||
" DiffAdd xxx term=bold ctermbg=4
|
||||
" DiffChange xxx term=bold ctermbg=5
|
||||
" DiffDelete xxx term=bold ctermfg=12 ctermbg=6
|
||||
" DiffText xxx term=reverse cterm=bold ctermbg=9
|
||||
|
||||
if ! has('gui_running')
|
||||
" spell, make it underline, and less bright colors. only for terminal
|
||||
call <SID>X("SpellBad", "", "880000", "underline")
|
||||
call <SID>X("SpellCap", "", "000088", "underline")
|
||||
call <SID>X("SpellRare", "", "880088", "underline")
|
||||
call <SID>X("SpellLocal", "", "008888", "underline")
|
||||
endif
|
||||
|
||||
" delete functions {{{
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>color
|
||||
delf <SID>rgb_color
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_color
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
" }}}
|
||||
|
||||
" vim:set ts=4 sw=4 noet fdm=marker:
|
||||
348
colors/wombat256_.vim
Normal file
348
colors/wombat256_.vim
Normal file
@@ -0,0 +1,348 @@
|
||||
" Vim color file
|
||||
" Maintainer: David Liang (bmdavll at gmail dot com)
|
||||
" Last Change: November 28 2008
|
||||
"
|
||||
" wombat256.vim - a modified version of Wombat by Lars Nielsen that also
|
||||
" works on xterms with 88 or 256 colors. The algorithm for approximating the
|
||||
" GUI colors with the xterm palette is from desert256.vim by Henry So Jr.
|
||||
|
||||
set background=dark
|
||||
|
||||
if version > 580
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
|
||||
let g:colors_name = "wombat256"
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
|
||||
" functions {{{
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun <SID>grey_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
else
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun <SID>grey_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun <SID>grey_color(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun <SID>rgb_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
else
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun <SID>rgb_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun <SID>rgb_color(x, y, z)
|
||||
if &t_Co == 88
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
else
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun <SID>color(r, g, b)
|
||||
" get the closest grey
|
||||
let l:gx = <SID>grey_number(a:r)
|
||||
let l:gy = <SID>grey_number(a:g)
|
||||
let l:gz = <SID>grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = <SID>rgb_number(a:r)
|
||||
let l:y = <SID>rgb_number(a:g)
|
||||
let l:z = <SID>rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return <SID>grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||
return <SID>color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
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 != ""
|
||||
if a:attr == 'italic'
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=none"
|
||||
else
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=".a:attr
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
" X(fg, bg, attr)
|
||||
call <SID>X("Normal", "dddddd", "242424", "none")
|
||||
call <SID>X("NonText", "4c4c36", "", "none")
|
||||
call <SID>X("Cursor", "222222", "ecee90", "none")
|
||||
call <SID>X("CursorLine", "", "32322e", "none")
|
||||
call <SID>X("CursorColumn", "", "2d2d2d", "")
|
||||
"CursorIM
|
||||
"Question
|
||||
"IncSearch
|
||||
call <SID>X("Search", "444444", "af87d7", "")
|
||||
call <SID>X("MatchParen", "ecee90", "857b6f", "bold")
|
||||
call <SID>X("SpecialKey", "6c6c6c", "2d2d2d", "none")
|
||||
call <SID>X("Visual", "ecee90", "597418", "none")
|
||||
call <SID>X("LineNr", "857b6f", "121212", "none")
|
||||
call <SID>X("SignColumn", "", "121212", "none")
|
||||
call <SID>X("Folded", "a0a8b0", "404048", "none")
|
||||
call <SID>X("Title", "f6f3e8", "", "bold")
|
||||
call <SID>X("VertSplit", "444444", "444444", "none")
|
||||
call <SID>X("StatusLine", "f6f3e8", "444444", "italic")
|
||||
call <SID>X("StatusLineNC", "857b6f", "444444", "none")
|
||||
"Scrollbar
|
||||
"Tooltip
|
||||
"Menu
|
||||
"WildMenu
|
||||
call <SID>X("Pmenu", "f6f3e8", "444444", "")
|
||||
call <SID>X("PmenuSel", "121212", "caeb82", "")
|
||||
call <SID>X("WarningMsg", "ff0000", "", "")
|
||||
"ErrorMsg
|
||||
"ModeMsg
|
||||
"MoreMsg
|
||||
"Directory
|
||||
"DiffAdd
|
||||
"DiffChange
|
||||
"DiffDelete
|
||||
"DiffText
|
||||
|
||||
" syntax highlighting
|
||||
call <SID>X("Number", "e5786d", "", "none")
|
||||
call <SID>X("Constant", "e5786d", "", "none")
|
||||
call <SID>X("String", "95e454", "", "italic")
|
||||
call <SID>X("Comment", "c0bc6c", "", "italic")
|
||||
call <SID>X("Identifier", "caeb82", "", "none")
|
||||
call <SID>X("Keyword", "87afff", "", "none")
|
||||
call <SID>X("Statement", "87afff", "", "none")
|
||||
call <SID>X("Function", "caeb82", "", "none")
|
||||
call <SID>X("PreProc", "e5786d", "", "none")
|
||||
call <SID>X("Type", "caeb82", "", "none")
|
||||
call <SID>X("Special", "ffdead", "", "none")
|
||||
call <SID>X("Todo", "857b6f", "", "italic")
|
||||
"Underlined
|
||||
"Error
|
||||
"Ignore
|
||||
hi! link VisualNOS Visual
|
||||
hi! link FoldColumn Folded
|
||||
hi! link TabLineSel StatusLine
|
||||
hi! link TabLineFill StatusLineNC
|
||||
hi! link TabLine StatusLineNC
|
||||
call <SID>X("TabLineSel", "f6f3e8", "", "none")
|
||||
|
||||
" Python Highlighting for python.vim
|
||||
"call <SID>X("pythonCoding", "ff0086", "", "none")
|
||||
"call <SID>X("pythonRun", "ff0086", "", "none")
|
||||
"call <SID>X("pythonBuiltinObji", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonBuiltinFunc", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonException", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonExClass", "66cd66", "", "bold")
|
||||
"call <SID>X("pythonSpaceError", "270000", "", "none")
|
||||
"call <SID>X("pythonDocTest", "2f5f49", "", "none")
|
||||
"call <SID>X("pythonDocTest2", "3b916a", "", "none")
|
||||
"call <SID>X("pythonFunction", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonClass", "ff0086", "", "bold")
|
||||
|
||||
call <SID>X("ShowMarksHLl", "ab8042", "121212", "bold")
|
||||
"call <SID>X("ShowMarksHLu", "ab4242", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLu", "aaab42", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLo", "42ab47", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLm", "aaab42", "121212", "bold")
|
||||
|
||||
" Diff colors
|
||||
"call <SID>X("DiffAdd", "", "1d1d50", "bold")
|
||||
"call <SID>X("DiffText", "", "9f1e1e", "bold")
|
||||
"call <SID>X("DiffDelete", "", "1d5050", "bold")
|
||||
"call <SID>X("DiffChange", "", "4c1c4c", "bold")
|
||||
|
||||
call <SID>X("DiffAdd", "", "646464", "bold")
|
||||
call <SID>X("DiffText", "", "bf5f00", "bold")
|
||||
call <SID>X("DiffDelete", "343434", "101010", "bold")
|
||||
call <SID>X("DiffChange", "", "424242", "bold")
|
||||
|
||||
" DiffAdd xxx term=bold ctermbg=4
|
||||
" DiffChange xxx term=bold ctermbg=5
|
||||
" DiffDelete xxx term=bold ctermfg=12 ctermbg=6
|
||||
" DiffText xxx term=reverse cterm=bold ctermbg=9
|
||||
|
||||
" spell, make it underline, and less bright colors
|
||||
call <SID>X("SpellBad", "", "880000", "underline")
|
||||
call <SID>X("SpellCap", "", "000088", "underline")
|
||||
call <SID>X("SpellRare", "", "880088", "underline")
|
||||
call <SID>X("SpellLocal", "", "008888", "underline")
|
||||
|
||||
" delete functions {{{
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>color
|
||||
delf <SID>rgb_color
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_color
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
" }}}
|
||||
|
||||
" vim:set ts=4 sw=4 noet fdm=marker:
|
||||
359
colors/wombat256grf.vim
Normal file
359
colors/wombat256grf.vim
Normal file
@@ -0,0 +1,359 @@
|
||||
" Vim color file
|
||||
" Maintainer: David Liang (bmdavll at gmail dot com)
|
||||
" Last Change: November 28 2008
|
||||
"
|
||||
" wombat256.vim - a modified version of Wombat by Lars Nielsen that also
|
||||
" works on xterms with 88 or 256 colors. The algorithm for approximating the
|
||||
" GUI colors with the xterm palette is from desert256.vim by Henry So Jr.
|
||||
|
||||
set background=dark
|
||||
|
||||
if version > 580
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
|
||||
let g:colors_name = "wombat256"
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
|
||||
" functions {{{
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun <SID>grey_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
else
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun <SID>grey_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun <SID>grey_color(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun <SID>rgb_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
else
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun <SID>rgb_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun <SID>rgb_color(x, y, z)
|
||||
if &t_Co == 88
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
else
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun <SID>color(r, g, b)
|
||||
" get the closest grey
|
||||
let l:gx = <SID>grey_number(a:r)
|
||||
let l:gy = <SID>grey_number(a:g)
|
||||
let l:gz = <SID>grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = <SID>rgb_number(a:r)
|
||||
let l:y = <SID>rgb_number(a:g)
|
||||
let l:z = <SID>rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return <SID>grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||
return <SID>color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
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 != ""
|
||||
if a:attr == 'italic'
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=none"
|
||||
else
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=".a:attr
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
" italic only in gui and only where font is not fixed-misc!
|
||||
|
||||
if has("gui_running") && &guifont !~ "Fixed"
|
||||
let s:italic = "italic"
|
||||
else
|
||||
let s:italic = "none"
|
||||
endif
|
||||
|
||||
|
||||
" X(fg, bg, attr)
|
||||
call <SID>X("Normal", "dddddd", "242424", "none")
|
||||
call <SID>X("NonText", "4c4c36", "", "none")
|
||||
call <SID>X("Cursor", "222222", "ecee90", "none")
|
||||
call <SID>X("CursorLine", "", "32322e", "none")
|
||||
call <SID>X("CursorColumn", "", "2d2d2d", "")
|
||||
"CursorIM
|
||||
"Question
|
||||
"IncSearch
|
||||
call <SID>X("Search", "444444", "af87d7", "")
|
||||
call <SID>X("MatchParen", "ecee90", "857b6f", "bold")
|
||||
call <SID>X("SpecialKey", "6c6c6c", "2d2d2d", "none")
|
||||
call <SID>X("Visual", "ecee90", "597418", "none")
|
||||
call <SID>X("LineNr", "857b6f", "121212", "none")
|
||||
call <SID>X("SignColumn", "", "121212", "none")
|
||||
call <SID>X("Folded", "a0a8b0", "404048", "none")
|
||||
call <SID>X("Title", "f6f3e8", "", "bold")
|
||||
call <SID>X("VertSplit", "444444", "444444", "none")
|
||||
call <SID>X("StatusLine", "f6f3e8", "444444", s:italic)
|
||||
call <SID>X("StatusLineNC", "857b6f", "444444", "none")
|
||||
"Scrollbar
|
||||
"Tooltip
|
||||
"Menu
|
||||
"WildMenu
|
||||
call <SID>X("Pmenu", "f6f3e8", "444444", "")
|
||||
call <SID>X("PmenuSel", "121212", "caeb82", "")
|
||||
call <SID>X("WarningMsg", "ff0000", "", "")
|
||||
"ErrorMsg
|
||||
"ModeMsg
|
||||
"MoreMsg
|
||||
"Directory
|
||||
"DiffAdd
|
||||
"DiffChange
|
||||
"DiffDelete
|
||||
"DiffText
|
||||
|
||||
" syntax highlighting
|
||||
call <SID>X("Number", "e5786d", "", "none")
|
||||
call <SID>X("Constant", "e5786d", "", "none")
|
||||
call <SID>X("String", "95e454", "", s:italic)
|
||||
call <SID>X("Comment", "c0bc6c", "", s:italic)
|
||||
call <SID>X("Identifier", "caeb82", "", "none")
|
||||
call <SID>X("Keyword", "87afff", "", "none")
|
||||
call <SID>X("Statement", "87afff", "", "none")
|
||||
call <SID>X("Function", "caeb82", "", "none")
|
||||
call <SID>X("PreProc", "e5786d", "", "none")
|
||||
call <SID>X("Type", "caeb82", "", "none")
|
||||
call <SID>X("Special", "ffdead", "", "none")
|
||||
call <SID>X("Todo", "857b6f", "", s:italic)
|
||||
"Underlined
|
||||
"Error
|
||||
"Ignore
|
||||
hi! link VisualNOS Visual
|
||||
hi! link FoldColumn Folded
|
||||
hi! link TabLineSel StatusLine
|
||||
hi! link TabLineFill StatusLineNC
|
||||
hi! link TabLine StatusLineNC
|
||||
call <SID>X("TabLineSel", "f6f3e8", "", "none")
|
||||
|
||||
" Python Highlighting for python.vim
|
||||
"call <SID>X("pythonCoding", "ff0086", "", "none")
|
||||
"call <SID>X("pythonRun", "ff0086", "", "none")
|
||||
"call <SID>X("pythonBuiltinObji", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonBuiltinFunc", "2b6ba2", "", "bold")
|
||||
"call <SID>X("pythonException", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonExClass", "66cd66", "", "bold")
|
||||
"call <SID>X("pythonSpaceError", "270000", "", "none")
|
||||
"call <SID>X("pythonDocTest", "2f5f49", "", "none")
|
||||
"call <SID>X("pythonDocTest2", "3b916a", "", "none")
|
||||
"call <SID>X("pythonFunction", "ee0000", "", "bold")
|
||||
"call <SID>X("pythonClass", "ff0086", "", "bold")
|
||||
|
||||
call <SID>X("ShowMarksHLl", "ab8042", "121212", "bold")
|
||||
"call <SID>X("ShowMarksHLu", "ab4242", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLu", "aaab42", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLo", "42ab47", "121212", "bold")
|
||||
call <SID>X("ShowMarksHLm", "aaab42", "121212", "bold")
|
||||
|
||||
" Diff colors
|
||||
"call <SID>X("DiffAdd", "", "1d1d50", "bold")
|
||||
"call <SID>X("DiffText", "", "9f1e1e", "bold")
|
||||
"call <SID>X("DiffDelete", "", "1d5050", "bold")
|
||||
"call <SID>X("DiffChange", "", "4c1c4c", "bold")
|
||||
|
||||
call <SID>X("DiffAdd", "", "646464", "bold")
|
||||
call <SID>X("DiffText", "", "bf5f00", "bold")
|
||||
call <SID>X("DiffDelete", "343434", "101010", "bold")
|
||||
call <SID>X("DiffChange", "", "424242", "bold")
|
||||
|
||||
" DiffAdd xxx term=bold ctermbg=4
|
||||
" DiffChange xxx term=bold ctermbg=5
|
||||
" DiffDelete xxx term=bold ctermfg=12 ctermbg=6
|
||||
" DiffText xxx term=reverse cterm=bold ctermbg=9
|
||||
|
||||
if ! has('gui_running')
|
||||
" spell, make it underline, and less bright colors. only for terminal
|
||||
call <SID>X("SpellBad", "", "880000", "underline")
|
||||
call <SID>X("SpellCap", "", "000088", "underline")
|
||||
call <SID>X("SpellRare", "", "880088", "underline")
|
||||
call <SID>X("SpellLocal", "", "008888", "underline")
|
||||
endif
|
||||
|
||||
" delete functions {{{
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>color
|
||||
delf <SID>rgb_color
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_color
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
" }}}
|
||||
|
||||
" vim:set ts=4 sw=4 noet fdm=marker:
|
||||
Reference in New Issue
Block a user