Sublime Forum

Red line at the end of each line in JSON

#1

Hello,
I have red lines at the end of each line in a JSON file that has been formatted.
Could you tell me how I can deactivate these red lines?
THANKS

0 Likes

#2

Most likely the selected syntax is not JSON.

0 Likes

#3

Indeed it is not a json format but it makes the same thing out of thing with json

0 Likes

#4

What I mean is that please select JSON syntax highlighting from the bottom-right of the window.

0 Likes

#5

Ah ok, it works.
Thank you very much for the answer

0 Likes

#6

I’m having this same problem, but I have selected JSON in the bottom right. Is there any other reason this might be happening, or another solution I can try?

0 Likes

#7

any other information? full screenshot or just provide codes for reproduction? reproduce-able in safe mode?

0 Likes

#8

Here’s a screenshot. I’m running Sublime 3 so no safe mode.

0 Likes

#9

I tried reverting to a freshly installed state, but it’s still showing up in red. So I guess that’s the equivalent of being reproduceable in safe mode.

0 Likes

#10

I see no reason why it goes red. Unless there are invisible characters at every end of lines.

0 Likes

#11

I just found a solution. There are two JSON options in the menu at the bottom right of the window. One is in a submenu under JavaScript. That one works fine. But the more obvious one, which appears in the main menu, doesn’t work. See attached images:

Edit: I’m a new user so I can’t add any more comments to this thread or post more than one picture in a single comment. So, I’ll just post the working picture.

0 Likes

#12

Sublime Text only ships with one JSON syntax. This cannot have happened if you reverted to a freshly installed state or in safe mode.

0 Likes

#13

I tried again to make sure, but I seem to still have two JSON syntax options. See pic below.

Following the guide I linked earlier, I opened appdata folder. Once there I removed Sublime Text 3 from both the local and roaming folders. After doing so I opened Sublime Text again. The apps appearance has changed, for example, the lines are no longer red, but pinkish. So, the style I use for the app has changed. Also, it now tells me it’s unregistered. I took this to mean that I had successfully reverted to a freshly installed state, though, of course I could be wrong.

In any case, here’s what it looks like in that state, and the syntax options I still have:

0 Likes

#14

Could you provide the output from the console (View > Show Console)?

0 Likes

#15

Did you by chance

  1. install JSON syntax from master branch of https://github.com/sublimehq/Packages or
  2. copy JSON.sublime-package from ST4?

Most of current syntax definitions are no longer compatible with ST3 as they use features which are available as of ST4 only.

0 Likes