美文网首页
Atom Emmet设置

Atom Emmet设置

作者: 袁俊亮技术博客 | 来源:发表于2017-08-21 11:23 被阅读45次

    Atom Emmet设置

    标签(空格分隔): React


    Enable tab completion for JSX with Emmet in Atom

    This guide assumes you have the emmet and language-babel packages already installed in Atom

    1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
    2. Add these lines of code to your keymap:
    'atom-text-editor[data-grammar~="jsx"]:not([mini])':
      'tab': 'emmet:expand-abbreviation-with-tab'
    

    Now open a file with JSX code, type div.myclass, press tab and it should autocomplete to <div className="myclass"></div>! (if it's not properly syntax highlighted, select Babel ES6 JavaScript or JSX as the syntax, this won't work otherwise)

    原文地址:Enable tab completion for JSX with Emmet in Atom

    相关文章

      网友评论

          本文标题: Atom Emmet设置

          本文链接:https://www.haomeiwen.com/subject/bgjcdxtx.html