Change block comment for jsx in webstorm

In webstorm, jsx has all the same colors and styles as javascript, and that's great. However, block comments are not set to jsx /* */ vs. {/* */} .

I tried to remove *.jsx as a registered javascript template in File Types settings and make jsx my own file type, but then I will lose all user colors and style. Is there a way to customize block comment characters based on each template, while styling refers to pure JavaScript rules?

+5
source share
2 answers

No. Please vote for WEB-16439 - JSX Comment Support Request

+4
source

There's a pretty convenient / hacky way to do this - add a live template to your Javascript group in Editor -> Live templates with content like this:

 {/*$SELECTION$*/} 

then in your code select any response code, press ⌥⌘T and enter the first letter of the abbreviation of your template.

+2
source

Source: https://habr.com/ru/post/1234326/


All Articles