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

Invisibles enhancements and fixes #12157

Open
lee-dohm opened this issue Jul 12, 2016 · 40 comments
Open

Invisibles enhancements and fixes #12157

lee-dohm opened this issue Jul 12, 2016 · 40 comments

Comments

@lee-dohm
Copy link
Member

@lee-dohm lee-dohm commented Jul 12, 2016

In order to clean things up, I'm unifying a number of invisibles-related enhancements and fixes under this one Issue and closing the others.

  • When showInvisibles is off, non-visible characters should be non-visible
  • When showInvisibles is on, all normally non-visible characters (control characters, zero-width spaces, other Unicode weirdness, etc) should be rendered in some way #1839
  • There should be some way of customizing which non-visible characters are displayed when showInvisibles is on (Perhaps by class? i.e. whitespace, control characters, Unicode groups)
  • All displayed invisibles should be visible anywhere on the line when showInvisibles is enabled #2572
  • Make it possible for invisibles tab characters to span multiple spaces #3051 (see implementation suggestion by @natbraun)

Related: #6669

@xfq

This comment has been minimized.

Copy link
Contributor

@xfq xfq commented Jul 13, 2016

Related: #5490

@va1m

This comment has been minimized.

Copy link

@va1m va1m commented Jul 13, 2016

I'm ready to help in testing when the issue will fixed.

@callumlocke

This comment has been minimized.

Copy link

@callumlocke callumlocke commented Jul 28, 2016

Related: #6669

Does that mean #6669 will be covered by these changes, or is just related?

A sub-option "Only within selection" (like Sublime Text has) would be great.

@lee-dohm

This comment has been minimized.

Copy link
Member Author

@lee-dohm lee-dohm commented Jul 28, 2016

@callumlocke It means that it is related.

@callumlocke

This comment has been minimized.

Copy link

@callumlocke callumlocke commented Jul 28, 2016

Ok :) but do you think it would be worth actually adding it to the list? I'm unclear why that particular issue is 'only' related, it seems like it would naturally go in this list, as it involves adding another option regarding invisibles. Then again I don't know the codebase.

@lee-dohm

This comment has been minimized.

Copy link
Member Author

@lee-dohm lee-dohm commented Aug 8, 2016

@callumlocke All of the things I gathered together are refinements to the definition of what an invisible is and how invisibles work. The Issue you're mentioning is more about selections than invisibles themselves, which is why I didn't include it ... but it is related.

@alexmcmillan

This comment has been minimized.

Copy link

@alexmcmillan alexmcmillan commented Aug 21, 2016

#6669 is one of the reasons I gave up on Atom and went back to ST3. Just sayn'

@alexrussell

This comment has been minimized.

Copy link

@alexrussell alexrussell commented Aug 25, 2016

@lee-dohm I agree that #6669 is only related in the sense that it related to invisibles in some way, but is otherwise off topic (this is more about ensuring Atom can render everything that should be considered invisible). That said, the "span multiple spaces" task you have there I would put in the same boat in terms of only being related but not the 'core' of this issue.

All that said, I think #6669 is still a pressing concern* because I have a feeling it's something that is very baked into the core. Being related to the under/overlayer (though actually it's been so long since I raised this issue I have no idea how selection is done any more) means that it's not something we can do purely in CSS (without just using colour hacks) or probably even a DOM-manipulating package without a lot of pain and management of state. Like display of control characters and variable-width invisibles, it's something that a core dev just needs to sit down and make decisions about how it needs to be done based on how the rest of the text buffer and editor stuff works and is planned to continue to work far into the future.

* Arguably the most pressing concern on invisibles, as it's turning so many people off Atom - while it doesn't hit as hard as invisibles not showing when they should (e.g. control chars), that doesn't always inform people's motives regarding choosing whether to stick with Atom or not as much as you'd think!

@woerndl

This comment has been minimized.

Copy link

@woerndl woerndl commented Aug 25, 2016

Arguably the most pressing concern on invisibles, as it's turning so many people off Atom - while it doesn't hit as hard as invisibles not showing when they should (e.g. control chars), that doesn't always inform people's motives regarding choosing whether to stick with Atom or not as much as you'd think!

Absolutely. Funny, first I thought, I'll get used to it. Tried the workarounds. But #3051 made me switch back too. Especially if writing Sass.

@littlebeandog

This comment has been minimized.

Copy link

@littlebeandog littlebeandog commented Sep 27, 2016

When showInvisibles is on, all normally non-visible characters (control characters, zero-width spaces, other Unicode weirdness, etc) should be rendered in some way #1839

