mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:40:06 +08:00
Move public function to UI layer
This commit is contained in:
parent
4627011d28
commit
63b97876dd
@ -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
|
||||
|
@ -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('.')
|
||||
|
Loading…
Reference in New Issue
Block a user