简体   繁体   中英

How to set up Sublime Text 3 for React?

I'm trying to set up my Sublime Text 3 for React like the screenshots in this link , didn't succeed to make it though.

Maybe I have some extra packages or settings that would show my index.js syntax like below:

在此处输入图片说明

sublime-settings:

{
    "auto_complete": true,
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    "dictionary": "Packages/Language - English/en_US.dic",
    "ensure_newline_at_eof_on_save": false,
    "font_face": "MONACO",
    "font_size": 16,
    "show_line_endings": true,
    "show_panel_on_build": true,
    "spell_check": true,
    "theme": "Adaptive.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true
}

I also have these packages:

在此处输入图片说明

How do I do that?

(Thanks! I'm new to React/js/jsx)

The best package I found for react/jsx on sublime was Naomi. It deals with syntax highlighting and has a lot of other features.

https://packagecontrol.io/packages/Naomi

https://packagecontrol.io/search/babel

=> Install the Babel package by babel

Use the Default JSX style of Sublime Text.

GoTo:

View -> Syntax -> Javascript -> JSX

Alternatively you can select the syntax from the bottom right status bar menu of Sublime text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM