1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

Add mapping to toggle conceal level (#2298)

[SPC] t c
toggles between conceallevel=0 and 2
This commit is contained in:
Stefan Lendl 2018-11-24 16:15:31 +01:00 committed by Wang Shidong
parent 6164828e63
commit 64ac875247
3 changed files with 10 additions and 0 deletions

View File

@ -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('

View File

@ -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('.')

View File

@ -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 |