Sublime plugin with snippets for the Google Closure Library
Install with Package Control. Search for: Google Closure Library Snippets.
Just type cl
on a javascript document and work with autocomplete.
The snippets are namespaced based on functionality, at most you'll have to type 4 chars and Enter
:
snippet | Category | Description |
---|---|---|
clareach | Arrays | goog.array.forEach() |
clevlisten | Events | Event listener (goog.event.listen() ) |
clevdispatch | Events | Dispatch an event, verbose version |
clevcb | Events | Callback function declaration for events, including block docs |
cldispose | Generic | dispose internal declaration (.disposeInternal = function() ) |
clfn | Generic | Default function declaration with a logger |
clsingle | Generic | Singleton declaration (goog.addSingletonGetter() ) |
cltypedef | Generic | A very verbose type definition with weird annotation cases |
clenum | Generic | Enum declaration |
clprov | Generic | goog.provide(); |
clreq | Generic | goog.require(); |
clclassev | New files | New class boilerplate with events inheritance |
clobjeach | Objects | goog.object.forEach() |
I am using this package as a helper for my workflow with Closure Library, feel free to do the same by submitting snippets that you use in yours.