diff --git a/Deployments/vim.nix b/Deployments/vim.nix index 388a909..de92d48 100644 --- a/Deployments/vim.nix +++ b/Deployments/vim.nix @@ -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 augroup encrypted