Added Solarized light/dark switching

Switched between light and dark Solarized themes based on the time of day.
This commit is contained in:
Serĉanto de Scio 2019-11-08 12:37:33 +10:00
parent bad8a42835
commit 19eaf1b39a
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -6,7 +6,6 @@ vim_configurable.customize {
vimrcConfig.customRC = ''
" Preferred global default settings:
set number " Enable line numbers by default
set background=dark " Set the default background to dark or light
set smartindent " Automatically insert extra level of indentation
set tabstop=4 " Default tabstop
set shiftwidth=4 " Default indent spacing
@ -38,6 +37,14 @@ vim_configurable.customize {
autocmd FilterWritePre * :call TrimWhiteSpace()
autocmd BufWritePre * :call TrimWhiteSpace()
" Solarized light during the day, solarized dark during the night
let hour = strftime("%H")
if 7 <= hour && hour < 17
set background=light
else
set background=dark
endif
" Transparent editing of gpg encrypted files.
" By Wouter Hanegraaff <wouter@blub.net>
augroup encrypted