2011-12-10 26 views

回答

2

在降價高亮(https://github.com/plasticboy/vim-markdown/blob/master/syntax/mkd.vim)plasticboy做這樣的:

"HTML headings 
syn region htmlH1  start="^\s*#"     end="\($\|#\+\)" [email protected] 
syn region htmlH2  start="^\s*##"     end="\($\|#\+\)" [email protected] 
syn region htmlH3  start="^\s*###"     end="\($\|#\+\)" [email protected] 
syn region htmlH4  start="^\s*####"    end="\($\|#\+\)" [email protected] 
syn region htmlH5  start="^\s*#####"    end="\($\|#\+\)" [email protected] 
syn region htmlH6  start="^\s*######"    end="\($\|#\+\)" [email protected] 
syn match htmlH1  /^.\+\n=\+$/ conta[email protected] "<-- Here is the one I think you want 
syn match htmlH2  /^.\+\n-\+$/ [email protected] 

爲了完整降價標題如下:

H1 header 
========= 

H2 header 
---------