How to show invisible line endings in Sublime Text 3?

46,405

Solution 1

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

Solution 2

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

Share:
46,405
sdive
Author by

sdive

Updated on June 12, 2021

Comments

  • sdive
    sdive about 3 years

    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.