-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature: Highlight non-printable characters #395
Conversation
Adds a new `-A`/`--show-all` option (in analogy to GNU Linux `cat`s option) that highlights non-printable characters like space, tab or newline. This works in two steps: - **Preprocessing**: replace space by `•`, replace tab by `├──┤`, replace newline by ``, etc. - **Highlighting**: Use a newly written Sublime syntax to highlight these special symbols. Note: This feature is not technically a drop-in replacement for GNU `cat`s `--show-all` but it has the same purpose.
ea939c4
to
ccbbb32
Compare
Thank you - this is great! A few comments:
|
@HenrikBengtsson Thank you very much for your detailed feedback!
Yes, good idea! I was using
Absolutely. I changed it and it will now output either LF or CRLF at the end of a line - much better!
Hm...
More non-printable characters should be very easy to add in the future. One entry in |
Yeah, you're correct. I was too quick on "NL" in https://en.wikipedia.org/wiki/Newline: "IBM mainframe systems, including z/OS (OS/390) and i5/OS(OS/400) | EBCDIC | NL | 15 | 21 | \025" That's not part of the ASCII standard. |
Just tested the updated PR; looks great to me. |
Adds a new
-A
/--show-all
option (in analogy to GNU Linuxcat
s option) thathighlights non-printable characters like space, tab or newline.
This works in two steps:
•
, replace tab by├──┤
, replacenewline by

, etc.these special symbols.
without
--show-all
with
--show-all
Remarks:
cat
s--show-all
but it has the same purpose.--show-all
.--tabs N