atom / line-ending-selector

Switch between Unix and Window style line endings.
MIT License
33 stars 18 forks source link

More visible when the line ending differ of the default use #23

Closed GuillaumeLegendre closed 8 years ago

GuillaumeLegendre commented 8 years ago

Could it be possible to make more visible lines ending who aren't the line ending by default? In the status bar, on the left of the LF/CRLF/Mixed, I could see a warning icon or the text in red . (yes Mixed would be always with a warning) And make in color: red; and always visible in the file each EOL who aren't the line ending by default.

I often receive file with which I have to work from many source. And they aren't always well formed. If Atom could warn me when it happen and where, I could more easily correct it or ask for the sender to correct it by pointing the error.

lee-dohm commented 8 years ago

I feel like part of this is already available. And the other part is probably something that needs to be fixed in the atom/atom repository.

I have something of a workaround though, but it really only works when LF is your typical line ending and you want to highlight CRLF lines. (It also doesn't highlight in red.) I have Show Invisibles on for all source code types (not for text files like Markdown) and I set my editor.invisibles like this:

"*":
  editor:
    invisibles:
      cr: "↩"
      eol: " "
      tab: "⇥"

This way, all lines ending in CRLF have a ↩at the end that I find to be very visible. It doesn't really work in the other direction though :confused:

After digging into this a little more, it will need to be fixed on the atom/atom repo. Would you mind reopening this Issue there?

Thanks for reporting!