Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jubalm/156031dcdf1843ba33d9497920913ca8 to your computer and use it in GitHub Desktop.
Save jubalm/156031dcdf1843ba33d9497920913ca8 to your computer and use it in GitHub Desktop.
Enable Emmet autocompletion for React JavaScript/JSX

Enable Emmet autoCompletion in JavaScript/JSX files

  1. You can do either of the following to update Key Bindings for Emmet to work:
  • Press CMD+Shift+p for OSX or Ctrl+Shift+p for Windows and look for "Preferences: Key Bindings"
  • or Go to Preferences > Key Bindings
  1. Copy and paste the code from Default (OSX).sublime-keymap, making sure you don't have codes that gets overwritten in there. Else just copy the codes within the braces {}

view reference

[
{"keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
[
{ "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
{ "match_all": true, "key": "selection_empty" },
{ "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
{ "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
{ "match_all": true, "key": "is_abbreviation" }
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment