Sublime Forum

Why is there a pink line going from the end of the line?

#1

What is this? is this intentional? is there a way to remove this feature?

Thanks in advance,
Yair.

0 Likes

#2

it’s to show you that you have an unclosed string, I don’t think you want to remove this behavior, you should close the string instead… :wink: (add a ' before the ))

1 Like

#3

I know that, but it just blinks in my eyes and it’s a bit annoying, maybe I can change it’s color somehow?

0 Likes

#4

You can either pick a different color scheme entirely or edit it - this guide should get you on the right track

0 Likes

#5

 
You can change the background color value for the invalid scope in your active tmTheme file.

0 Likes

#6

it happens when you type the string first before entering the quote.
and then place the cursor at the start of the string, hit quote key.

if you type the quote first, sublime text will create "" or '' directly with cursor in the middle, then you can start typing …

if you type the string first, you can select the string you select with ctrl+shift+left arrow, and press quote key. sublime text will add quote around the selected string automatically. "hello"

0 Likes

#7

https://forum.sublimetext.com/t/what-causes-hot-pink-highlighting/10083

I am getting the pink lines at the end of line breaks between long quotations:
Fixing this is a no go. The programs still compile, but the pink lines cause the lines below it to white out and not show formatting. That makes using sublime pretty worthless.

0 Likes

#8

You’ll need to provide an example snippet of code, the syntax you are using and what version of Sublime Text.

With the Monokai color scheme, pink means invalid. So, for some reason the syntax you are using thinks your code is invalid. It may be that there is a bug in the syntax. Providing more info will help people give you advice on what needs to be done.

0 Likes

#9

I am coding in a form of python: warband script for Mount and Blade.
I have no idea what version of Sublime Text 3 this is.
I get this problem in an old version on an old computer and the version that I downloaded from your site on Monday.
I am running on Win X64 in Win 8 and Win 7.
The pink lines are at line breaks that don’t end in quotes.
You can see in the errors that this is a problem because the lines below it lose all sublime formatting.
The code still compiles and the exe works.
However, I need to see the text editor python formatting to properly work with this massive text-focused file.

0 Likes

#10

I would try the latest dev build. I believe that bug was fixed.

0 Likes

#11

Hi. I’m having a similar problem with the pink line. In my case I can’t figure out why the “/” is making the pink line appear.

Can someone help me out?

0 Likes

#12

It’s not the / that’s making it appear; the first item in the array is missing the closing ' character, so the first character from the second one is closing the first string and the second ' in the second element is starting a new string instead of closing one, and then everything else after it is effectively broken because the string is unterminated.

0 Likes

#13

Actually, how do you intentionally make a syntax do that? (i.e. show the invalid scope all te the way to the right limit of the window)? What regex would do that?

0 Likes

#14

\n is all the regex you need - just match the newline char

1 Like