例如,我想要以下内容:
:match search /<div/ guib=Green
:match search /<\/div>/ guibf=Blue
但那是行不通的。
答案1
您必须定义突出显示颜色。从:h :match
:mat[ch] {group} /{pattern}/
Define a pattern to highlight in the current window. It will
be highlighted with {group}. Example: >
:highlight MyGroup ctermbg=green guibg=green
:match MyGroup /TODO/
所以,像这样:
:hi OpenTag guibg=green ctermbg=green
:hi CloseTag guibg=blue ctermbg=blue
:match OpenTag /<div>/
:2match CloseTag /<\/div>/