+1s

@fractalf

This comment has been minimized.

Copy link

@fractalf fractalf commented Oct 19, 2016

Just spend 30min scratching my head before I found a nasty C2 A0 in some weird code. Hope this gets fixed :)

@elmatou

This comment has been minimized.

Copy link

@elmatou elmatou commented Nov 6, 2016

@octagonal

This comment has been minimized.

Copy link

@octagonal octagonal commented Dec 6, 2016

We just experienced a similar issue when trying to figure out why our code wasn't compiling. As you can imagine it was quite difficult to find the problematic 'zero width character' in question 😉 .

As a temporary solution we went into vim with :set list turned on. Doing this shows will show such characters as <200b> which is the behaviour I expected Atom to have as well.

I'd be glad to help with testing when the issue gets resolved.

@lifzgreat

This comment has been minimized.

Copy link

@lifzgreat lifzgreat commented Dec 6, 2016

Funny, first I thought, I'll get used to it. Tried the workarounds. But #3051 made me switch back too.

I switched back too :( I ended up leaving Atom and going back to Sublime Text 3 because of this issue. It's crazy how important this becomes when it's missing! I'm subscribed to this issue if/when it gets fixed!

@iredwards

This comment has been minimized.

Copy link

@iredwards iredwards commented Jan 12, 2017

Invisible invisibles is the deal-breaker for me. My sources have mixed space types so I keep having to open another editor to do work. I hoped Atom would be a good cross platform editor, but because of invisible spaces, it is not usable.

@Arcanemagus

This comment has been minimized.

Copy link
Member

@Arcanemagus Arcanemagus commented Jan 12, 2017

@iredwards Atom can show (some) invisibles like spaces, this issue is about enhancements to that existing functionality.

@iredwards

This comment has been minimized.

Copy link

@iredwards iredwards commented Jan 12, 2017

@Arcanemagus I guess I'm not sure what issue # is appropriate for this. I haven't been able to figure out how to show spaces that aren't leading or trailing. I tried to install the atom-innerspaces package. What I really need is a way to distinguish between vanilla spaces and utf8 nonbreaking spaces, like 0xc2 0xa0, and mixtures of tabs and various spaces within a line.

@Arcanemagus

This comment has been minimized.

Copy link
Member

@Arcanemagus Arcanemagus commented Jan 12, 2017

@iredwards Ah, your "doesn't show spaces" was a bit misleading then 😛. This is exactly the issue you are looking for then, as what you are talking about is a combination of points 2 (#1839) and 4 (#2572).

@calumk

This comment has been minimized.

Copy link

@calumk calumk commented Jan 22, 2017

+1 for this issue.
Causing me all sorts of problems "cleaning" table data coppied from excel/word

@polarathene

This comment has been minimized.

Copy link

@polarathene polarathene commented Feb 6, 2017

Just ran into #2572 myself. atom-innerspace was apparently a solution in the past but Atom devs broke it with an update and have been reluctant to make it possible for the package to work again according to this closed issue.

Would be great to see this natively supported by Atom.

@6

This comment has been minimized.

Copy link

@6 6 commented Feb 14, 2017

This package solved the issue for me https://atom.io/packages/show-invisibles-plus, although as others have said a native solution would be great as well.

@kukac7

This comment has been minimized.

Copy link

@kukac7 kukac7 commented Feb 16, 2017

screenshots:

sublime
screen shot 2017-02-16 at 10 05 22

atom
screen shot 2017-02-16 at 10 06 01

windows chrome
screen shot 2017-02-16 at 10 08 54

😭

edit: @6 very nice, thx! 🙇

@kamaradski

This comment has been minimized.

Copy link

@kamaradski kamaradski commented Aug 22, 2017

This is the only deal breaker as to why my buddies and I are not using Atom anymore.

I run into these frequently, and since these are invisible it's always too late. (read: extra work to fix/remove/replace these)

In other editors (even CLI) I immediately see these and can correct them in 1 go without the need to switch tools to do a post-check.

@rayfoss

This comment has been minimized.

Copy link
Contributor

@rayfoss rayfoss commented Aug 22, 2017

https://atom.io/packages/show-invisibles-plus seemed like a miracle drug... but it doesn't actually work all that well. It misses lots of characters and its settings don't play well with the built in invisibles functionality.

A native solution is needed for peace of mind... particularly if you copy/paste code from the web... which often contain all sorts of life draining invisibles.

@fractalf

This comment has been minimized.

Copy link

@fractalf fractalf commented Oct 31, 2017

@atom_developers: is this very hard to fix, is that why it's not been done?

There are basically 2 "failings" as I see it:

  1. Show invisibles (those working as of now) on the whole line, not just before the first character (this would at least show spaces that are not really spaces)

  2. Show weird characters as a symbol of sorts (mentioned many times in this thread)

I have a hard time seeing these issues being so hard to fix, but then again, I have now idea how things are done developing atom..

ps. the "show-invisibles-plus" package isn't working for me

@juni0r

This comment has been minimized.

Copy link

@juni0r juni0r commented Feb 8, 2018

I'll just +1 this and leave...

@olleicua

This comment has been minimized.

Copy link

@olleicua olleicua commented Feb 9, 2018

+1

@olleicua

This comment has been minimized.

Copy link

@olleicua olleicua commented Feb 9, 2018

Is there a reason we could, for example, wrap every whitespace character in a span and give those spans a :before pseudo-selector with the desired display character in it absolute positioned into place? Or, even perhaps give whitespace spans a special font for this purpose? This doesn't seem like it should be difficult..

@calumk

This comment has been minimized.

Copy link

@calumk calumk commented Feb 9, 2018

That would be a LOT of spans....

@alexrussell

This comment has been minimized.

Copy link

@alexrussell alexrussell commented Feb 9, 2018

@olleicua which exact issue is your suggestion here solving? The current "show invisibles" will should you all whitespace characters if that's what you want. This issue is here to group a bunch of slightly-more-edge-case issues, such as showing non-printable characters (like NUL, BEL, etc.). And my issue (#6669) is about showing invisibles only for the current selection, which it looks like your suggestion is most suited for.

@olleicua

This comment has been minimized.

Copy link

@olleicua olleicua commented Feb 10, 2018

Oh, nevermind, for some reason it wasn't working for me but now it is..

@olleicua

This comment has been minimized.

Copy link

@olleicua olleicua commented Feb 11, 2018

@alexrussell actually it is only showing me leading whitespace. I want to show all whitespace..

@alexrussell

This comment has been minimized.

Copy link

@alexrussell alexrussell commented Feb 12, 2018

Ahh yes good point. I forgot that Atom only shows you whitespace at the beginning of the line.

@olleicua

This comment has been minimized.

Copy link

@olleicua olleicua commented Feb 12, 2018

so.. what exactly is preventing this basic feature?

@50Wliu

This comment has been minimized.

Copy link
Member

@50Wliu 50Wliu commented Feb 12, 2018

@olleicua Nothing is except that no PRs have been opened yet. Anyone who would like to see these enhancements implemented is welcome to investigate and open a PR.

@rayfoss

This comment has been minimized.

Copy link
Contributor

@rayfoss rayfoss commented Feb 12, 2018

The problem isn't as bad as it used to be, I used to have issues with Carriage Return U+21B5, which used to hide between characters and eat the cursor for one stroke. Now that actually shows as a proper symbol. Even the previously mentioned U+00A0 NO-BREAK SPACE isn't all that bad, as it shows as a normal space, which is problematic, but not as bad as it used to be.

Below is a carriage return, followed by nbsp, followed by a space, followed by hello
screen shot 2018-02-12 at 11 56 20 am

seems like the fix for carriage return could be applied to the rest of the nasties...

@stale

This comment was marked as resolved.

Copy link

@stale stale bot commented Feb 12, 2019

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of Atom
  2. Comment that the issue is still reproducible and include:
    • What version of Atom you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

Issues that are labeled as triaged will not be automatically marked as stale.

@stale stale bot added the stale label Feb 12, 2019
@rsese rsese added the triaged label Feb 12, 2019
@stale stale bot removed the stale label Feb 12, 2019
@oisnot

This comment has been minimized.

Copy link

@oisnot oisnot commented Feb 15, 2019

Found this zero width space in git. Not visible in Atom even with Show invisible enabled. This bug caused lots of problems debugging why a docker service wouldn't start.

Atom 1.34.0

skjermdump fra 2019-02-15 11-29-51

@rediris

This comment has been minimized.

Copy link

@rediris rediris commented Mar 4, 2019

Atom 1.34.0:
With Show Invisibles enabled, the following zero width character space remains invisible:

screen shot 2019-03-04 at 10 52 23 am

@PgLoLo

This comment has been minimized.

Copy link

@PgLoLo PgLoLo commented Mar 24, 2020

Any progress on showing invisible inner spaces?

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

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.