出于突出显示的目的,如何将已突出显示的行与星号相匹配?
1. Really big title
*******************
答案 0 :(得分:2)
在Markdown中突出显示(https://github.com/plasticboy/vim-markdown/blob/master/syntax/mkd.vim),plasticboy就是这样的:
"HTML headings
syn region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell
syn region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell
syn region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell
syn region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell
syn region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell
syn region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell
syn match htmlH1 /^.\+\n=\+$/ contains=@Spell "<-- Here is the one I think you want
syn match htmlH2 /^.\+\n-\+$/ contains=@Spell
为了完整性,Markdown标题如下:
H1 header
=========
H2 header
---------