diff --git a/.vimrc b/.vimrc index e685750cc06b01958141cdb42c95bfa39910b0c3..b3ee82740f9af536e768a1fd16cc3824b9114852 100644 --- a/.vimrc +++ b/.vimrc @@ -1259,8 +1259,18 @@ imap <c-x><c-l> <plug>(fzf-complete-line) if has('conceal') set conceallevel=2 concealcursor=niv endif + +" Allows for toggling conceal level easily +" https://alok.github.io/2018/04/26/using-vim-s-conceal-to-make-languages-more-tolerable/ +function! ToggleConcealLevel() + if &conceallevel == 0 + setlocal conceallevel=2 + else + setlocal conceallevel=0 + endif endfunction +nnoremap <silent> <Leader>tc :call ToggleConcealLevel()<CR> " For more convenient vimdiffing if &diff