使 sublime 可以自动补全 jsx 的标签(前提是安装Emmet )

来源:互联网 发布:mac版yy怎么录音 编辑:程序博客网 时间:2024/06/09 17:24

原链接:https://www.v2ex.com/t/288422

方法:菜单->Preferences->Key Bindings - User 添加下面的代码:

[{  "keys": [    "tab"  ],  "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  }]}]
阅读全文
0 0
原创粉丝点击