-
Notifications
You must be signed in to change notification settings - Fork 40
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
control characters unaccounted for #58
Comments
I'm sorry if this is not how you demonstrate this, but I have no experience in ANSI characters.
All I know is the |
The general CSI sequences is unsupported. Only 3/4-bit color are supported from what I can guess from the codes. |
Not supported? then 1. why not? 2. Any workaround? (e.g. can the <0x1b> markers be replaced by some other supported ones? |
Fact: To color a region, you have to provide its scope for ST. There is no other way to do it currently. For currently 4-bit support, we have at least (2^4)^2 = 256 scopes (actually is 24*18 = 432, see your user settings and the auto generated To support 8-bit, expected scopes count is at least (2^8)^2 = 65536 scopes and 65536*2 = 131072 regexes to be run. For 24-bit, I don't even think it's acceptable obviously. Even the 8-bit, the number is still unacceptable. The only thing you can change is the number of regexes if you can figure out a new algorithm or plugin architecture, but the number of scopes is inevitable currently. I think the term "support" is not "cleaning anything not supported", right? Another thought is to pick a similar color to "downgrade" 8-bit/24-bit colors to 4-bit ones. But I am not going to implement it since the current plugin works for me. Welcome to send a Pull Request though.
No. |
I meant replace \x1b in the text file with one that the ST ansi filter does support. |
This can be a good solution actually if someone can build a 8bit-to-4bit map. My lame though is writing a script to calculate the "distance" among all 8-bit colors and all 4-bit ones and use "closest" ones as approximations. |
I have some log files that have CSI characters which are showing up in my logs. Perhaps parsing should be added to remove these.
I tried adding the following into ansi.sublime-settings but it did not work:
The text was updated successfully, but these errors were encountered: