Skip to content

Instantly share code, notes, and snippets.

@donnyfe
Forked from mxstbr/Readme.md
Created May 16, 2017 08:25
Show Gist options
  • Select an option

  • Save donnyfe/65b9d04a1bc1d98fa89cab7ecd0765a7 to your computer and use it in GitHub Desktop.

Select an option

Save donnyfe/65b9d04a1bc1d98fa89cab7ecd0765a7 to your computer and use it in GitHub Desktop.

Revisions

  1. @mxstbr mxstbr revised this gist May 9, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Readme.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

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

    ![Gif of the tab completion working](http://i.imgur.com/09oOsHx.gifv)
    ![Gif of the tab completion working](http://i.imgur.com/09oOsHx.gif)

    1. Open the `keymap.cson` file by clicking on `Atom -> Keymap…` in the menu bar
    2. Add these lines of code to your keymap:
  2. @mxstbr mxstbr revised this gist May 9, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Readme.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@

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

    ![Gif of the tab completion working](http://i.imgur.com/09oOsHx.gifv)

    1. Open the `keymap.cson` file by clicking on `Atom -> Keymap…` in the menu bar
    2. Add these lines of code to your keymap:
    ```CSON
  3. @mxstbr mxstbr created this gist May 9, 2016.
    12 changes: 12 additions & 0 deletions Readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # 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:
    ```CSON
    '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)*