1

Right now on the project we use *.react.js as type extension for JSX files for some reasons.

Is it possible in Sublime Text add custom file extension with *.react.js pattern (i.e. using dot sign in the extension)?

I know that it's possible write py script to handle it, but maybe I missed something in settings.

dnim
  • 2,470
  • 4
  • 20
  • 19
  • Possible duplicate of [How to customise file type to syntax associations in Sublime Text?](http://stackoverflow.com/questions/8088475/how-to-customise-file-type-to-syntax-associations-in-sublime-text) – idleberg Apr 19 '17 at 16:57
  • @idleberg, no, because here I'm asking about custom extension that contains dot (i.e. _.react.js_) – dnim Apr 28 '17 at 11:22

1 Answers1

1

This doesn't directly answer your question, but I think it solves your problem. ST has the babel extension, which works great for JSX and JS files alike. You could use that for all files with .js extension and I think you'll be good.

Another reason not to go down the extension rabbit hole is that these days it's recommended that JSX files end in .js, making it even harder to differentiate. But Babel highlighter solves all.

dyer
  • 284
  • 1
  • 12