syntax highlighting for react code in sublime

前端 未结 3 1167
误落风尘
误落风尘 2021-01-31 01:01

I\'m started writing some basic React code in sublime text. Here is what my syntax highlighting looks like. Its partly highlighted. Is there any suggested sublime plugin i can u

3条回答
  •  被撕碎了的回忆
    2021-01-31 01:39

    Installing babel fixes the syntax highlighting.

    Steps to install babel on sublime3:

    1. For windows: Press Ctrl+Shift+P For mac: Cmd+Shift+P
    2. Then type install and select Package control: Install Package
    3. Then type Babel and select 'Babel-Snippets'. It will install babel in few moments.
    4. Then set the Babel syntax in Sublime3 Editor from: View > Syntax > Babel > Javascript

    For some users, Babel was missing in step 4. They can additionally install Babel by following the same steps and selecting Babel this time instead of Babel-Snippets in step3.

    Check I tested it:

提交回复
热议问题