React one of the environmental structures: Sublime Editor

Source: Internet
Author: User
Tags sublime editor

1. Download and install sublime Text3

Https://www.sublimetext.com/3


2. Install Package Control Plugin

This plugin is used to install other plug-ins.

Refer to the Website link description, to install: https://packagecontrol.io/installation


3. Package installation with package Controle:install: Babel, React-js, Sublimelinter

4. Press install Emmet, and modify Emmet compatible JSX file

Open Preferences-> Key bindings-users and copy the following code into [].

{
      "keys": [
        "Super+e"
      ],
      "args": {
        "action": "Expand_abbreviation"
      },
      "command": "Run_ Emmet_action ", Context
      : [{
        " key ":" Emmet_action_enabled.expand_abbreviation "
      }]
    },
    {
      "Keys": ["tab"],
      "command": "Expand_abbreviation_by_tab",
      "context": [{
        "operand": "Source.js ",
        " operator ":" Equal ",
        " Match_all ": True,
        " key ":" selector "
      }, {
        " key ":" Preceding_text ",
        "operator": "Regex_contains", "
        operand": "(\\b (A\\b|div|span|p\\b|button) (\\.\\w*|>\\w*)?" ( [^}] *?} $) ",
        " Match_all ": True
      }, {
        " key ":" Selection_empty ",
        " operator ":" Equal ",
        " operand ": True,
        ' Match_all ': true
      }]
    }

5. Install JS, format JS code

Open Preferences-> Package Settings-> jsformat->, enter the following code:

{
  ' e4x ': true,
  //Jsformat options
  ' Format_on_save ': true,
}

It can be automatically formatted when saved and supports JSX type files.





Reference Links:

Http://www.cnblogs.com/terrylin/p/4942332.html


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.