diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index a46992ee8..c6ac3b146 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -55,6 +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()', + \ 'toggle conceal', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 't'], 'call SpaceVim#plugins#tabmanager#open()', \ 'Open tabs manager', 1) call SpaceVim#mapping#space#def('nnoremap', ['t', 'f'], 'call call(' diff --git a/config/functions.vim b/config/functions.vim index 869d747c4..bef197afa 100644 --- a/config/functions.vim +++ b/config/functions.vim @@ -43,6 +43,13 @@ 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('.') diff --git a/docs/documentation.md b/docs/documentation.md index deef8bc0c..e847e3ecb 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -421,6 +421,7 @@ Some UI indicators can be toggled on and off (toggles start with t and T): | `SPC t i` | toggle indentation guide at point | | `SPC t n` | toggle line numbers | | `SPC t b` | toggle background | +| `SPC t c` | toggle conceal | | `SPC t t` | open tabs manager | | `SPC T ~` | display ~ in the fringe on empty lines | | `SPC T F` | toggle frame fullscreen |