From fa3f39b0f7150890136d69e95ab063f49e071023 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik.tjader@nordicsemi.no>
Date: Fri, 5 Aug 2022 18:09:03 +0200
Subject: [PATCH] Add shortcut for changing conceallevel

---
 .vimrc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.vimrc b/.vimrc
index e685750..b3ee827 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
-- 
GitLab