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

Add toggle tool bar mapping

This commit is contained in:
wsdjeg 2017-05-02 20:53:41 +08:00
parent 0d6aa65d0a
commit 4255372131

View File

@ -47,7 +47,10 @@ function! SpaceVim#layers#ui#config() abort
\ 'fullscreen-frame', 0)
call SpaceVim#mapping#space#def('nnoremap', ['T', 'm'], 'call call('
\ . 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('
\ . string(s:_function('s:toggle_end_of_buffer')) . ', [])',
\ 'display ~ in the fringe on empty lines', 1)
@ -77,6 +80,17 @@ function! s:toggle_menu_bar() abort
endif
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
function! s:toggle_colorcolumn() abort
if !s:ccflag