6

For example, I want something along the lines of:

:match search /<div/ guib=Green
:match search /<\/div>/ guibf=Blue

only that doesn't work.

iDontKnowBetter
  • 927
  • 1
  • 8
  • 9

1 Answers1

5

You have to define highlight colors. From :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/

So, something like this:

:hi OpenTag guibg=green ctermbg=green
:hi CloseTag guibg=blue ctermbg=blue
:match OpenTag /<div>/
:2match CloseTag /<\/div>/
Bernhard
  • 11,992
  • 4
  • 59
  • 69
voithos
  • 330
  • 2
  • 8