chrisbra / Colorizer

color hex codes and color names
547 stars 30 forks source link

Missing concealment support for `$(tput sgr0)` #53

Closed LucHermitte closed 7 years ago

LucHermitte commented 7 years ago

Hi,

First, thanks for the plugin!

I've noticed a little issue with the codes used to clear highlighting on my console that are produced with $(tput sgr0). While they seem to be correctly processed to reset the highlighting, they aren't concealed. Note: In my log file they appear as ^[(B^[[m (where ^[ is the usual escape sequence).

The typical bash sequence that can reproduce the issue is:

declare -A colors=([reset]="$(tput sgr0)" [red]="$(tput setaf 1)")
echo "foo${colors[red]}bar${colors[reset]}42" > some.log
gvim -c ':ColorToggle' some.log
chrisbra commented 7 years ago

Interesting, for me tput sgr0 returns ^[[m^O, ah well, let's just both hide.

LucHermitte commented 7 years ago

Thank you Christian!