Sublime Babel
mattmacpherson opened this issue · comments
What's the difference between this and Sublime Babel?
In regular JavaScript, there are only subtle differences (import/export statements and function calls), however the real difference is that this package has improved Flow support as well as syntax highlighting for GraphQL and styled-components. While Sublime Babel supports React and JSX pretty well, I personally prefer the highlighting provided by this package (mainly that JSX components are treated the same as classes).
It's all obviously a matter of preference and this is mine!
Sublime Babel:
Babel JavaScript:
@mgmcdermott Thanks for the detailed response. I respect your attention to detail and I'm definitely giving it a try!
also comment that in this package commenting inside JSX works better than in sublime babel
Sublime babel comments JSX with // xxx
this package comments JSX in the correct way with {/* xxx */}
Regarding the screenshots:
The import screenshots seem switched - the first screenshot shows Babel JavaScript, the second Sublime Babel (using "Material Theme").
Regarding the JSX Tags:
I can't see why the Babel JavaScript color should be correct. Open an HTML file, write a few tags. They're not yellow, they're red. Hence, the JSX tags should be red as well (like Sublime Babel).
All screenshots were taken using the "Theme - Oceanic Next" theme.
Regarding your second point, valid html tags (input, p, span, h1, etc) will be red just like html. Components (with a capital letter) are NOT valid html and hence they are colored like the classes that they are.
I wanted to show the differences in this issue. Both Sublime Babel and Babel JavaScript will highlight default html tags as red.
I see, that makes sense. Had not noticed that (subtle but important) difference :)
Sorry, can you provide screenshots for any differences in flow-types as well?
can you please tell me what font is this??
@hamzashahab1610 It is Operator Mono