The sign help says:

        Highlighting group used for the whole line the sign is placed
        in.  Most useful is defining a background color.

Is there a special group I can use (like SignRow)? Maybe there is a way to provide a specific colour instead of a highlight group? I tried sign define wholeline linehl=162 but it doesn't work. I'd like to use special colour for linehl so I want to avoid reusing any unrelated highlight group for this purpose.

The only highlight group related to sign I was able to find is SignColumn which is not what I am looking for.

  • 2
    Create your own and use it? For example, :hi Foo ctermbg=162 then :sign define x linehl=Foo.
    – muru
    Dec 8, 2016 at 5:53
  • @muru I didn't know I can define my own groups. Thanks a lot. I'll be happy to accept it as an answer. I forgot to read :h hi - I just jumped straight to :h highlight-groups. Dec 8, 2016 at 8:03

1 Answer 1


Highlight groups are an abstraction over the colors and styles that are available in the terminal or GUI. Vim has default groups built-in (and these are referenced by the syntax plugins), and a colorscheme provides corresponding color / style definitions.

It is perfectly fine to define your own, custom highlight group, and then use that for commands like :sign and :match:

:highlight MySign ctermbg=162
:sign define wholeline linehl=MySign

If you switch colorschemes often, or already have found a proper highlighting in your colorscheme, you can also just link your new group to it:

:highlight link MySign Identifier
  • If muru decides to post an answer I'll mark his answer as accepted instead of this one. Dec 8, 2016 at 11:26
  • 1
    @MateuszPiotrowski: Ok, fine with me. I just wanted to see this answered, and provide some more information on the topic, compared to his short comment. Dec 8, 2016 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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