Externalizing color scheme configs outside plugin folder

(cherry picked from commit ac952b3d3ffbe8ea33460e98a37eb6ce67a871c1)
This commit is contained in:
Luiz Gonzaga dos Santos Filho 2013-04-21 13:56:13 +02:00
parent 673e1d1230
commit 20d884b842
3 changed files with 18 additions and 5 deletions

View File

@ -62,7 +62,3 @@ hi! link htmlLink Include
hi! CursorLine cterm=NONE gui=NONE hi! CursorLine cterm=NONE gui=NONE
hi! Visual ctermbg=233 hi! Visual ctermbg=233
hi! Type gui=bold hi! Type gui=bold
" Enforce the colors set here
au VimEnter * so ~/.vim/plugin/settings/solarized.vim

View File

@ -1,7 +1,24 @@
" Make it beautiful - colors and fonts " Make it beautiful - colors and fonts
" http://ethanschoonover.com/solarized/vim-colors-solarized " http://ethanschoonover.com/solarized/vim-colors-solarized
colorscheme solarized let s:myTheme='solarized'
exec 'colorscheme ' . s:myTheme
" If there's a custom powerline theme too, load it. Otherwise load the
" solarized one just so it won't look very bad.
let s:powerlineCustom="~/.vim/colors-settings/" . s:myTheme . "-powerline.vim"
if filereadable(expand(s:powerlineCustom))
exec "au VimEnter * so " . s:powerlineCustom
else
exec "au VimEnter * so ~/.vim/colors-settings/solarized-powerline.vim"
endif
let s:colorSchemeCustom="~/.vim/colors-settings/" . s:myTheme . ".vim"
if filereadable(expand(s:colorSchemeCustom))
exec "au VimEnter * so " . s:colorSchemeCustom
endif
set background=dark set background=dark
if has("gui_running") if has("gui_running")