Sublime text syntax coloring quote issue
Asked Answered
S

1

6

I'm using sublime text 3 to code some react native stuff and when writing in text components I use quotes that mess up all the syntax coloring as in the picture below. Is there any way to fix this ?

syntax highlighting messing up

Speculate answered 12/12, 2015 at 10:17 Comment(0)
T
12

React JSX syntax

JSX is the JavaScript Syntax extension you normally use in your render method.

Correct Color Scheme

Since JSX is an extension to the plain JavaScript, Sublime doesn't know about it. You have to tell Sublime to use the extension babel-sublime.

Installation of babel-sublime

Just follow the official documentation to install this plugin. I don't write it down, in case something changes in the future. Also check the documentation about Package Control, which you use to manage your Sublime Packages.

Tessatessellate answered 12/12, 2015 at 17:37 Comment(2)
Please expand this answer to explain what the babel plugin is and why it would be useful in this circumstance. Link-only answers become useless if the link changes or is unavailable. See here for more. Just to be clear, I think this is the correct solution to the problem, you just need to explain more why this is the correct solution.Dermato
Sorry. Not so easy on mobile. Give me a second! :)Tessatessellate

© 2022 - 2024 — McMap. All rights reserved.