Skip to content

Instantly share code, notes, and snippets.

@lodestone
Created December 18, 2011 16:52
Show Gist options
  • Save lodestone/1493908 to your computer and use it in GitHub Desktop.
Save lodestone/1493908 to your computer and use it in GitHub Desktop.
Set a temporary session background color
" Set a temporary background color.
" I use this to differentiate
" visually between windows easily.
function! SetBackground(color)
let setbg=':highlight Normal guibg=' . a:color
exec setbg
endfunction
command! -nargs=? BackgroundColor :call SetBackground(<f-args>)
nmap <leader>bg :BackgroundColor #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment