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