~gpanders/dotfiles

ref: 8bbb6b42ada8c7e573ffba9c35b376dd6bec1d15 dotfiles/vim/.vim/after/syntax/markdown.vim -rw-r--r-- 970 bytes
8bbb6b42Greg Anders Move weechat config directory to .config/weechat 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" See https://github.com/tpope/vim-markdown/pull/140
syntax clear markdownCodeBlock
syn region markdownCodeBlock start="\n\(    \|\t\)" end="\v^((\t|\s{4})@!|$)" contained

syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained conceal

" https://github.com/tpope/vim-markdown/pull/141/
hi def link markdownLinkDelimiter     Delimiter
hi def link markdownLinkTextDelimiter Delimiter

" Don't highlight pure whitespace lines, as these are sometimes useful in
" Markdown
let b:highlight_trailing_whitespace = 0
syn match TrailingWhitespace /\S\+\zs\\\@<!\s\+\%#\@<!$/ containedin=ALL