Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ANSI TTY Esc Colorization Codes #327

Open
smallscript opened this issue Jul 14, 2018 · 1 comment
Open

Support for ANSI TTY Esc Colorization Codes #327

smallscript opened this issue Jul 14, 2018 · 1 comment

Comments

@smallscript
Copy link

smallscript commented Jul 14, 2018

Do you think it is reasonable/feasible to have it auto-detect ANSI TTY color codes and both hide the ANSI TTY codes and use them to colorize the text.

That would be awesome for simply streaming stderr console output and other similarly embedded pre-colorized streams of data. My language engine ts-lang (tcl+javascript) generates this kind of telemetry channel data for headless apps and I have found DebugViewPP to be awesome. When I worked at Microsoft I had a similar log filtering and colorization tool.

One possible option would be to enable a plug-in that would act like reg-ex for Token but auto-detect ANSI color codes (they are trivial patterns) and then filter them out colorizing the text. But it really depends on how the DVP layout engine is setting up color information before rendering the text. I would assume the issue at hand is "range" to apply the modification to, and ordering of when to apply this filter versus other filters. But it may also require some special work to "hide" the esc-codes. It would actually be really cool if the Token-regex could "rewrite" the token string and set its color. Then no special plug would be required at all. You could just define some basic colorization rules for the escape patterns. But that would require the ability to "rewrite" the token before it was rendered.

Ideally such a "token-rewrite" would only transiently change the rendering, not actually alter the retained content if one turned it off or saved the log file.

I might be interested in doing the work, but would like to know if the author(s) think it is feasible.
See previous comments on this
And this for Visual Studio with these comments

@janwilmans
Copy link
Member

janwilmans commented Jul 14, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants