mirror of
https://github.com/spf13/spf13-vim.git
synced 2024-09-21 07:27:11 +00:00
Merge pull request #778 from leowzukw/patch-3
Add way to toggle background light or dark
This commit is contained in:
commit
03b9801e06
13
.vimrc
13
.vimrc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user