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

Show other invisible characters with renderWhitespace option #2878

Closed
sijad opened this issue Feb 10, 2016 · 6 comments
Closed

Show other invisible characters with renderWhitespace option #2878

sijad opened this issue Feb 10, 2016 · 6 comments
Labels
editor-render-whitespace feature-request Request for new features or functionality
Milestone

Comments

@sijad
Copy link
Contributor

sijad commented Feb 10, 2016

just in case atom also render CR, EOL characters
0-31 and 127 ASCII code are non-printable characters
also #2085 is related

@alexdima alexdima added feature-request Request for new features or functionality editor labels Feb 10, 2016
@Platzer
Copy link

Platzer commented Mar 16, 2017

Is it possible to render not printable characters?

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 2, 2018
@vscodebot vscodebot bot closed this as completed Jan 2, 2018
@microsoft microsoft deleted a comment from vscodebot bot Jan 2, 2018
@ramya-rao-a ramya-rao-a removed the *duplicate Issue identified as a duplicate of another issue(s) label Jan 2, 2018
@ramya-rao-a ramya-rao-a reopened this Jan 2, 2018
@alexdima alexdima added editor-rendering Editor rendering issues and removed editor labels Sep 20, 2018
@jaredatron
Copy link

I just waisted 20m debugging a url problem because I had a Unicode Decimal Code ‭ preceding my absolute url causing it to be treated as a relative path.

Please allow us to enable rendering of these weird characters that no programmer ever wants in their code.

@rebornix rebornix added this to the Backlog milestone Oct 24, 2019
@alexdima alexdima added editor-render-whitespace and removed editor-rendering Editor rendering issues labels Oct 25, 2019
@perrog
Copy link

perrog commented Aug 5, 2020

+all other non-graphical code points.

Example:
Create a source-code file containing U+200B (ZERO WIDTH SPACE) format character, and open it in VSCode.
PS> [char]0x200B | Out-File .\zero_width_space.ps1 -Encoding utf8
File content in bytes:
PS > [io.file]::ReadAllBytes('.\zero_width_space.ps1')
239 187 191 226 128 139 13 10

Result:
VSCode does not display anything when opening the file, even when "editor.renderWhitespace"="all"
The first 239 187 191 (ZERO WIDTH NON-BREAKING SPACE) is intepreted as BOM.
The rest 226 128 139 13 10 (ZERO WIDTH SPACE) +(CR) + (LF) is source code text.

Background.
I this case, the second code point (ZERO WIDTH SPACE) is a syntax error for the particular source-code.

The source-code contains syntax error => important to be able to show invisible characters in a code editor.

In general, it may be useful to have an option to display Unicode-formatting characters in text file, if used explicitly in doc comments.

Formatting characters may also be accidental garbage when pasting text from a webbrowser.

Even the BOM-character could be shown as invisible character for full transparency.

@alexdima
Copy link
Member

alexdima commented Dec 9, 2022

This has been implemented in the meantime --> https://code.visualstudio.com/updates/v1_63#_unicode-highlighting

@alexdima alexdima closed this as completed Dec 9, 2022
@Fydon
Copy link

Fydon commented Dec 9, 2022

@alexdima I'm on 1.75.0-insider with editor.renderWhitespace set to all. I don't see CR and LF characters rendered in the editor. How do I show these?

@alexdima
Copy link
Member

alexdima commented Dec 9, 2022

@Fydon That is tracked in #12223

@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-render-whitespace feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

8 participants