Tiago Bértolo Tiago Bértolo - 1 year ago 165
React JSX Question

How to fix Sublime text highlighting for react-tutorial?

I recently started the official reactjs tutorial and noticed that the sublime text highlighting is completely screwed.

enter image description here

How can i fix this?

Answer Source

Install babel with the package control package, if you don't have it, get it here.

Open the package control, select install package, type babel, select it and press enter.

Setting as the default syntax

To set it as the default syntax for a particular extension:

  • Open a file with that extension, Select View from the menu, Then Syntax -> Open all with current extension as... -> Babel -> JavaScript (Babel). Repeat this for each extension (e.g.: .js and .jsx). Setting a Color Scheme

Babel comes bundled with Next and Monokai from Benvie/JavaScriptNext.tmLanguage. Select one from Preferences -> Color Scheme -> Babel

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download