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
show-whitespaces featuresIssueHunt has been backed by the following sponsors. Become a sponsor
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.
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.
Oh, I assumed this was about diffs only. I agree, only makes sense in diffs and CodeMirror.
Tabs in CodeMirror have their own element, however spaces don't :(
.cm-tab {
background: url(tab-symbol.svg);
}
Related content around the web, unfortunately not very positive:
I created a font with fontello and:

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
BitBucket do this quite well with an option to show whitespace.

Then you get to see faint dots like:

Where are you seeing that? I can't find it anywhere in my BB repos.
@bfred-it hmm it is on private BitBucket server (without addons) maybe BitBucket Cloud is different.
https://github.com/Mottie/GitHub-userscripts/wiki/GitHub-code-show-whitespace seems to work for me. Perhaps the author will let the plugin pull it in?
https://github.com/glebm/render-whitespace-on-github shows whitespace in file and diff view, but not in codemirror (afaik).
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.
@issuehunt has funded $80.00 to this issue.
@sindresorhus has rewarded $72.00 to @notlmn. See it on IssueHunt
Most helpful comment
BitBucket do this quite well with an option to show whitespace.


Then you get to see faint dots like: