guns / xterm-color-table.vim

All 256 xterm colors with their RGB equivalents, right in Vim!
http://github.com/guns/xterm-color-table.vim
384 stars 37 forks source link

Change the way syntax match is executed. #10

Open padawin opened 4 years ago

padawin commented 4 years ago

Problem: The syntax highlight group is defined based on the RGB code used, which causes problems if 2 colors use the same RGB (e.g. if you redefine xterm ANSI colors in .Xresources). It can create the following (Note the colors 16, 21 and 51): Screenshot from 2019-10-13 20-00-10

It can be reproduced by modifying the ANSI colors of the terminal.

This PR makes the highlight independent from the rgb code used, as long as it is an RGB code.

Result afterwards:

Screenshot from 2019-10-13 20-09-17