2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SublimeでEmmetをJSXを使用する際に有効にする

Last updated at Posted at 2017-09-02

SublimeでTabキーでEmmetのSyntaxを展開する。

http://wesbos.com/emmet-react-jsx-sublime/
https://gist.github.com/wesbos/2bb4a6998635df97c748
https://github.com/facelessuser/ScopeHunter

↓をSublimeのkeybindingsのUser設定にペーストする。

[
  // http://wesbos.com/emmet-react-jsx-sublime/
  // https://gist.github.com/wesbos/2bb4a6998635df97c748
  // https://github.com/facelessuser/ScopeHunter
  {
  "keys": ["tab"],
  "command": "expand_abbreviation_by_tab",

  // put comma-separated syntax selectors for which
  // you want to expandEmmet abbreviations into "operand" key
  // instead of SCOPE_SELECTOR.
  // Examples: source.js, text.html - source
  "context": [
    {
      "operand": "meta.group.braces.round.js, meta.group.braces.curly.js, text.html, source.css",
      "operator": "equal",
      "match_all": true,
      "key": "selector"
    },

    // run only if there's no selected text
    {
      "match_all": true,
      "key": "selection_empty"
    },

    // don't work if there are active tabstops
    {
      "operator": "equal",
      "operand": false,
      "match_all": true,
      "key": "has_next_field"
    },

    // don't work if completion popup is visible and you
    // want to insert completion with Tab. If you want to
    // expand Emmet with Tab even if popup is visible --
    // remove this section
    // {
    //   "operand": false,
    //   "operator": "equal",
    //   "match_all": true,
    //   "key": "auto_complete_visible"
    // },
    // {
    //   "match_all": true,
    //   "key": "is_abbreviation"
    // }
  ]
}
]

#他の方が書いた記事
ReactのjsxファイルでSublimeText3 + Emmetを使おう
[高速にJSXを書いていくTips]
(http://qiita.com/akameco/items/78d7d36e1389321ce45a)

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?