1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 20:30:05 +08:00

Move public function to UI layer

This commit is contained in:
Shidong Wang 2019-05-05 20:56:57 +08:00
parent 4627011d28
commit 63b97876dd
2 changed files with 13 additions and 11 deletions

View File

@ -53,8 +53,9 @@ function! SpaceVim#layers#ui#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call('
\ . string(s:_function('s:toggle_fill_column')) . ', [])',
\ 'highlight-long-lines', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()',
\ 'toggle background', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call call('
\ . string(s:_function('s:toggle_background')) . ', [])',
\ 'toggle conceal', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'c'], 'call call('
\ . string(s:_function('s:toggle_conceal')) . ', [])',
\ 'toggle conceal', 1)
@ -281,3 +282,13 @@ func! s:toggle_conceal()
setlocal conceallevel=0
endif
endf
function! s:toggle_background()
let s:tbg = &background
" Inversion
if s:tbg ==# 'dark'
set background=light
else
set background=dark
endif
endfunction

View File

@ -11,15 +11,6 @@ function! OnmiConfigForJsp()
return "\<esc>a."
endif
endf
function! ToggleBG()
let s:tbg = &background
" Inversion
if s:tbg ==# 'dark'
set background=light
else
set background=dark
endif
endfunction
function! BracketsFunc()
let line = getline('.')
let col = col('.')