2

In hlsearch mode, seems that you can set only one color.

Now I want to use a script to get multiple colors for multiple keywords, is that possible?

2

Yes, it is possible. Vim Tip 1572 ("Highlight multiple words") and its discussion page contains several methods/scripts.

You can also use the Mark--Karkat script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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