-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
33 lines (27 loc) · 893 Bytes
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"**************************
" This is a vim config file
"**************************
function! LoadCfg()
for cfg in systemlist('cd ~/.vim && ls -a .__my__*')
" echo 'vim config file loading: 'cfg
execute 'source' . '~/.vim/'.cfg
endfor
endfunction
call LoadCfg()
" ChangeBackground changes the background mode based on macOS's `Appearance`
" setting. We also refresh the statusline colors to reflect the new mode.
function! ChangeBackground()
if system("defaults read -g AppleInterfaceStyle") =~ '^Dark'
set background=dark " for the dark version of the theme
else
set background=light " for the light version of the theme
endif
try
execute "AirlineRefresh"
catch
endtry
endfunction
" initialize the colorscheme for the first run
call ChangeBackground()
" change the color scheme if we receive a SigUSR1
" autocmd SigUSR1 * call ChangeBackground()