Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 312
Tiago Bértolo Avatar asked Sep 29 '16 16:09

Tiago Bértolo


People also ask

Can we use Sublime Text for React JS?

Users only need one license to use Sublime Text on any computer. The tool is fast, integrated with multiple tools, and supports React, React Native, and all web programming languages.

Why is sublime text not working?

There are two main reasons why Sublime Text may become unresponsive: certain plugins are interfering with the program or the cache files are clogging up the program's processes. Removing your programs and reverting Sublime Text to freshly installed state should fix this problem for most users.


1 Answers

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

like image 76
Computer's Guy Avatar answered Oct 19 '22 17:10

Computer's Guy