Giter Site home page Giter Site logo

es6-snippets's Introduction

es6-snippets.el

es6-snippets.el is a collection of Yanippets for writing EcmaScript 2015 in Emacs.

This is almost comprehensive, but snippets are still being changed and added.

See the ES6 Standard draft for a full spec.

Installation

First get the source:

$ git clone [email protected]:codyreichert/es6-snippets ~/.emacs.d/es6-snippets

Then require the package:

(add-to-list 'load-path "~/.emacs.d/es6-snippets")
(require 'es6-snippets)

There’s plenty of other ways, so do what works best for you

Prerequisites

Yasnippets needs to be enabled, but once once it is and you’ve required the package in your init.el, snippets will be available in web-mode, js2-mode, or js-mode.

Snippets

SnippetNameDescription
arwarrowFunction($1) => { $0 }
clclassclass $1 { $0 }
cleclassExtendsclass $1 extends $2 { $0 }
ccsclassConstructorconstructor($1) { $0 }
constconstantconst $1 = $0;
expexportexport $0;
expdexportDefaultexport default $0;
expfexportFunctionexport function $1($2) { $0 }
forofforOfLoopfor($1 of $2) { $0 }
impimportimport $0;
letletlet $1 = $0;
mapmapnew Map($0);
prompromisenew Promise(($1) => { $0 });
pxproxynew Proxy($1, $0);
setsetnew Set($0);
sprspread(...$1)$0
sistringInterpolate${$0}
supsupersuper($0)
symsymbolSymbol($0);
tstemplateString`$0`
wmapweakMapnew WeakMap($0);
wsetweakSetnew WeakSet($0);

Contributing

Please do. Open an issue or a pull request if you need a snippet added, want to discuss changing a key binding, or have any issues.

I know I didn’t get to all of them, and there are some I intentionally left off, but I’m open to adding or changing any snippets.

  • [ ] Shorter bindings. If I can figure out there won’t be clashed with the other JavaScript Yasnippets, I would like to shorten some of these key bindings.
  • [ ] Full coverage for EcmaScript 2015
  • [ ] MELPA package

es6-snippets's People

Contributors

codyreichert avatar siassaj avatar

Watchers

 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.