Giter Site home page Giter Site logo

6to5-sublime's Introduction

6to5-sublime

Language definitions for ES6 JavaScript with React JSX syntax extensions, and snippets for common React constructs (like lifecycle methods) in ES6.

Installation

Find it as 6to5 through Package Control.

Setting as the default syntax

To set it as the default syntax for a particular extension:

  1. Open a file with that extension,
  2. Select View from the menu,
  3. Then Syntax -> Open all with current extension as... -> JavaScript 6to5.
  4. Repeat this for each extension (e.g.: .js and .jsx).

Setting a Color Scheme

6to5 comes bundled with Next and Monokai from Benvie/JavaScriptNext.tmLanguage. Select one from Preferences -> Color Scheme -> 6to5

Screenshots

6to5-sublime-vs-sublime-react (6to5-sublime vs sublime-react)

Snippets

Trigger Content
cdm→ componentDidMount() { ... },
cdup→ componentDidUpdate(prevProps, prevState) { ... },
cs→ var cx = React.addons.classSet;
cwm→ componentWillMount() { ... },
cwr→ componentWillReceiveProps(nextProps) { ... },
cwun→ componentWillUnmount() { ... },
cwu→ componentWillUpdate(nextProps, nextState) { ... },
cx→ cx({ ... });
fup→ this.forceUpdate(...);
gdn→ this.getDOMNode()
gdp→ getDefaultProps() { return {...}; },
gis→ getInitialState() { return {...}; },
ism→ this.isMounted()
props→ this.props.
pt→ propTypes: { ...: React.PropTypes. },
rcc→ component skeleton
ren→ render() { return (...); }
scu→ shouldComponentUpdate(nextProps, nextState) { ... },
sst→ this.setState({ ... });
state→ this.state.

About

Under the hood, 6to5-sublime is based on the excellent Benvie/JavaScriptNext.tmLanguage with JSX syntax support built on top. The initial definitions for JSX came from reactjs/sublime-react via yungters/sublime - but we've added a few improvements like support for JSX namespaces and comments between JSX attributes.

Contributing

Pull Requests should include your changes to the respective YAML-tmKittens file as well as the converted tmKittens file. Use AAAPackageDev to convert the YAML-tmKittens files.

6to5-sublime's People

Contributors

gpbl avatar zertosh avatar

Watchers

 avatar  avatar  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.