Skip to content

Instantly share code, notes, and snippets.

@HT154
Created December 13, 2017 18:01
Show Gist options
  • Save HT154/b4ac216466ac90c041889ba6aabe4e47 to your computer and use it in GitHub Desktop.
Save HT154/b4ac216466ac90c041889ba6aabe4e47 to your computer and use it in GitHub Desktop.
Sublime Text 3 - Auto-close tags in JSX and TSX - Include this in your .sublime-keymap
[
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml, meta.jsx.js, meta.jsx.children.tsx) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
]
@HT154
Copy link
Author

HT154 commented Oct 2, 2021

@Saggitarie It is 4 years old and I’ve long since left sublime behind in favor of vscode. Best of luck though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment