question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend `show-whitespaces` to show mixed line endings

See original GitHub issue

It would be good if #2073 could be extended to show CRLF / LF indicators if the file has mixed line endings. (Ew!)

It could look like how bat shows non-printable characters:

image

(Compare line 10 and line 11. Ignore the rest of the screenshot, this feature proposal is just about line endings. Not other non-printable characters.)

Why?

The current show-whitespaces feature has been fantastic in stopping tabs appears where they shouldn’t (.editorconfig helps, but not everyone uses an IDE that supports it).

This feature will stop pesky CRLFs appearing where we don’t want them.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
sindresorhuscommented, May 21, 2020

Add a .gitattributes file with the following to your repo and you’ll never have to deal with CRLF again:

* text=auto eol=lf
0reactions
fregantecommented, Aug 15, 2020

Heh, mistake. That file is using the “visible lf” glyph

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possibility to display line endings in text area #12223 - GitHub
When opening a file with mixed line endings, vscode is still showing it as LF or CRLF in the status bar. After saving,...
Read more >
Show line endings - Visual Studio Feedback
A text editor should not require an extension to show new lines! ... I just opened a file with mixed line endings today...
Read more >
git - Show trailing whitespace and line endings in removed ...
Currently when doing git diff with --color option enabled git shows line endings such as ^M and trailing whitespaces only in added lines....
Read more >
Re: Mixed line endings problem - Google Groups
autodetect the DOS endings, it should only show a newline with the \r set as an invisible at the end of the line,...
Read more >
white-space - CSS: Cascading Style Sheets - MDN Web Docs
Collapses white space as for normal , but suppresses line breaks (text wrapping) within the source. pre. Sequences of white space are preserved....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found