Tiago Bértolo Tiago Bértolo - 4 months ago 30
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?


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