Skip to content

Option to show whitespace characters #588

Closed

Description

@arkon

Issuehunt badges

It'd be nice if we could see whitespace characters like in an IDE/code editor so it's easier to see things like tabs vs spaces, trailing spaces, etc.


IssueHunt Summary

notlmn notlmn has been rewarded.

Backers (Total: $80.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Activity

  1. sindresorhus commented on Jul 7, 2017

    @sindresorhus
    Member

    Would be super useful. I think we should just do it by default without an option. Diffs are all about seeing changes, and whitespace characters are part of that.

  2. fregante commented on Jul 7, 2017

    @fregante
    Member

    I'm not sure I want to see poor code whenever I browse.

    However it does make sense in diffs and CodeMirror. Perhaps this can be achieved with a custom font.

  3. sindresorhus commented on Jul 7, 2017

    @sindresorhus
    Member

    Oh, I assumed this was about diffs only. I agree, only makes sense in diffs and CodeMirror.

  4. fregante commented on Jul 27, 2017

    @fregante
    Member

    Tabs in CodeMirror have their own element, however spaces don't :(

    .cm-tab {
         background: url(tab-symbol.svg);
    }

    https://codemirror.net/demo/visibletabs.html

  5. fregante commented on Aug 24, 2017

    @fregante
    Member

    Related content around the web, unfortunately not very positive:

    I created a font with fontello and:

    • the space works
    • the tab uses the space character instead of its dedicated character on Chrome
    • (gray) color can't be set via font
    • character width has to match the selected character width

    screen shot 2017-08-24 at 19 23 37

    In short: this has to be built in JS. If we can access CodeMirror's instance there's a plugin for that https://github.com/coderaiser/cm-show-invisibles

  6. bweston92 commented on Oct 20, 2017

    @bweston92

    BitBucket do this quite well with an option to show whitespace.
    screenshot from 2017-10-20 08-41-30
    Then you get to see faint dots like:
    screenshot from 2017-10-20 08-41-44

  7. fregante commented on Oct 20, 2017

    @fregante
    Member

    Where are you seeing that? I can't find it anywhere in my BB repos.

  8. bweston92 commented on Oct 20, 2017

    @bweston92

    @bfred-it hmm it is on private BitBucket server (without addons) maybe BitBucket Cloud is different.

  9. tallen1983 commented on Jan 16, 2018

    @tallen1983
    Contributor
  10. jdreesen commented on Jan 16, 2018

    @jdreesen
  11. tallen1983 commented on Jan 17, 2018

    @tallen1983
    Contributor

    https://groups.google.com/forum/m/#!topic/codemirror/L2EJ8Bs3mGA seems to imply it can be done with their specialChars option. That in combination with the script I posted above would solve both, I think.

  12. IssueHuntBot commented on Apr 11, 2019

    @IssueHuntBot

    @IssueHunt has funded $80.00 to this issue.


  13. added
    Please! ♥︎
    on Apr 19, 2019
  14. added
    💵 Funded on Issuehunt
    on May 10, 2019
  15. added and removed
    💵 Funded on Issuehunt
    on Oct 31, 2019
  16. issuehunt-oss commented on Oct 31, 2019

    @issuehunt-oss

    @sindresorhus has rewarded $72.00 to @notlmn. See it on IssueHunt

    • 💰 Total deposit: $80.00
    • 🎉 Repository reward(0%): $0.00
    • 🔧 Service fee(10%): $8.00
  17. locked as resolved and limited conversation to collaborators on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Please! ♥︎acceptedenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions