public
Last active — forked from garrettoreilly/vimrc

  • Download Gist
vimrc
VimL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
" Set colorscheme to solarized
colorscheme solarized
 
function! s:DayOrNight()
" Launch vim with light background during the day and dark at night (5 refers to 5AM and 17 to 5PM).
if strftime("%H") >= 5 && strftime("%H") < 17
set background=light
else
set background=dark
endif
colorscheme solarized
endfunction
 
" Source ~/.vimrc any time you save a file, so the background color will change if it becomes day/night.
if has("autocmd")
autocmd bufwritepost * call s:DayOrNight()
endif

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.