mirror of
https://github.com/spf13/spf13-vim.git
synced 2024-09-21 07:27:11 +00:00
Add way to toggle background light or dark
There is maybe a better place for this. I'm a VimL beginner, I hope my code is correct. At home, it works.
This commit is contained in:
parent
91d3d8edc6
commit
e158e176b6
13
.vimrc
13
.vimrc
@ -75,6 +75,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