1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-12 09:35:40 +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

View File

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