dotfiles/dot_config/nvim/langprefs/md.vim

19 lines
346 B
VimL

syntax match Conceal "||.*||" conceal cchar=?
let s:spoilered = 0
function! ToggleSpoiler()
if s:spoilered
hi Conceal guibg=#8087a2 guifg=#8087a2
let s:spoilered = 0
else
hi Conceal guibg=none
let s:spoilered = 1
endif
endfunction
nnoremap <F11> :call ToggleSpoiler()<CR>
inoremap <F11> <ESC>:call ToggleSpoiler()<CR>a