Created
March 24, 2012 22:32
-
-
Save salvianoo/2188675 to your computer and use it in GitHub Desktop.
Function to toggle background color
This file contains 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
"my first vimscript function | |
function! <sid>BackgroundToggle() | |
if &background == 'dark' | |
set background=light | |
else | |
set background=dark | |
endif | |
endfunction | |
"call function | |
nnoremap <leader>B :call <sid>BackgroundToggle()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment