syntax: Improce concealment

This commit is contained in:
Tomas Babej 2015-03-23 07:50:49 +01:00
parent 57f1321729
commit 31d5b718c1
2 changed files with 15 additions and 2 deletions

View file

@ -1,9 +1,21 @@
" Detect if conceal feature is available
let s:conceal = exists("+conceallevel") ? ' conceal': ''
" Conceal the UUID
execute 'syn match VimwikiTaskUuid containedin=VimwikiCheckBoxDone,VimwikiCheckBoxActive /\v#[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/'.s:conceal
" Conceal header definitions
for s:i in range(1,6)
execute 'syn match TaskWikiHeaderDef containedin=VimwikiHeader'.s:i.' /|[^=]*/'.s:conceal
endfor
" Highlight active tasks
syntax match VimwikiCheckBoxActive /\*\s*\[S\]\s.*$/
hi def link VimwikiCheckBoxActive Type
let s:conceal = exists("+conceallevel") ? ' conceal': ''
execute 'syn match VimwikiTaskUuid containedin=VimwikiCheckBoxDone,VimwikiCheckBoxActive /\v#[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/'.s:conceal
" Highlight the UUID as comment
hi link VimwikiTaskUuid Comment
" Set concealed parts as really concealed in normal mode, and with cursor over
setlocal conceallevel=3
setlocal concealcursor=nc