39

I would like to display invisible line endings in Sublime Text 3, as for example in Notepad++. How can we do that?

This is useful because when the automatic word wrap mode is ON for example, because it becomes hard to distinguish soft line breaks from real ones.

sdive
  • 2,047
  • 1
  • 20
  • 20

4 Answers4

43

The package RawLineEdit is pretty good for this. It toggles on-and-off a mode where you view and can edit line endings by selecting Raw Line Edit: Toggle from the Sublime ctrlshiftp command prompt.

This is good if you want to be able to flick line endings visibility on and off on the occasions when you want to see it (it's not the best option if you want line endings to be always visible).

It's also very useful for seeing (and editing) if you've ended up with crlf problems, with windows-style cr carriage return characters getting mixed up with the standard lf line end characters shown as ¬:

enter image description here

user56reinstatemonica8
  • 32,576
  • 21
  • 101
  • 125
6

I have written a basic plugin to display line endings as an explicit character, inline. There's certainly some room for improvement but it does the job.

It is available here: https://github.com/sdive/sublime-text_managelineendings

sdive
  • 2,047
  • 1
  • 20
  • 20
0

The other suggestions found here didn't work for the character I was encountering (U+2028). I found that this plugin was able to show me where the character was occurring:

https://packagecontrol.io/packages/Highlight%20Dodgy%20Chars

Keyslinger
  • 4,903
  • 7
  • 42
  • 50
-7

ctrl + shift + p on editor now, type toggle word wrap and select it