1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 10:40:04 +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(' call SpaceVim#mapping#space#def('nnoremap', ['t', '8'], 'call call('
\ . string(s:_function('s:toggle_fill_column')) . ', [])', \ . string(s:_function('s:toggle_fill_column')) . ', [])',
\ 'highlight-long-lines', 1) \ 'highlight-long-lines', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()', call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call call('
\ 'toggle background', 1) \ . string(s:_function('s:toggle_background')) . ', [])',
\ 'toggle conceal', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'c'], 'call call(' call SpaceVim#mapping#space#def('nnoremap', ['t', 'c'], 'call call('
\ . string(s:_function('s:toggle_conceal')) . ', [])', \ . string(s:_function('s:toggle_conceal')) . ', [])',
\ 'toggle conceal', 1) \ 'toggle conceal', 1)
@ -281,3 +282,13 @@ func! s:toggle_conceal()
setlocal conceallevel=0 setlocal conceallevel=0
endif endif
endf 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." return "\<esc>a."
endif endif
endf endf
function! ToggleBG()
let s:tbg = &background
" Inversion
if s:tbg ==# 'dark'
set background=light
else
set background=dark
endif
endfunction
function! BracketsFunc() function! BracketsFunc()
let line = getline('.') let line = getline('.')
let col = col('.') let col = col('.')