1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-11 17:15:46 +08:00

fix(key): fix SPC T F key binding

This commit is contained in:
wsdjeg 2022-04-03 22:12:11 +08:00
parent f966464168
commit a7a89ef088

@ -235,8 +235,9 @@ function! SpaceVim#layers#ui#config() abort
\ . string(s:_function('s:toggle_syntax_hi')) . ', [])',
\ 'toggle-syntax-highlighting', 1)
call SpaceVim#mapping#space#def('nmap', ['T', 'F'], '<F11>',
\ 'fullscreen-frame', 0)
call SpaceVim#mapping#space#def('nnoremap', ['T', 'F'], 'call call('
\ . string(s:_function('s:toggle_full_screen')) . ', [])',
\ 'fullscreen-frame', 1)
call SpaceVim#mapping#space#def('nnoremap', ['T', 'm'], 'call call('
\ . string(s:_function('s:toggle_menu_bar')) . ', [])',
\ 'toggle-menu-bar', 1)
@ -279,17 +280,12 @@ function! SpaceVim#layers#ui#config() abort
\ . string(s:_function('s:toggle_whitespace')) . ', [])',
\ 'toggle-highlight-tail-spaces', 1)
" download gvimfullscreen.dll from github, copy gvimfullscreen.dll to
" the directory that has gvim.exe
if has('nvim')
nnoremap <silent> <F11> :call <SID>toggle_full_screen()<Cr>
else
nnoremap <silent> <F11> :call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<cr>
endif
endfunction
let s:fullscreen_flag = 0
function! s:toggle_full_screen() abort
if has('nvim')
if s:fullscreen_flag == 0
call GuiWindowFullScreen(1)
let s:fullscreen_flag = 1
@ -297,6 +293,11 @@ function! s:toggle_full_screen() abort
call GuiWindowFullScreen(0)
let s:fullscreen_flag = 0
endif
else
" download gvimfullscreen.dll from github, copy gvimfullscreen.dll to
" the directory that has gvim.exe
call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)
endif
endfunction
" function() wrapper