Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show invisible line endings in Sublime Text 3?

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.

like image 361
sdive Avatar asked Jan 12 '17 08:01

sdive


People also ask

How do you show line endings in Sublime Text?

So normal Sublime editing normalizes all line endings to be the same, so showing a line ending glyph doesn't make sense in normal editing. Simply look down in the status bar and you will see whether line endings are Windows, Unix, or macOS.

How do you show hidden characters in Sublime Text?

In order to do this in Sublime you need to open your preferences file (On OSx that is ⌘+, ) and insert the line "draw_white_space": "all" . By default it is set to "selection" and the other option is for it to be "off".

How do I display tabs in Sublime Text?

In Sublime Text 2, you can use CTRL + SHIFT + P to access quickly to some functionalities. Type tabs and you will find the View: Toggle Tabs functionality.


1 Answers

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

like image 173
user56reinstatemonica8 Avatar answered Sep 18 '22 22:09

user56reinstatemonica8