X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/132a26e5a7a3ee2ae95b6b37dc49809a4b22ece5..271939ed66546ac99cf45dd4dd9025303f7004fd:/syntax/mkd.vim diff --git a/syntax/mkd.vim b/syntax/mkd.vim index 68499f9..575466b 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}_$/ @@ -115,6 +114,11 @@ HtmlHiLink mkdLinkTitle htmlString HtmlHiLink mkdDelimiter Delimiter +" Automatically insert bullets +setlocal formatoptions+=r +" Accept various markers as bullets +setlocal comments=b:*,b:+,b:- + let b:current_syntax = "mkd" delcommand HtmlHiLink