Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Highlight ASCII control characters unambiguously#5231

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
alois31 wants to merge2 commits intomawww:master
base:master
Choose a base branch
Loading
fromalois31:control-characters

Conversation

alois31
Copy link

Previously, all ASCII control characters would be shown as the replacement character. This leads to a visual loss of information and ambiguities, particularly when opening files that contain lots of control characters (or binary files). Use the common circumflex notation, known from software such ascat -v or vim, instead.

Fixes#2936

I dedicate any and all copyright interest in this software to thepublic domain.  I make this dedication for the benefit of the public atlarge and to the detriment of my heirs and successors.  I intend thisdedication to be an overt act of relinquishment in perpetuity of allpresent and future rights to this software under copyright law.
Previously, all ASCII control characters would be shown as the replacementcharacter. This leads to a visual loss of information and ambiguities,particularly when opening files that contain lots of control characters (orbinary files). Use the common circumflex notation, known from software such as`cat -v` or vim, instead.Fixesmawww#2936
@mawww
Copy link
Owner

I am afraid this will make vertical movements a bit broken as we use the buffer line column width so we are not relying on highlighting at all for this. If we really want to change this I'd prefer to use the unicode control pictures which should not shift anything vertically.

krobelus and alois31 reacted with thumbs up emoji

@alois31alois31 marked this pull request as draftSeptember 9, 2024 16:18
@alois31
Copy link
Author

Thank you for catching the breakage. Not sure if the Unicode pictures are much better than the current state, they are almost completely unreadable with many fonts in normal sizes.

@arachsys
Copy link
Contributor

Random thought: would a more readable alternative to a replacement character or a tiny unicode control picture be a specially highlighted letter, e.g. ^a (optionally?) becomes an 'a' in a special face instead of �?

@Delapouite
Copy link
Contributor

Talking aboutcat -v,bat which aims to be a "modern" alternative with bells and whistles adds a way to decide betweenCaret Notation andControl Pictures (␜, ␝, ␞, ␟…).

Here's the relevant extract of itsman:

-A, --show-all    Show non-printable characters like space, tab or newline. Use '--tabs' to control the width of the tab-placeholders.--nonprintable-notation <notation>    Specify how to display non-printable characters when using --show-all.    Possible values:caret    Use character sequences like ^G, ^J, ^@, .. to identify non-printable charactersunicode    Use special Unicode code points to identify non-printable characters

I'm not sure how such an option would translate in Kakoune world.

Not sure if the Unicode pictures are much better than the current state, they are almost completely unreadable with many fonts in normal sizes.

I agree that these chars are usually quite small, but it would nonetheless carry more information that a soulless � and when such (rare) situation happens, well you can always temporarily zoom the font size in your terminal.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Display Control Characters as ^A, ^M

4 participants

@alois31@mawww@arachsys@Delapouite

[8]ページ先頭

©2009-2025 Movatter.jp