Created
June 15, 2020 08:14
-
-
Save huytd/24207623e7eaf161e9611e964648c207 to your computer and use it in GitHub Desktop.
Checkbox for markdown in Vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax match todoCheckbox '\v\s*(-? \[[ x\.!\*]\])' contains=finishedCheckbox,unfinishexCheckbox,flaggedCheckbox,starredCheckbox | |
syntax match finishedCheckbox '\v(-? \[[ \.]\])' conceal cchar= | |
syntax match unfinishexCheckbox '\v(-? \[x\])' conceal cchar= | |
syntax match flaggedCheckbox '\v(-? \[!\])' conceal cchar= | |
syntax match starredCheckbox '\v(-? \[\*\])' conceal cchar= | |
hi link todoCheckbox Todo | |
hi clear Conceal | |
setlocal cole=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in
$VIMRC/after/syntax/markdown.vim
.Here's some test content:
Screenshot: