From 2e6064cf14c044a8b21f0164ab35adfa245e08d8 Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Thu, 14 Mar 2019 22:39:54 +0800 Subject: [PATCH] Remove toggle conceal func --- autoload/SpaceVim/layers/ui.vim | 11 ++++++++++- config/functions.vim | 7 ------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index c24f23847..95014c686 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -55,7 +55,8 @@ function! SpaceVim#layers#ui#config() abort \ 'highlight-long-lines', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'b'], 'call ToggleBG()', \ 'toggle background', 1) - call SpaceVim#mapping#space#def('nnoremap', ['t', 'c'], 'call ToggleConceal()', + call SpaceVim#mapping#space#def('nnoremap', ['t', 'c'], 'call call(' + \ . string(s:_function('s:toggle_conceal')) . ', [])', \ 'toggle conceal', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 't'], 'call SpaceVim#plugins#tabmanager#open()', \ 'Open tabs manager', 1) @@ -272,3 +273,11 @@ function! s:toggle_whitespace() abort call SpaceVim#layers#core#statusline#toggle_section('whitespace') call SpaceVim#layers#core#statusline#toggle_mode('whitespace') endfunction + +func! s:toggle_conceal() + if &conceallevel == 0 + setlocal conceallevel=2 + else + setlocal conceallevel=0 + endif +endf diff --git a/config/functions.vim b/config/functions.vim index fb3173f6c..10529e07d 100644 --- a/config/functions.vim +++ b/config/functions.vim @@ -20,13 +20,6 @@ function! ToggleBG() set background=dark endif endfunction -function! ToggleConceal() - if &conceallevel == 0 - setlocal conceallevel=2 - else - setlocal conceallevel=0 - endif -endfunction function! BracketsFunc() let line = getline('.') let col = col('.')