Coder Social home page Coder Social logo

sublime-babel-vscode's Introduction

Sublime Babel VS Code marketplace button

When using your favorite theme, Visual Studio Code doesn't always display syntax highlight colors as expected. This extension tries to mimic Sublime Text's babel-sublime package as much as possible to address poor coloring.

With VS Code 1.9.0, a new token flattenizer will be implemented that finally allows VS Code to properly follow TextMate grammar rules. This significantly improves syntax highlighting with preexisting tmThemes from other editors. However, the default JavaScript grammar still needs some work to match Sublime Text. This extension solves that for you.

Installation

  1. Uninstall any preexisting JavaScript grammar extensions (e.g. Latest TypeScript and JavaScript Grammar, Babel ES6/ES7) to prevent conflicts
  2. Install Sublime Babel via ext install sublime-babel-vscode in Command Palette
  3. When opening a .js or .jsx file, ensure the language mode is set to JavaScript (Babel) or JavaScript React (Babel)

statusbar

Suggested Color Themes

For best results, please consider using these optimized themes. Other ported themes will work too, but may not necessarily handle the differences between Sublime and VS Code properly.

One Dark

Charcoal Oceanic Next

Comparisons

Here is a quick example of the improved grammar compared against the popular Babel ES6/ES7 extension on the marketplace. Notice how Babel ES6/ES7 handles comments and strings incorrectly.

Babel ES6/ES7

Sublime Babel

React

Note: These screenshots and case scenarios are old, but the premise is still valid. Other grammars do not fully tokenize like how Sublime does it.

Changelog

Please see here.

sublime-babel-vscode's People

Contributors

joshpeng avatar brneto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.