Created
July 11, 2019 01:18
-
-
Save gj1118/655794bc282951a9d0d4c86f24e3552f to your computer and use it in GitHub Desktop.
React comment code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content> | |
<![CDATA[ | |
{/**${SELECTION} **/} | |
]]> | |
</content> | |
<tabTrigger>comment</tabTrigger> | |
<description>Comment React code</description> | |
<scope>source.js</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create a file with the name above and with the contents above and then save in the following location :
/Users/<username>/Library/Application Support/Sublime Text 3/Packages/User/react_comment_code.sublime-snippet
and then in your keybindings add the following code"keys": ["alt+shift+t"], "command": "insert_snippet", "args": { "name": "Packages/User/react_comment_code.sublime-snippet" }, "context": [ { "key": "selector", "operator": "equal", "operand": "meta.jsx.js, meta.tag.jsx" }, ]
Next time you select an JSX code you can press
alt+shift+t
to comment the selected code.