Add GitHub check box to markdown syntax

This commit is contained in:
Kenneth Benzie 2016-10-18 19:37:19 +01:00
parent d9374ba8ac
commit 20ca44e2ff
2 changed files with 13 additions and 7 deletions

View File

@ -26,13 +26,6 @@ function! MarkdownFold(lnum)
return '=' return '='
endfunction endfunction
hi link markdownCode Special
hi link markdownCodeDelimiter PreProc
hi link markdownHeadingDelimiter Statement
hi link markdownLinkDelimiter PreProc
hi link markdownLinkTextDelimiter PreProc
hi link markdownUrl Include
" Max 80 chars wide. " Max 80 chars wide.
setlocal textwidth=80 setlocal textwidth=80
" Use tabwidth of 4 to be markdown complient. " Use tabwidth of 4 to be markdown complient.

13
after/syntax/markdown.vim Normal file
View File

@ -0,0 +1,13 @@
" Add match for GitHub style check boxes
syn match markdownCheckboxDelimiter '[\[\]]' contained
syn match markdownCheckboxTick 'x' contained
syn match markdownCheckbox '\*\s\[\(x\|\s\)\]\s' contains=markdownCheckboxDelimiter,markdownCheckboxTick,markdownListMarker
hi link markdownCode Special
hi link markdownCodeDelimiter PreProc
hi link markdownHeadingDelimiter Statement
hi link markdownLinkDelimiter PreProc
hi link markdownLinkTextDelimiter PreProc
hi link markdownUrl Include
hi link markdownCheckboxTick Statement
hi link markdownCheckboxDelimiter PreProc