vim-hicterm icon indicating copy to clipboard operation
vim-hicterm copied to clipboard

Add highlighting for 16-color names

Open NLKNguyen opened this issue 9 years ago • 2 comments

Can you please also add highlighting for the standard 16-color names? Thanks.

:h cterm-colors

                            *cterm-colors*
        NR-16   NR-8    COLOR NAME ~
        0       0       Black
        1       4       DarkBlue
        2       2       DarkGreen
        3       6       DarkCyan
        4       1       DarkRed
        5       5       DarkMagenta
        6       3       Brown, DarkYellow
        7       7       LightGray, LightGrey, Gray, Grey
        8       0*      DarkGray, DarkGrey
        9       4*      Blue, LightBlue
        10      2*      Green, LightGreen
        11      6*      Cyan, LightCyan
        12      1*      Red, LightRed
        13      5*      Magenta, LightMagenta
        14      3*      Yellow, LightYellow
        15      7*      White

NLKNguyen avatar Jul 06 '16 02:07 NLKNguyen

Hmm, these color names only make sense for cterm values in Vim. :information_desk_person: For example, it wouldn't make sense to highlight these color names in an Xresources or CSS file because they have a broader spectrum of natively recognized color names.

So if we add this functionality, it would need to be restricted to the vim filetype. :lock: Is that acceptable?

sunaku avatar Jul 07 '16 03:07 sunaku

Yes, I think it's very acceptable to do that because these color names are Vim specific anyway in order to access the terminal color palette rather than the natural colors that the names suggest.

I also notice that the xterm color numbers are slightly different from the list above, for instance, color 1 is DarkRed in xterm, but in the list or Windows Command Prompt, it's DarkBlue. So, I think it is more correct if you highlight the text using their color names instead of numbers. :smile:

NLKNguyen avatar Jul 07 '16 05:07 NLKNguyen