Sign up ×
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.

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

1 Answer 1

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.