Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I want something along the lines of:

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

only that doesn't work.

share|improve this question
up vote 3 down vote accepted

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>/
share|improve this answer
Works. Thanks you. – iDontKnowBetter Jul 13 '12 at 17:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.