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

Fix SPC t s/S key binding (#4225)

close https://github.com/SpaceVim/SpaceVim/issues/4224
This commit is contained in:
Wang Shidong 2021-04-23 00:15:37 +08:00 committed by GitHub
parent 5286e1724f
commit dccedde086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ function! SpaceVim#layers#checkers#config() abort
call SpaceVim#layers#core#statusline#register_mode( call SpaceVim#layers#core#statusline#register_mode(
\ { \ {
\ 'key' : 'syntax-checking', \ 'key' : 'syntax-checking',
\ 'func' : string(s:_function('s:toggle_syntax_checker')), \ 'func' : s:_function('s:toggle_syntax_checker'),
\ } \ }
\ ) \ )
call SpaceVim#mapping#space#def('nnoremap', ['e', 'e'], 'call call(' call SpaceVim#mapping#space#def('nnoremap', ['e', 'e'], 'call call('
@ -255,7 +255,6 @@ endfunction
function! s:toggle_syntax_checker() abort function! s:toggle_syntax_checker() abort
call SpaceVim#layers#core#statusline#toggle_section('syntax checking') call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
if g:spacevim_lint_engine ==# 'neomake' if g:spacevim_lint_engine ==# 'neomake'
verbose NeomakeToggle verbose NeomakeToggle
elseif g:spacevim_lint_engine ==# 'ale' elseif g:spacevim_lint_engine ==# 'ale'

View File

@ -772,7 +772,8 @@ function! SpaceVim#layers#core#statusline#config() abort
let conf = s:JSON.json_decode(join(readfile(expand('~/.cache/SpaceVim/major_mode.json'), ''), '')) let conf = s:JSON.json_decode(join(readfile(expand('~/.cache/SpaceVim/major_mode.json'), ''), ''))
for key in keys(conf) for key in keys(conf)
if conf[key] if conf[key]
call SpaceVim#layers#core#statusline#toggle_mode(key) " this function should be called silent.
silent! call SpaceVim#layers#core#statusline#toggle_mode(key)
endif endif
endfor endfor
endif endif

View File

@ -141,7 +141,7 @@ function! SpaceVim#layers#ui#config() abort
call SpaceVim#layers#core#statusline#register_mode( call SpaceVim#layers#core#statusline#register_mode(
\ { \ {
\ 'key' : 'spell-checking', \ 'key' : 'spell-checking',
\ 'func' : string(s:_function('s:toggle_spell_check')), \ 'func' : s:_function('s:toggle_spell_check'),
\ } \ }
\ ) \ )