mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Add toggle tool bar mapping
This commit is contained in:
parent
0d6aa65d0a
commit
4255372131
@ -47,7 +47,10 @@ function! SpaceVim#layers#ui#config() abort
|
|||||||
\ 'fullscreen-frame', 0)
|
\ 'fullscreen-frame', 0)
|
||||||
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')) . ', [])',
|
||||||
\ 'menu-bar', 1)
|
\ 'toggle-menu-bar', 1)
|
||||||
|
call SpaceVim#mapping#space#def('nnoremap', ['T', 't'], 'call call('
|
||||||
|
\ . string(s:_function('s:toggle_tool_bar')) . ', [])',
|
||||||
|
\ 'toggle-tool-bar', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['T', '~'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['T', '~'], 'call call('
|
||||||
\ . string(s:_function('s:toggle_end_of_buffer')) . ', [])',
|
\ . string(s:_function('s:toggle_end_of_buffer')) . ', [])',
|
||||||
\ 'display ~ in the fringe on empty lines', 1)
|
\ 'display ~ in the fringe on empty lines', 1)
|
||||||
@ -77,6 +80,17 @@ function! s:toggle_menu_bar() abort
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let s:ttflag = 0
|
||||||
|
function! s:toggle_tool_bar() abort
|
||||||
|
if !s:ttflag
|
||||||
|
set go+=T
|
||||||
|
let s:ttflag = 1
|
||||||
|
else
|
||||||
|
set go-=T
|
||||||
|
let s:ttflag = 0
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
let s:ccflag = 0
|
let s:ccflag = 0
|
||||||
function! s:toggle_colorcolumn() abort
|
function! s:toggle_colorcolumn() abort
|
||||||
if !s:ccflag
|
if !s:ccflag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user