Say I want to display a block of text where each character is displayed in different colors. And these colors change every 500ms.
If there are 7 colors in total, I can create 7 highlight groups (e.g. Color1, Color2 etc.) and apply those highlight groups on each characters.
Now there’re two way of doing this:
-
After each 500ms link those highlight groups to some other highlight groups (e.g. GruvboxPurple, GruvboxBlue etc.). In this case, the highlight group applied to each character remains fixed.
-
After each 500ms change the highlight group applied to each character. So the applied highlight groups keep changing.
I’m curious if one of those way is better than the other, or does it just depend on the situation at hand? Is there any performance implications?