Sublime Forum

How to show UTF-8 line separator character, which is currently not displayed



How can I display UTF-8 “unprintable” characters like the Line Separator character when viewing files in Sublime, so that I know the characters are there. Currently, it just does not display them.


When Sublime Text v3.2.1 Build 3207 on Mac displays code containing a string with an embedded newline, it does not show the newline or wrap the string at the newline’s position. For example, in basic TextView on Mac, I see the following, where the embedded newlines actually cause a line break in the “text” element of this label:

            <label opaque="NO" userInteractionEnabled="NO" tag="1001" contentMode="left" 
horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your device is currently OFF.
Turn your device back on to
prevent loss of relief. " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" 
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" 
translatesAutoresizingMaskIntoConstraints="NO" id="2ic-aD-F5p">

But in Sublime it is hiding the newlines (which are actually pretty important):

How do I get it to either wrap the string at the newline onscreen or else show a special character there.

Note: I do NOT want to see every newline in the file, just the ones inside strings. All my searches on this topic end up at answers to questions about newlines in general, and not those within strings.



Isn’t all text in the screenshot 34th line? What is the “hidden newline” or “embedded newline” in the screenshot?



There is no indication at all that there are newlines within the text inside the quotes.

There is no line break, and there is no character indicator like \n or ↵

There is just no way to tell there are newlines there.



It’s a single line, the 34th line. If there is 35th line, then 34th has an EOL.




The issue is that it is hiding file content for no reason. It’s true it is a single line, but the string has characters in it that Sublime Text is choosing not to show, which is not useful. For reference, in C/C++, the string would be:

"Your device is currently OFF.\nTurn your device back on to\nprevent loss of relief. "

There are embedded newlines. These are correctly seen in other editors like TextView and in XCode.

I agree the line should only have one line number but it should either display it as something like:

34    text="Your device is currently OFF.↵Turn your device back on to↵prevent loss of relief. "


34    text="Your device is currently OFF.
Turn your device back on to
prevent loss of relief. "

To actually show the newline characters that are not at the end of the line.

Why is it hiding the inline characters?



I cannot get your point.

34    text="Your device is currently OFF.↵Turn your device back on to↵prevent loss of relief. "

What is this? You call this one line? Or two lines?

  • If one line, what’s ? Isn’t it a newline char according to your definition? What’s the difference between and \n?
  • If two lines, why they are all in line 34?

Is there a misunderstanding among raw string \n, newline (printed) and ?

What’s the definition of the “line counts”? In the text editor? In the execution result?
I feel they are mixed in the above discussion.

1 Like


It’s a string containing a literal newline character within it. Since it is within the string, it does not cause a logical new line for the language that interprets it, which is probably why Sublime is not creating a new line, but it is a problem that it’s hiding the character.

and \n are just different ways of visually showing the same thing; some editors show literal newlines using the C-like “\n” two character sequence, but some show a single character like “↵”.



I don’t think ST is hiding anything. Are you sure they are copied as-is? Can you paste them in a text editor which you think the result is correct and save it into a file and then make it public available on somewhere like github?

I think you are mixing concepts between execution result and raw source code.

The string is printed as two lines if you execute the compiled binary. But in the code in editor is in the same line as you write it in one line. Isn’t it?

Take your C-like as an example,

1 #include <iostream>
3 using namespace std;
5 int main (int argc, char *argv[]) {
6     cout << "hello\nworld!" << endl;
7     return 0;
8 }

It prints two lines after execution.


But in the text editor, it’s one line just because you write it in one line.

6   cout << "hello\nworld!" << endl;


Can you share a sample file with this so-called newline character? I suspect it’s not a line feed but something like a line separator or a similar non-ascii character, which ST does not handle.



I dumped the bytes with a C program, and you’re correct; it’s actually the UTF-8 Line Separator /0xE2 80 A8/

Sorry for the confusion.

(Still wish it displayed it instead of hiding it.)

1 Like


I think it can be visualized by writing a plugin using inline phantom. Although I am do not know how st decides to render a char or not.

I just copied a Line Separator from

And it’s shown as a block in my ST
Maybe related to ST’s font rendering mechanism. I am not sure…



The Gremlins package will show these



Gremlins will show a helpful mark in the gutter, but not a character in the text itself. This is better than no indication, so thank you for pointing out this package! There are also commands added to ‘Find’ the next invisible character, which are helpful, but if quickly scanning the text then it is still easy to miss these characters.




Yes, seeing a representation of a new line in a string is really important in debugging C++ text handlers such as ISRs. The symbol used is not so important as the fact that something shows you that it’s there. Wish there was something in ST 3.2.1
In fact there’s a lot more than just line feeds to account for(CR,HT,VT,etc.). It would be good to show a white space that when moused over reveals the hex or decimal character present. It should also be possible to insert a non-printing character by hex/dec value.

1 Like


I may make a plugin to visualize them with phantoms with data from when I am available.

1 Like


So, a working version is here.

It works like the following screenshot. It adds a phantom at the position of an invisible char.
When your cursor is put on an invisible char, its information will be shown in a popup.

Due to the long period of code reviewing for publishing it on Package Control, you may use a custom repository to install it which is mentioned in the readme.



Amazing! Works great! Thank you very much for creating this!

1 Like


Just a FYI, may work simpler for you if you are writing in Latin more.

Source from



This will be addressed in the next release.