Created
November 14, 2021 01:04
-
-
Save nicolascb/0efa33a620b3e3ff7af60b2a6739ec13 to your computer and use it in GitHub Desktop.
vim: background toggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:darkmode = 0 | |
function! BgToggle() | |
if s:darkmode | |
execute 'set background=light' | |
execute 'colorscheme base16-atelier-dune-light' | |
execute 'AirlineTheme base16_atelier_dune_light' | |
let s:darkmode = 0 | |
return | |
endif | |
execute 'set background=dark' | |
execute 'colorscheme base16-flat' | |
execute 'AirlineTheme base16_flat' | |
let s:darkmode = 1 | |
endfunction | |
nnoremap <F9> :call BgToggle()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment