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?
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.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago