Skip to content

Commit

Permalink
Merge pull request #778 from leowzukw/patch-3
Browse files Browse the repository at this point in the history
Add way to toggle background light or dark
  • Loading branch information
spf13 committed May 21, 2015
2 parents 808dd7d + e158e17 commit 03b9801
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@
" General {

set background=dark " Assume a dark background

" Allow to trigger background
function! ToggleBG()
let s:tbg = &background
" Inversion
if s:tbg == "dark"
set background=light
else
set background=dark
endif
endfunction
noremap <leader>bg :call ToggleBG()<CR>
" if !has('gui')
"set term=$TERM " Make arrow and other keys work
" endif
Expand Down

0 comments on commit 03b9801

Please sign in to comment.