From: Hiroshi Shirosaki Date: Fri, 6 Sep 2013 00:04:29 +0000 (+0900) Subject: Work with bullet lists (-, +, etc) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/276518b9371261efbbdb2f370f33f3cb8e8371d2?hp=-c Work with bullet lists (-, +, etc) Catch both numbered and unnumbered lists in a regexp pattern --- 276518b9371261efbbdb2f370f33f3cb8e8371d2 diff --git a/syntax/mkd.vim b/syntax/mkd.vim index 68499f9..8ace27c 100644 --- a/syntax/mkd.vim +++ b/syntax/mkd.vim @@ -74,8 +74,7 @@ syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/ syn match mkdIndentCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained syn match mkdListItem "^\s*[-*+]\s\+" syn match mkdListItem "^\s*\d\+\.\s\+" -syn region mkdNonListItemBlock start="\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!" end="^\(\s*[-*+]\s\+\)\@=" contains=@mkdNonListItem -syn region mkdNonListItemBlock start="\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!" end="^\(\s*\d\+\.\s\+\)\@=" contains=@mkdNonListItem +syn region mkdNonListItemBlock start="\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_$/