From c627c4f04aa1bfedea6dc19ebedc710de94a5373 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 7 Feb 2015 14:00:05 +0100 Subject: Added basic version of my own vim colorscheme --- vim/.vim/colors/akr.vim | 79 ++++++++++++++++++++++++++++++++++++++ vim/.vimrc | 3 +- vim/airline_theme.vim | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 vim/.vim/colors/akr.vim create mode 100644 vim/airline_theme.vim (limited to 'vim') diff --git a/vim/.vim/colors/akr.vim b/vim/.vim/colors/akr.vim new file mode 100644 index 0000000..3a92373 --- /dev/null +++ b/vim/.vim/colors/akr.vim @@ -0,0 +1,79 @@ +hi clear +syntax reset +let background = "dark" +let g:colors_name = "akr" + +hi Normal gui=NONE guifg=#F2F2F2 guibg=#171717 +hi NonText gui=NONE guifg=#171717 guibg=#171717 +hi LineNr gui=NONE guifg=#605c5a guibg=NONE +hi Cursor gui=reverse guifg=NONE guibg=NONE +hi CursorColumn gui=NONE guifg=NONE guibg=#1a1a1a +hi CursorLine gui=NONE guifg=NONE guibg=#212121 +hi CursorLineNr gui=NONE guifg=NONE guibg=#212121 + +hi TabLine gui=NONE guifg=#909636 guibg=#171717 +hi TabLineFill gui=NONE guifg=NONE guibg=#262626 +hi TabLineSel gui=NONE guifg=#171717 guibg=#909636 +hi StatusLine gui=NONE guifg=#909636 guibg=#212121 +hi StatusLineNC gui=NONE guifg=#909637 guibg=#212121 +hi VertSplit gui=NONE guifg=#262626 guibg=#262626 +hi Visual gui=NONE guifg=#E4E093 guibg=#8C3346 +hi VisualNOS gui=NONE guifg=NONE guibg=NONE + +hi Pmenu gui=NONE guifg=NONE guibg=#1a1a1a +hi PmenuSbar gui=NONE guifg=NONE guibg=#262626 +hi PmenuSel gui=NONE guifg=NONE guibg=#333333 +hi PmenuThumb gui=NONE guifg=NONE guibg=#424242 + +hi DiffAdd gui=NONE guifg=NONE guibg=#082608 +hi DiffChange gui=NONE guifg=NONE guibg=#1a1a1a +hi DiffDelete gui=NONE guifg=NONE guibg=#260808 +hi DiffText gui=NONE guifg=NONE guibg=#333333 + +hi Search gui=NONE guifg=#171717 guibg=#909636 +hi IncSearch gui=NONE guifg=#171717 guibg=#909636 + +hi Comment gui=italic guifg=#F2F2F2 guibg=NONE +hi Type gui=NONE guifg=#aadb0f guibg=NONE +hi Boolean gui=NONE guifg=#aadb0f guibg=NONE +hi String gui=NONE guifg=#aadb0f guibg=NONE +hi Number gui=NONE guifg=#aadb0f guibg=NONE +hi Title gui=bold guifg=#aadb0f guibg=NONE +hi Todo gui=standout guifg=NONE guibg=NONE +hi Constant gui=italic guifg=#F2F2F2 guibg=NONE +hi Identifier gui=bold guifg=#F2F2F2 guibg=#171717 +hi Statement gui=bold guifg=#aadb0f guibg=NONE +hi StorageClass gui=bold guifg=#aadb0f guibg=NONE +hi Conditional gui=bold guifg=#aadb0f guibg=NONE +hi MatchParen gui=bold guifg=NONE guibg=NONE + +hi Special gui=NONE guifg=#808080 guibg=NONE +hi SpecialKey gui=bold guifg=#212121 guibg=NONE + +hi xmlTagName gui=NONE guifg=#F2F2F2 guibg=NONE +hi xmlEndTag gui=NONE guifg=#F2F2F2 guibg=NONE +hi xmlNamespace gui=bold guifg=#F2F2F2 guibg=NONE +hi xmlAttrib gui=NONE guifg=#F2F2F2 guibg=NONE + +hi ColorColumn gui=NONE guifg=NONE guibg=#1a1a1a +hi Conceal gui=NONE guifg=#808080 guibg=NONE +hi Directory gui=NONE guifg=#F2F2F2 guibg=NONE +hi Error gui=NONE guifg=NONE guibg=#260808 +hi ErrorMsg gui=NONE guifg=NONE guibg=#260808 +hi FoldColumn gui=NONE guifg=#616161 guibg=NONE +hi Folded gui=NONE guifg=#707070 guibg=NONE +hi Ignore gui=NONE guifg=NONE guibg=NONE +hi ModeMsg gui=NONE guifg=NONE guibg=NONE +hi MoreMsg gui=NONE guifg=NONE guibg=NONE +hi Question gui=NONE guifg=NONE guibg=NONE +hi SignColumn gui=NONE guifg=#616161 guibg=NONE +hi Underlined gui=NONE guifg=NONE guibg=NONE +hi WarningMsg gui=NONE guifg=NONE guibg=#260808 +hi WildMenu gui=NONE guifg=NONE guibg=#525252 +hi lCursor gui=NONE guifg=NONE guibg=NONE +hi PreProc gui=NONE guifg=NONE guibg=NONE + +hi SpellBad gui=undercurl guifg=NONE guibg=#260808 +hi SpellCap gui=undercurl guifg=NONE guibg=NONE +hi SpellLocal gui=undercurl guifg=NONE guibg=#082608 +hi SpellRare gui=undercurl guifg=NONE guibg=#262626 diff --git a/vim/.vimrc b/vim/.vimrc index dbe7672..18f6036 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -23,7 +23,7 @@ set incsearch set ignorecase set smartcase -colorscheme jellybeans +colorscheme akr vnoremap cc "+y nnoremap cc "+p @@ -49,6 +49,7 @@ nnoremap k nnoremap j set laststatus=2 +let g:airline_theme='akr' let g:airline#extensions#tabline#enabled=1 let g:airline#extensions#tabline#show_buffers=0 let g:airline#extensions#tabline#show_tab_type=0 diff --git a/vim/airline_theme.vim b/vim/airline_theme.vim new file mode 100644 index 0000000..2c8258e --- /dev/null +++ b/vim/airline_theme.vim @@ -0,0 +1,100 @@ +" Each theme is contained in its own file and declares variables scoped to the +" file. These variables represent the possible "modes" that airline can +" detect. The mode is the return value of mode(), which gets converted to a +" readable string. The following is a list currently supported modes: normal, +" insert, replace, visual, and inactive. +" +" Each mode can also have overrides. These are small changes to the mode that +" don't require a completely different look. "modified" and "paste" are two +" such supported overrides. These are simply suffixed to the major mode, +" separated by an underscore. For example, "normal_modified" would be normal +" mode where the current buffer is modified. +" +" The theming algorithm is a 2-pass system where the mode will draw over all +" parts of the statusline, and then the override is applied after. This means +" it is possible to specify a subset of the theme in overrides, as it will +" simply overwrite the previous colors. If you want simultaneous overrides, +" then they will need to change different parts of the statusline so they do +" not conflict with each other. +" +" First, let's define an empty dictionary and assign it to the "palette" +" variable. The # is a separator that maps with the directory structure. If +" you get this wrong, Vim will complain loudly. +let g:airline#themes#akr#palette = {} + +" First let's define some arrays. The s: is just a VimL thing for scoping the +" variables to the current script. Without this, these variables would be +" declared globally. Now let's declare some colors for normal mode and add it +" to the dictionary. The array is in the format: +" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid +" values for the "opt" value. +let s:N1 = [ '#212121' , '#909636' , 17 , 190 ] +let s:N2 = [ '#909636' , '#212121' , 255 , 238 ] +let s:N3 = [ '#909636' , '#212121' , 85 , 234 ] +let g:airline#themes#akr#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) + +" Here we define overrides for when the buffer is modified. This will be +" applied after g:airline#themes#akr#palette.normal, hence why only certain keys are +" declared. +let g:airline#themes#akr#palette.normal_modified = { + \ 'airline_c': [ '#212121' , '#352F6A' , 255 , 53 , '' ] , + \ } + +let s:I1 = [ '#E4E093' , '#352F6A' , 17 , 45 ] +let s:I2 = [ '#909636' , '#212121' , 255 , 27 ] +let s:I3 = [ '#909636' , '#212121' , 15 , 17 ] +let g:airline#themes#akr#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) +let g:airline#themes#akr#palette.insert_modified = { + \ 'airline_c': [ '#212121' , '#352F6A' , 255 , 53 , '' ] , + \ } +let g:airline#themes#akr#palette.insert_paste = { + \ 'airline_a': [ s:I1[0] , '#352F6A' , s:I1[2] , 172 , '' ] , + \ } + +let g:airline#themes#akr#palette.replace = copy(g:airline#themes#akr#palette.insert) +let g:airline#themes#akr#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ] +let g:airline#themes#akr#palette.replace_modified = g:airline#themes#akr#palette.insert_modified + + +let s:V1 = [ '#E4E093' , '#8C3346' , 232 , 214 ] +let s:V2 = [ '#909636' , '#212121' , 232 , 202 ] +let s:V3 = [ '#909636' , '#212121' , 15 , 52 ] +let g:airline#themes#akr#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) +let g:airline#themes#akr#palette.visual_modified = { + \ 'airline_c': [ '#212121' , '8C3346' , 255 , 53 , '' ] , + \ } + + +let s:IA1 = [ '#605c5a' , '#212121' , 239 , 234 , '' ] +let s:IA2 = [ '#605c5a' , '#212121' , 239 , 235 , '' ] +let s:IA3 = [ '#605c5a' , '#212121' , 239 , 236 , '' ] +let g:airline#themes#akr#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) +let g:airline#themes#akr#palette.inactive_modified = { + \ 'airline_c': [ '' , '' , 97 , '' , '' ] , + \ } + + +" Accents are used to give parts within a section a slightly different look or +" color. Here we are defining a "red" accent, which is used by the 'readonly' +" part by default. Only the foreground colors are specified, so the background +" colors are automatically extracted from the underlying section colors. What +" this means is that regardless of which section the part is defined in, it +" will be red instead of the section's foreground color. You can also have +" multiple parts with accents within a section. +let g:airline#themes#akr#palette.accents = { + \ 'red': [ '#ff0000' , '' , 160 , '' ] + \ } + + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if !get(g:, 'loaded_ctrlp', 0) + finish +endif +let g:airline#themes#akr#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#909636' , '#212121' , 189 , 55 , '' ], + \ [ '#909636' , '#212121' , 231 , 98 , '' ], + \ [ '#212121' , '#909636' , 55 , 231 , 'bold' ]) + -- cgit v1.2.3